Thank you very much. There is another thing on “-lgomp” that makes me worried.
When generating wrf.exe through compiling the source code. After ./configure, configure.wps was generated. Each time I add "-lgomp" to the WRF_LIB variable in file configure.wps (just append it after -lnetcdf) as follows:
LIB_EXTERNAL = \
-L$(WRF_SRC_ROOT_DIR)/external/io_netcdf -lwrfio_nf -L/usr/local/lib/netcdf/lib -lnetcdff -lnetcdf -lgomp
Otherwise, it will pompted the following errors.
/home/lsl/Downloads/WRF_Download/WPS/../WRF/external/io_netcdf/libwrfio_nf.a(wrf_io.o): In function `__ext_ncd_support_routines_MOD_transpose._omp_fn.0':
wrf_io.f
.text+0xcd): undefined reference to `GOMP_loop_runtime_start'
wrf_io.f
.text+0x4c1): undefined reference to `GOMP_loop_runtime_next'
wrf_io.f
.text+0x4ce): undefined reference to `GOMP_loop_end_nowait'
/home/lsl/Downloads/WRF_Download/WPS/../WRF/external/io_netcdf/libwrfio_nf.a(wrf_io.o): In function `__ext_ncd_support_routines_MOD_transpose._omp_fn.1':
wrf_io.f
.text+0x69d): undefined reference to `GOMP_loop_runtime_start'
wrf_io.f
.text+0xaa1): undefined reference to `GOMP_loop_runtime_next'
wrf_io.f
.text+0xaae): undefined reference to `GOMP_loop_end_nowait'
/home/lsl/Downloads/WRF_Download/WPS/../WRF/external/io_netcdf/libwrfio_nf.a(wrf_io.o): In function `__ext_ncd_support_routines_MOD_transpose._omp_fn.2':
wrf_io.f
.text+0xc74): undefined reference to `GOMP_loop_runtime_start'
wrf_io.f
.text+0x1051): undefined reference to `GOMP_loop_runtime_next'
However, the library libgomp does not exist in the folder /usr/local/lib/netcdf/lib
lsl@lsl-Vostro-3668:/usr/local/lib/netcdf/lib$ ls
libbzip2.la libmisc.la libnetcdf.a libnetcdff.la libnetcdff.so.6 libnetcdf.la libnetcdf.so libnetcdf.so.13.1.1
libbzip2.so libmisc.so libnetcdff.a libnetcdff.so libnetcdff.so.6.1.1 libnetcdf.settings libnetcdf.so.13 pkgconfig
Thus, although the compilation passed when adding “-lgomp”, I am not sure how wrf.exe works when using dmpar. That might be the source of the trouble??
When generating wrf.exe through compiling the source code. After ./configure, configure.wps was generated. Each time I add "-lgomp" to the WRF_LIB variable in file configure.wps (just append it after -lnetcdf) as follows:
LIB_EXTERNAL = \
-L$(WRF_SRC_ROOT_DIR)/external/io_netcdf -lwrfio_nf -L/usr/local/lib/netcdf/lib -lnetcdff -lnetcdf -lgomp
Otherwise, it will pompted the following errors.
/home/lsl/Downloads/WRF_Download/WPS/../WRF/external/io_netcdf/libwrfio_nf.a(wrf_io.o): In function `__ext_ncd_support_routines_MOD_transpose._omp_fn.0':
wrf_io.f
wrf_io.f
wrf_io.f
/home/lsl/Downloads/WRF_Download/WPS/../WRF/external/io_netcdf/libwrfio_nf.a(wrf_io.o): In function `__ext_ncd_support_routines_MOD_transpose._omp_fn.1':
wrf_io.f
wrf_io.f
wrf_io.f
/home/lsl/Downloads/WRF_Download/WPS/../WRF/external/io_netcdf/libwrfio_nf.a(wrf_io.o): In function `__ext_ncd_support_routines_MOD_transpose._omp_fn.2':
wrf_io.f
wrf_io.f
However, the library libgomp does not exist in the folder /usr/local/lib/netcdf/lib
lsl@lsl-Vostro-3668:/usr/local/lib/netcdf/lib$ ls
libbzip2.la libmisc.la libnetcdf.a libnetcdff.la libnetcdff.so.6 libnetcdf.la libnetcdf.so libnetcdf.so.13.1.1
libbzip2.so libmisc.so libnetcdff.a libnetcdff.so libnetcdff.so.6.1.1 libnetcdf.settings libnetcdf.so.13 pkgconfig
Thus, although the compilation passed when adding “-lgomp”, I am not sure how wrf.exe works when using dmpar. That might be the source of the trouble??