Open mgduda opened 5 years ago
I got the similar error building WPS. Neither dmpar nor dm+sm of WRF build works. I finally built WRF with serial, then the geogrid and metgrid can be built.
This may not be ideal, but for most purposes, serially compiled WPS should work pretty well.
Same problem here, WRF 4.2.1 with dm+sm:
#22 28.20 /usr/sbin/ld: wrf_io.f:(.text+0x35c7): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
#22 28.20 /usr/sbin/ld: /var/lib/wrf/external/io_netcdf/libwrfio_nf.a(wrf_io.o): in function `__ext_ncd_support_routines_MOD_transpose._omp_fn.11':
#22 28.20 wrf_io.f:(.text+0x3a95): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
I had a similar problem after compiling WRF 4.1 with an Intel compiler using option 14 (smpar).
My solution/workaround was this:
./clean
./configure
# I chose option "17 ... Intel Compiler (serial)"./compile >& log.compile
Voila: everything is compiled as expected.
@mgduda @hermannschwaerzlerUIBK I am seeing this as well with WRF 4.2 compiled with dm+sm. While compiling with dmpar works just fine.
Any idea as to the root cause of this? Has this worked in the past? Can we add logic to check the WRF configure.wrf file to see if it was compiled with smpar or dm+sm and make the changes?
Is this the place that would need changing in the configure script? Config.pl location
3. edit _configure.wps_ by adding **-qopenmp** at the end of the lines that set WRF_LIB (after _-lnetcdff -lnetcdf_)
I got an error suggesting that it was -fopenmp rather than "-qopenmp". It worked for me leaving line 107 in configure.wps
like this:
-L$(NETCDF)/lib -lnetcdff -lnetcdf -fopenmp
In the chance that this is helpful, I am also running into a bunch of "undefined reference to " errors when trying to build WPS serial, parallel and non grib
However, looking at the comments above I tried editing
WRF_LIB = -L$(WRF_DIR)/external/io_grib1 -lio_grib1 \
-L$(WRF_DIR)/external/io_grib_share -lio_grib_share \
-L$(WRF_DIR)/external/io_int -lwrfio_int \
-L$(WRF_DIR)/external/io_netcdf -lwrfio_nf \
-L$(NETCDF)/lib -lnetcdff -lnetcdf
to
WRF_LIB = -L$(WRF_DIR)/external/io_grib1 -lio_grib1 \
-L$(WRF_DIR)/external/io_grib_share -lio_grib_share \
-L$(WRF_DIR)/external/io_int -lwrfio_int \
-L$(WRF_DIR)/external/io_netcdf -lwrfio_nf \
-L$(NETCDF)/lib -lnetcdff -lnetcdf -fopenmp
And it compiled serial, parallel and with grib2. I still need to test it but the exe compiles
./clean
./configure
# I chose option "17 ... Intel Compiler (serial)"- edit configure.wps by adding -qopenmp at the end of the lines that set WRFLIB (after -lnetcdff -lnetcdf_)
./compile >& log.compile
It works. Thanks a lot!
When WRF was compiled with an
smpar
option, the WRF I/O API library contains references to OpenMP libraries (e.g., 'GOMP' with the GNU compilers). Because the WPS doesn't support ansmpar
option and therefore never links the OpenMP library, the build ofgeogrid.exe
andmetgrid.exe
will fail with errors like: