I have some problems when csh bldit_cctm.csh

There are two things: the flags for this

  1. the flags for this mpif90 command should include either -openmp or -qopenmp, depending upon whether the underlying ifort is version 15 or before, or not. That’s the cause for this immediate error.
  2. You will then need to ensure (when you run the wrf.exe) that the system that calls it has sourced the appropriate Intel ifortvars.csh (whether in your login script or within this script itself; failure to do so was the cause of the earlier problem.

Hi cjcoats

I checked the Makeinclude.Linux2_x86_64ifort, and saw -openmp.So should I use -openmp?
All I’ve been using is -openmp.

I’m looking forward to your reply,sir.

# Version "$Id: Makeinclude.Linux2_x86_64ifort 1 2017-06-10 18:05:20Z coats $"
#
#  Michael Bane (UManchester UK) reports that for ifort version 9,
#  -stack_temps -safe_cray_ptr are not supported and that there are
#  problems with  "-unroll" without an unroll-count (bug reported
#  to Intel)

AR   = ar
CC   = icc
FC   = ifort -auto -warn notruncated_source -Bstatic -static-intel
M4   = m4
LINK = $(CC)

MODI = -I       ## Module-include-directory command
E132 = -extend-source 132

# MFLAGS  = -traceback                                          # generic
# MFLAGS  = -traceback -msse4.1 -xSSE4.1                        # penryn
# MFLAGS  = -traceback -mavx2   -xAVX    -march=corei7-avx      # SandyBridge
# MFLAGS  = -traceback -mavx    -xAVX2   -march=corei7-avx2     # Haswell
MFLAGS    = -traceback -xHost                                   # this-machine

# OMPFLAGS  = -qopenmp      # for Intel compilers, version 16 or later
# OMPLIBS   = -qopenmp
OMPFLAGS  = -openmp
OMPLIBS   = -openmp

COPTFLAGS = -O3 ${MFLAGS}
FOPTFLAGS = -O3 -unroll -stack_temps -safe_cray_ptr \
  -convert big_endian -assume byterecl  ${MFLAGS}
FPPFLAGS  = -DF90=1
FSFLAGS   = -save
ARCHFLAGS = \
 -DAUTO_ARRAYS=1 \
 -DF90=1 -DFLDMN=1 \
 -DFSTR_L=int \
 -DIOAPI_NO_STDOUT=1 \
 -DAVOID_FLUSH=1 -DBIT32=1
PARFLAGS  =
ARCHLIB   = -Bstatic

# M4DEFFILE = $(PVM_ROOT)/conf/$(PVM_ARCH).m4
# PVMLIBS   = -L$(PVM_ROOT)/lib/$(PVM_ARCH) -lpvm3

PVMLIBS   =

Hi cjcoats

Now, the bld issue has been resolved, but I still can’t compile the wrf.exe.

The error and config settings are the same as the screenshot and code I sent just now.

It’s so weird. I can’t figure out what’s wrong.

I’m sorry to keep asking you, but I really don’t know how to solve it.

bandaoshutiao

Hi David

The situation now is that if I use the steps you taught me (first ./config, then mv the BLD* inside WRF code with the name cmaq,), I can compile out the coupled model, but I only get the WRF output file , I don’t know if you have received the error file.
If I follow the steps of the WRF-CMAQ Tutorial, I can’t get wrf.exe (can get other exe), and I put the error here.
How can I get through it, I am eager to get your guidance.

time mpif90 -f90=ifort -o wrf.exe  -O3 -ip -fp-model precise -w -ftz -align all -fno-alias -FR -convert big_endian   -ip   wrf.o ../main/module_wrf_top.o libwrflib.a libcmaqlib.a  -L/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort -lioapi  /data4/sunzhixu/WRF-CMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/external/fftpack/fftpack5/libfftpack.a /data4/sunzhixu/WRF-CMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/external/io_grib1/libio_grib1.a /data4/sunzhixu/WRF-CMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/external/io_grib_share/libio_grib_share.a /data4/sunzhixu/WRF-CMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/external/io_int/libwrfio_int.a -L/data4/sunzhixu/WRF-CMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/external/esmf_time_f90 -lesmf_time /data4/sunzhixu/WRF-CMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/external/RSL_LITE/librsl_lite.a /data4/sunzhixu/WRF-CMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/frame/module_internal_header_util.o /data4/sunzhixu/WRF-CMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/frame/pack_utils.o -L/data4/sunzhixu/WRF-CMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/external/io_netcdf -lwrfio_nf -L/data/install/netcdf/lib -lnetcdff -lnetcdf     -L/data/install/hdf5/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lm -lz
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(name2fid.o): In function `name2fid_':
/data/home/huangling/local/ioapi-3.2/ioapi/name2fid.f:(.text+0x21): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/name2fid.f:(.text+0x38): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/name2fid.f:(.text+0x59): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(getefile.o): In function `getefile_':
/data/home/huangling/local/ioapi-3.2/ioapi/getefile.F:(.text+0x26): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/getefile.F:(.text+0x3d): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/getefile.F:(.text+0x5e): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(interp3.o): In function `interpx_':
/data/home/huangling/local/ioapi-3.2/ioapi/interp3.F:(.text+0x8b): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(interp3.o): In function `interp3_':
/data/home/huangling/local/ioapi-3.2/ioapi/interp3.F:(.text+0x15f): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/interp3.F:(.text+0x215): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/interp3.F:(.text+0x23a): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/interp3.F:(.text+0x3dd): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/interp3.F:(.text+0x45e): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/interp3.F:(.text+0x74f): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/interp3.F:(.text+0x12ab): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(m3msg2.o): In function `m3msg2_':
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x20): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x37): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x9f): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(m3msg2.o): In function `m3mesg_':
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0xed): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x104): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x19d): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(m3msg2.o): In function `m3prompt_':
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x202): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x219): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x31c): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(m3msg2.o): In function `m3parag_':
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x46c): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x488): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x55e): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(m3msg2.o): In function `m3flush_':
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x5a7): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x5be): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/m3msg2.F:(.text+0x5e3): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(write3.o): In function `write3_':
/data/home/huangling/local/ioapi-3.2/ioapi/write3.F:(.text+0x7c): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/write3.F:(.text+0x95): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/write3.F:(.text+0xb9): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(close3.o): In function `close3_':
/data/home/huangling/local/ioapi-3.2/ioapi/close3.F90:(.text+0x8f): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/close3.F90:(.text+0xa6): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/close3.F90:(.text+0x1f5): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(desc3.o): In function `desc3_':
/data/home/huangling/local/ioapi-3.2/ioapi/desc3.F90:(.text+0x24): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/desc3.F90:(.text+0x36): undefined reference to `__kmpc_single'
/data/home/huangling/local/ioapi-3.2/ioapi/desc3.F90:(.text+0x309): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/desc3.F90:(.text+0x1186): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/desc3.F90:(.text+0x126a): undefined reference to `__kmpc_end_single'
/data/home/huangling/local/ioapi-3.2/ioapi/desc3.F90:(.text+0x1279): undefined reference to `__kmpc_barrier'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(init3.o): In function `init3_':
/data/home/huangling/local/ioapi-3.2/ioapi/init3.F90:(.text+0x77): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/init3.F90:(.text+0x92): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/init3.F90:(.text+0x107): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(open3.o): In function `open3_':
/data/home/huangling/local/ioapi-3.2/ioapi/open3.F90:(.text+0x35): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/open3.F90:(.text+0x4f): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/open3.F90:(.text+0x78): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(opnfil3.o): In function `opnfil3_':
/data/home/huangling/local/ioapi-3.2/ioapi/opnfil3.F90:(.text+0x84): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/opnfil3.F90:(.text+0x9a): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/opnfil3.F90:(.text+0x938): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/opnfil3.F90:(.text+0x957): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/opnfil3.F90:(.text+0x981): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(opnlog3.o): In function `opnlog3_':
/data/home/huangling/local/ioapi-3.2/ioapi/opnlog3.F90:(.text+0x51): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/opnlog3.F90:(.text+0x67): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/opnlog3.F90:(.text+0xa8): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/opnlog3.F90:(.text+0xe8): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/opnlog3.F90:(.text+0x12d8): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(rdgrnest.o): In function `rdgrnest_':
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x56): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x6f): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0xa9): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x1df): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x21e): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x336): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x37d): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x4a1): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x4e8): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x60b): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x652): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x775): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x7bc): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x8df): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdgrnest.F90:(.text+0x926): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(rdprofil.o): In function `rdprofil_':
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x4d): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x66): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0xa1): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x1d7): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x217): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x32f): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x377): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x49b): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x4e3): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x606): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x64e): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x771): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdprofil.F90:(.text+0x7b9): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(rdtflag.o): In function `rdtflag_':
/data/home/huangling/local/ioapi-3.2/ioapi/rdtflag.F90:(.text+0x6c): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/rdtflag.F90:(.text+0x2f0): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdtflag.F90:(.text+0x33a): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdtflag.F90:(.text+0x6ed): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdtflag.F90:(.text+0x71e): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(rdvars.o): In function `rdvars_':
/data/home/huangling/local/ioapi-3.2/ioapi/rdvars.F90:(.text+0xc5): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/rdvars.F90:(.text+0x12d): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdvars.F90:(.text+0x1d5): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdvars.F90:(.text+0x3ba): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdvars.F90:(.text+0x3f5): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdvars.F90:(.text+0x765): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdvars.F90:(.text+0x7ec): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(shut3.o): In function `shut3_':
/data/home/huangling/local/ioapi-3.2/ioapi/shut3.F90:(.text+0x38): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/shut3.F90:(.text+0x4e): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/shut3.F90:(.text+0x4e4): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(syncfid.o): In function `syncfid_':
/data/home/huangling/local/ioapi-3.2/ioapi/syncfid.F90:(.text+0x19): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/syncfid.F90:(.text+0x5a): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/syncfid.F90:(.text+0x83): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/syncfid.F90:(.text+0x1f4): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/syncfid.F90:(.text+0x2ad): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(wrgrnest.o): In function `wrgrnest_':
/data/home/huangling/local/ioapi-3.2/ioapi/wrgrnest.F90:(.text+0x2c): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/wrgrnest.F90:(.text+0x42): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrgrnest.F90:(.text+0x56): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrgrnest.F90:(.text+0xc0f): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrgrnest.F90:(.text+0xc23): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(wrprofil.o): In function `wrprofil_':
/data/home/huangling/local/ioapi-3.2/ioapi/wrprofil.F90:(.text+0x3b): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/wrprofil.F90:(.text+0x51): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrprofil.F90:(.text+0x65): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrprofil.F90:(.text+0x821): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrprofil.F90:(.text+0x835): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(wrvars.o): In function `wrvars_':
/data/home/huangling/local/ioapi-3.2/ioapi/wrvars.F90:(.text+0x2e): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/wrvars.F90:(.text+0x94): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrvars.F90:(.text+0x12c): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrvars.F90:(.text+0x214): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrvars.F90:(.text+0x259): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrvars.F90:(.text+0x47b): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrvars.F90:(.text+0x4d0): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrvars.F90:(.text+0x4ed): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrvars.F90:(.text+0x7f3): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(crtbuf3.o): In function `crtbuf3_':
/data/home/huangling/local/ioapi-3.2/ioapi/crtbuf3.f:(.text+0x91): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/crtbuf3.f:(.text+0xa8): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/crtbuf3.f:(.text+0x1a0): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(chkfil3.o): In function `chkfil3_':
/data/home/huangling/local/ioapi-3.2/ioapi/chkfil3.f90:(.text+0x1d): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/chkfil3.f90:(.text+0x36): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/chkfil3.f90:(.text+0x258f): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(rddict3.o): In function `rddict3_':
/data/home/huangling/local/ioapi-3.2/ioapi/rddict3.f90:(.text+0x84): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/rddict3.f90:(.text+0x9b): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rddict3.f90:(.text+0xaf): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rddict3.f90:(.text+0x9f5): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rddict3.f90:(.text+0xa09): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(rdiddata.o): In function `rdiddata_':
/data/home/huangling/local/ioapi-3.2/ioapi/rdiddata.f90:(.text+0x4d): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/rdiddata.f90:(.text+0x66): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdiddata.f90:(.text+0xa1): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdiddata.f90:(.text+0x1ce): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdiddata.f90:(.text+0x20e): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(rdsmatrx.o): In function `rdsmatrx_':
/data/home/huangling/local/ioapi-3.2/ioapi/rdsmatrx.f90:(.text+0x6f): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/rdsmatrx.f90:(.text+0x84): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdsmatrx.f90:(.text+0xc0): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdsmatrx.f90:(.text+0x215): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdsmatrx.f90:(.text+0x259): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(wrdict3.o): In function `wrdict3_':
/data/home/huangling/local/ioapi-3.2/ioapi/wrdict3.f90:(.text+0x41): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/wrdict3.f90:(.text+0x57): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrdict3.f90:(.text+0x6b): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrdict3.f90:(.text+0x998): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrdict3.f90:(.text+0x9ac): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(wriddata.o): In function `wriddata_':
/data/home/huangling/local/ioapi-3.2/ioapi/wrsmatrx.f90:(.text+0x55): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/wrsmatrx.f90:(.text+0x6b): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrsmatrx.f90:(.text+0x7f): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrsmatrx.f90:(.text+0x32f): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrsmatrx.f90:(.text+0x343): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(crtfil3.o): In function `crtfil3_':
/data/home/huangling/local/ioapi-3.2/ioapi/crtfil3.F90:(.text+0x4a): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/crtfil3.F90:(.text+0x65): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/crtfil3.F90:(.text+0x84): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/crtfil3.F90:(.text+0xab): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/crtfil3.F90:(.text+0x2088): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/crtfil3.F90:(.text+0x20a5): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/crtfil3.F90:(.text+0x20cf): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(wrtflag.o): In function `wrtflag_':
/data/home/huangling/local/ioapi-3.2/ioapi/wrtflag.F90:(.text+0x43): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/wrtflag.F90:(.text+0xac): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrtflag.F90:(.text+0xee): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrtflag.F90:(.text+0x562): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wrtflag.F90:(.text+0x591): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(rdatt3.o): In function `rdattc_':
/data/home/huangling/local/ioapi-3.2/ioapi/rdatt3.F90:(.text+0x43): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/rdatt3.F90:(.text+0x361): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/rdatt3.F90:(.text+0x47f): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(rdatt3.o): In function `rdatt3_':
/data/home/huangling/local/ioapi-3.2/ioapi/rdatt3.F90:(.text+0x4fd): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(wratt3.o): In function `wrattc_':
/data/home/huangling/local/ioapi-3.2/ioapi/wratt3.F90:(.text+0x46): undefined reference to `__kmpc_global_thread_num'
/data/home/huangling/local/ioapi-3.2/ioapi/wratt3.F90:(.text+0x3da): undefined reference to `__kmpc_critical'
/data/home/huangling/local/ioapi-3.2/ioapi/wratt3.F90:(.text+0x918): undefined reference to `__kmpc_end_critical'
/data/home/huangling/local/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(wratt3.o): In function `wratt3_':
/data/home/huangling/local/ioapi-3.2/ioapi/wratt3.F90:(.text+0xae4): undefined reference to `__kmpc_global_thread_num'
0.97user 0.77system 0:02.21elapsed 78%CPU (0avgtext+0avgdata 130712maxresident)k
301488inputs+136168outputs (14major+102693minor)pagefaults 0swaps
make[1]: [em_wrf] Error 1 (ignored)
make[1]: warning:  Clock skew detected.  Your build may be incomplete.
make[1]: Leaving directory `/data4/sunzhixu/WRF-CMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/main'

