Hello, I have some questions about the compilation of coupled WRF-CMAQ. I would like to ask you for help. Because I cannot use git to download WRF normally during the ./bldit_cctm.csh process, so I tried to build WRF-CMAQ manually, but when I ran to the last step of compile em_real, wrf.exe and twoway_feedback.o were not generated. Can anyone tell me what the reason is? Thank you very much. bldit_cctm.csh (31.9 KB)
hi lizadams,Thank you very much for your reply. I followed your instructions and upgraded WRF-CMAQ to the latest version for compilation and installation, but it still failed. This is my run log. But it is strange that I succeeded in compiling WRF or CMAQ separately. Can you tell me what the reason may be? Thank you very much. wrf-cmaq_buildlog.txt (1.6 MB)
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.
hi christian,Thank you for your reply. I guess the reason why I could compile CMAQ successfully before was that I set mylink-FLAG to -fopenmp in config_cmaq.csh. Then I recompiled the ioapi library as you said, and no longer used openmp to compile it. Finally, wrf.exe was successfully generated, but I did not find twoway_feedback.o in the main folder. Can you help me find out the reason? Thank you very much wrf-cmaq_buildlog.txt (3.1 MB)
Hello Zhu, I’m glad to hear that using a consistent openmp / non-openmp setup between the I/O API library build and the twoway WRF-CMAQ model build resolved the link errors you were encountering.
Unfortunately, I’m not familiar enough with the twoway WRF-CMAQ model build process to answer your question about the absence of file twoway_feedback.o in the main folder. Hopefully others with more experience can weigh in.
hi christian Thank you for your guidance, which made me more familiar with the whole process. I also hope that someone can help me solve the remaining problems.