Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

WPS Build with WRF-smpar Build

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

lslrsgis

Member
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??
 

Attachments

  • configure.wrf
    20.1 KB · Views: 49
Hi,
According to your configure.wrf file, you are compiling with an smpar build, not a dmpar build.

Code:
106 LIBWRFLIB = libwrflib.a
107 
108 
109 #### Architecture specific settings ####
110 
111 # Settings for    Linux x86_64 ppc64le, gfortran compiler with gcc   (smpar)
112 #

When you compile WRF with smpar, and then compile WPS (regardless of how you compile it), it may be necessary to add that because WPS uses the I/O from the WRF build, and it's trying to link against the smpar I/O.

P.S. - I'm actually going to move this latest question/answer to the WPS compile section because this seems unrelated to the original question.
 
Thanks Kelly,

I tried to compile dmpar on my personal PC, and it looks similar as smpar. Without adding “-lgmop” in wrf.configure, it does not pass for compiling dmpar.

What I am worried is that libgomp library does not exist in my PC. I just add the phrase "-lgmop" in my configure.wps to let the compilation pass. Does it matter?


Makefile:32: recipe for target 'em_real' failed
make[1]: [em_real] Error 1 (ignored)
time mpif90 -o tc.exe -O2 -ftree-vectorize -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 tc_em.o ../dyn_em/module_initialize_real.o libwrflib.a /home/lsl/WRF/WRF/external/fftpack/fftpack5/libfftpack.a /home/lsl/WRF/WRF/external/io_grib1/libio_grib1.a /home/lsl/WRF/WRF/external/io_grib_share/libio_grib_share.a /home/lsl/WRF/WRF/external/io_int/libwrfio_int.a -L/home/lsl/WRF/WRF/external/esmf_time_f90 -lesmf_time /home/lsl/WRF/WRF/external/RSL_LITE/librsl_lite.a /home/lsl/WRF/WRF/frame/module_internal_header_util.o /home/lsl/WRF/WRF/frame/pack_utils.o -L/home/lsl/WRF/WRF/external/io_netcdf -lwrfio_nf -L/usr/local/lib/netcdf/lib -lnetcdff -lnetcdf
/home/lsl/WRF/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/WRF/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/WRF/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'
wrf_io.f:(.text+0x105e): undefined reference to `GOMP_loop_end_nowait'
/home/lsl/WRF/WRF/external/io_netcdf/libwrfio_nf.a(wrf_io.o): In function `__ext_ncd_support_routines_MOD_transpose._omp_fn.3':
wrf_io.f:(.text+0x1224): undefined reference to `GOMP_loop_runtime_start'
wrf_io.f:(.text+0x1601): undefined reference to `GOMP_loop_runtime_next'
wrf_io.f:(.text+0x160e): undefined reference to `GOMP_loop_end_nowait'
/home/lsl/WRF/WRF/external/io_netcdf/libwrfio_nf.a(wrf_io.o): In function `__ext_ncd_support_routines_MOD_transpose._omp_fn.4':
wrf_io.f:(.text+0x17d4): undefined reference to `GOMP_loop_runtime_start'
wrf_io.f:(.text+0x1bb1): undefined reference to `GOMP_loop_runtime_next'
wrf_io.f:(.text+0x1bbe): undefined reference to `GOMP_loop_end_nowait'
/home/lsl/WRF/WRF/external/io_netcdf/libwrfio_nf.a(wrf_io.o): In function `__ext_ncd_support_routines_MOD_transpose._omp_fn.5':
wrf_io.f:(.text+0x1d84): undefined reference to `GOMP_loop_runtime_start'
wrf_io.f:(.text+0x2161): undefined reference to `GOMP_loop_runtime_next'
wrf_io.f:(.text+0x216e): undefined reference to `GOMP_loop_end_nowait'
/home/lsl/WRF/WRF/external/io_netcdf/libwrfio_nf.a(wrf_io.o): In function `__ext_ncd_support_routines_MOD_transpose._omp_fn.6':
wrf_io.f:(.text+0x233d): undefined reference to `GOMP_loop_runtime_start'
wrf_io.f:(.text+0x2731): undefined reference to `GOMP_loop_runtime_next'
wrf_io.f:(.text+0x273e): undefined reference to `GOMP_loop_end_nowait'
 

Attachments

  • configure.wrf
    20.1 KB · Views: 53
Hi,
I am confused about which you are having trouble with - compiling WPS or compiling WRF? You mentioned in the original post that everything compiles correctly, but now you say that it doesn't with the new system. The first post (I thought) was referring to your WPS compile, but this new one seems to be referring to WRF not building. In an effort to try to solve this, let's just focus on one system and problem at a time. If your personal PC is a new system (from your original post), let's not worry about that one yet. It's very difficult to solve a problem when so many variables are being changed.

So, back to your original post, you were compiling WRF with an smpar option (as was indicated in the original configure.wrf file that you sent). Are you purposefully compiling WRF with smpar, or would you rather use dmpar?
 
Top