This is the part of the I/O API library in my config.wrf file, which is not the same as WRF-CMAQ Tutorial.
When I used the steps you told me, my config.wrf didn’t have this section.


bandaoshutiao

Although with your guidance I can get wrf.exe, I have many errors in my mylog. So I think I may not have successfully compiled the coupled model.

Many error like this

time mpif90 -f90=ifort -c -FI -132 -O3 -I /data/home/huangling/local/ioapi-3.2/ -I /data/home/huangling/local/ioapi-3.2/ioapi/fixed_src -I ../frame -I ../share -I ../phys -I ../main -I ../dyn_em -I ../external/esmf_time_f90 -I. pm3err.f
pm3err.f(57): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [M3UTILIO]
      USE M3UTILIO              ! i/o api
----------^
pm3err.f(58): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [RUNTIME_VARS]
      USE RUNTIME_VARS
----------^
pm3err.f(100): error #6404: This name does not have a type, and must have an explicit type.   [CMYPE]
      PCALLER = CALL16(1:LENSTR)//PE_STR//CMYPE
------------------------------------------^
pm3err.f(100): error #6054: A CHARACTER data type is required in this context.   [CMYPE]
      PCALLER = CALL16(1:LENSTR)//PE_STR//CMYPE
------------------------------------------^
pm3err.f(107): error #6404: This name does not have a type, and must have an explicit type.   [LOGDEV]
            WRITE( LOGDEV,91010 ) PCALLER, TRIM( ERRTXT )
