Compilation Problem of Bidirectionally Coupled WRF-CMAQ Model

It seems based on the following error messages in your log file that you may have compiled I/O API with openmp but then did not provide an openmp link flag when building the twoway WRF/CMAQ model:

time mpif90 -o wrf.exe -O2 -ftree-vectorize -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 wrf.o …/main/module_wrf_top.o libwrflib.a libcmaqlib.a -L/home/likeco/install_cmaq/libext/ioapi_3.1/Linux2_x86_64gfort -lioapi /home/likeco/Build_WRF-CMAQ/CMAQ5.4.0/CMAQ-CMAQv5.4.0.4/CCTM/scripts/BLD_WRFv4.5_CCTM_v54_gcc/external/fftpack/fftpack5/libfftpack.a /home/likeco/Build_WRF-CMAQ/CMAQ5.4.0/CMAQ-CMAQv5.4.0.4/CCTM/scripts/BLD_WRFv4.5_CCTM_v54_gcc/external/io_grib1/libio_grib1.a /home/likeco/Build_WRF-CMAQ/CMAQ5.4.0/CMAQ-CMAQv5.4.0.4/CCTM/scripts/BLD_WRFv4.5_CCTM_v54_gcc/external/io_grib_share/libio_grib_share.a /home/likeco/Build_WRF-CMAQ/CMAQ5.4.0/CMAQ-CMAQv5.4.0.4/CCTM/scripts/BLD_WRFv4.5_CCTM_v54_gcc/external/io_int/libwrfio_int.a -L/home/likeco/Build_WRF-CMAQ/CMAQ5.4.0/CMAQ-CMAQv5.4.0.4/CCTM/scripts/BLD_WRFv4.5_CCTM_v54_gcc/external/esmf_time_f90 -lesmf_time /home/likeco/Build_WRF-CMAQ/CMAQ5.4.0/CMAQ-CMAQv5.4.0.4/CCTM/scripts/BLD_WRFv4.5_CCTM_v54_gcc/external/RSL_LITE/librsl_lite.a /home/likeco/Build_WRF-CMAQ/CMAQ5.4.0/CMAQ-CMAQv5.4.0.4/CCTM/scripts/BLD_WRFv4.5_CCTM_v54_gcc/frame/module_internal_header_util.o /home/likeco/Build_WRF-CMAQ/CMAQ5.4.0/CMAQ-CMAQv5.4.0.4/CCTM/scripts/BLD_WRFv4.5_CCTM_v54_gcc/frame/pack_utils.o -L/home/likeco/Build_WRF-CMAQ/CMAQ5.4.0/CMAQ-CMAQv5.4.0.4/CCTM/scripts/BLD_WRFv4.5_CCTM_v54_gcc/external/io_netcdf -lwrfio_nf -L/home/likeco/Build_WRF/LIBRARIES/netcdf/lib -lnetcdff -lnetcdf
/bin/bash: /home/likeco/miniconda3/lib/libtinfo.so.6: no version information available (required by /bin/bash)
/usr/bin/ld: /home/likeco/install_cmaq/libext/ioapi_3.1/Linux2_x86_64gfort/libioapi.a(name2fid.o): in function name2fid_': name2fid.f:(.text+0x1b): undefined reference to GOMP_critical_name_start’
/usr/bin/ld: name2fid.f:(.text+0x31): undefined reference to GOMP_critical_name_end' /usr/bin/ld: name2fid.f:(.text+0xb1): undefined reference to GOMP_critical_name_end’
/usr/bin/ld: /home/likeco/install_cmaq/libext/ioapi_3.1/Linux2_x86_64gfort/libioapi.a(getefile.o): in function getefile_': getefile.F:(.text+0x27): undefined reference to GOMP_critical_name_start’
/usr/bin/ld: getefile.F:(.text+0x4b): undefined reference to GOMP_critical_name_end' /usr/bin/ld: /home/likeco/install_cmaq/libext/ioapi_3.1/Linux2_x86_64gfort/libioapi.a(interp3.o): in function master.0.interp3_‘:
interp3.F:(.text+0xdf): undefined reference to GOMP_critical_name_start' /usr/bin/ld: interp3.F:(.text+0xf9): undefined reference to GOMP_critical_name_end’
/usr/bin/ld: interp3.F:(.text+0x17c): undefined reference to GOMP_critical_name_start' /usr/bin/ld: interp3.F:(.text+0x1a9): undefined reference to GOMP_critical_name_end’
/usr/bin/ld: interp3.F:(.text+0x3bf): undefined reference to GOMP_critical_name_start' /usr/bin/ld: interp3.F:(.text+0x5ed): undefined reference to GOMP_critical_name_end’
/usr/bin/ld: interp3.F:(.text+0x17f9): undefined reference to GOMP_critical_name_end' /usr/bin/ld: interp3.F:(.text+0x1cb1): undefined reference to GOMP_critical_name_end’
/usr/bin/ld: interp3.F:(.text+0x20b4): undefined reference to GOMP_critical_name_end' /usr/bin/ld: interp3.F:(.text+0x2c4a): undefined reference to GOMP_critical_name_end’
/usr/bin/ld: /home/likeco/install_cmaq/libext/ioapi_3.1/Linux2_x86_64gfort/libioapi.a(interp3.o):interp3.F:(.text+0x31d4): more undefined references to GOMP_critical_name_end' follow /usr/bin/ld: /home/likeco/install_cmaq/libext/ioapi_3.1/Linux2_x86_64gfort/libioapi.a(m3msg2.o): in function m3msg2_‘:
m3msg2.F:(.text+0x24): undefined reference to GOMP_critical_name_start' /usr/bin/ld: m3msg2.F:(.text+0xad): undefined reference to GOMP_critical_name_end’
/usr/bin/ld: /home/likeco/install_cmaq/libext/ioapi_3.1/Linux2_x86_64gfort/libioapi.a(m3msg2.o): in function `m3mesg_':

I don’t have firsthand experience with this, but it seems to be the same issue discussed here.

Based on that thread, the solution would seem to be to either rebuild I/O API without openmp or to provide the openmp link flag when building WRF/CMAQ. I admit that I don’t understand why this wouldn’t have been an issue when you successfully built offline CMAQ.