-------------------^
pm3err.f(110): error #6404: This name does not have a type, and must have an explicit type.   [DT2STR]
                DTBUF = DT2STR( JDATE, JTIME )
------------------------^
pm3err.f(110): error #6054: A CHARACTER data type is required in this context.   [DT2STR]
                DTBUF = DT2STR( JDATE, JTIME )
------------------------^
pm3err.f(118): error #6404: This name does not have a type, and must have an explicit type.   [SHUT3]
            IF ( .NOT. SHUT3() ) THEN
-----------------------^
compilation aborted for pm3err.f (code 1)
0.11user 0.27system 0:00.35elapsed 108%CPU (0avgtext+0avgdata 16260maxresident)k
0inputs+264outputs (0major+33807minor)pagefaults 0swaps
make[2]: [pm3err.o] Error 1 (ignored)``

Hi bandaoshutiao,

That is a bit odd that there were errors in the compilation process but an executable was created. You can try to clean it and recompile the model:

-- clean -a
-- cp configure.wrf.backup configure.wrf
-- compile em_real >& mylog

Double check there is any error in the mylog file.

Cheers,
David

Hi bandaoshutiao,

By the way, I never received any email from you. What is your email address and I can send you a test email.

Cheers,
David

Hi David
My emial address is bandaoshutiao@gmail.com or xiaoszx1999@163.com
Would you like to send a test email to both address.
bandaoshutiao

Please, just to add that I am facing the same issue as bandaoshutiao, in the sense that I only get WRF output files for the 2-day benchmark case after the compilation of WRF-CMAQ that is described here:

Please how does one get the CCTM_ACONC files from the coupled model? Either the model code or the benchmark runscript needs to be updated to get this resolved.

Similar to bandaoshutiao, I only get WRF output files after compiling WRF-CMAQ and running the 2-day benchmark mark case. There is no output of the CCTM_ACONC files. Please help!

My question looks different from yours, you can ask wong.David.

@bambila1 issue has been resolved please see:

Hi fsidi,
I met the same error that Benchmark modle gives only wrfout files, no ACONC. I compiled the WRFv43-CMAQv533 with intel.
I have tried the solution you mentioned, and operated follow the steps for many times. But still the same error. Please help me. Thanks.
rsl.out.0000.txt (131.2 KB)
run.twoway.log.txt (35.2 KB)
rsl.error.0000.txt (131.3 KB)
wrf-cmaq_buildlog.log.txt (581.8 KB)

Hi wfy,

The output from rsl.out.0000.txt showed you ran WRF only. Right now I can think of two possibilities:

1. WRF-CMAQ coupled model was not constructed (if you can see cmaq/twoway_aq*.o, you are fine)
 2. I assume you are using the latest version of the coupled model, the variable wrf_cmaq_option in your run script could be set to 0 or 1, it should be 2 or 3

Cheers,
David

Hi David,
I indeed didn’t succeed in building the coupling model. Now it works well after recompiling.
Thank you for your help.

Hi wfy,

No problem. By the way, we have uncovered a bug in the WRF-CMAQ coupled model with CMAQ version 5.3 or later. Here is the way to fix the bug in twoway_feedback.F90:

– vi twoway_feedback.F90
– goto subroutine feedback_read
– add a new variable declaration

 integer, save :: loc_nlays

– add the following line right before “firstime = .false.”

 loc_nlays = nlays3d

– replace all occurance of NLAYS3D with loc_nlays after the
line "firstime = .false.

If you have any questions, please let me know (wong.david-c@epa.gov).

Cheers,
David

Hi David,
Thanks for your reminding.
I have changed the file twoway_feedback.F90 in CMAQv533 following your steps, and recompiled it. So I can continue to use CMAQv533 with twoway model instead of updating to v54, am I right?

Hi wfy,

It is up to you. But we recommend to use the latest version since it might have bug fixes and it has latest science updates. Please check out the 5.4 release notes for details.

Cheers,
David