Installing --disable-netcdf-4 --disable-dap NEVER works and instructions in CMAQ documentation regarding this seem misleading

Hi again,
I am getting a failure in the following step when I try to build the fortran library.

make[1]: Entering directory `/proj/ie/proj/CMAS/CMAQ/CMAQv5.3_branch_UNC10/openmpi_3.1.4_intel_18.2/library/netcdf-fortran-4.4.5/nf_test'
make  nf_test tst_f77_v2       ftest tst_f90
make[2]: Entering directory `/proj/ie/proj/CMAS/CMAQ/CMAQv5.3_branch_UNC10/openmpi_3.1.4_intel_18.2/library/netcdf-fortran-4.4.5/nf_test'
DHAVE_CONFIG_H -I. -I.. -I../libsrc  -I../fortran -I../fortran -I/proj/ie/proj/CMAS/CMAQ/CMAQv5.3_branch_UNC10/openmpi_3.1.4_intel_18.2/library/netcdf-c-4.7.0/netcdf-c-4.7.0-intel18.2/include -I../fortran   -c -o test_get.o test_get.F
make[2]: DHAVE_CONFIG_H: Command not found

If I skip the make check test, and do the make install, the library is built anyway.

I am going to try and build the I/O API library, then build CMAQ Benchmark case using this newly built netcdf C and netcdf Fortran library.

I’ve noticed when I try to build the m3tools, that the netcdff and netcdf libraries are out of order. If I go into the m3tools directory and edit the Makefile to use the following, then issue a make in that directory, then the tools build successfully.
LIBS = -L${OBJDIR} -lioapi -lnetcdff -lnetcdf (OMPLIBS) (ARCHLIB) $(ARCHLIBS)

That’s right. I also see make check failing in netcdf-fortran, and ignoring make check, the install seems building libraries, but I was getting error in I/O API later. I will try with this line again.

That line is already in the makefile under /m3tools.
LIBS = -L${OBJDIR} -lioapi -lnetcdff -lnetcdf (OMPLIBS) (ARCHLIB) $(ARCHLIBS)

It didn’t work for me!

I have been working on it for a long time - turns out that not the atmospheric science and chemistry but the core computer knowledge is essential! I hope someone will help on this someday soon. For
WRF model, for example, there are nice instructions on getting started, and they worked in my first trial. Unfortunately, here I am not able so far.

Sorry!

I’ve made more edits to the tutorial.
Can you send me the log file output from your I/O API makefile?
Is that where you are now, or were you able to successfully build the I/O API library?

Thanks. Here is the error in Makefile, with ifort.
cd /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort; ifort -auto -warn notruncated_source -Bstatic -static-intel -c -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DAVOID_FLUSH=1 -DBIT32=1 -O3 -unroll -stack_temps -safe_cray_ptr -convert big_endian -assume byterecl -traceback -xHost -openmp -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DAVOID_FLUSH=1 -DBIT32=1 -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/ioapi /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/ioapi/m3utilio.f
ifort: command line error: option ‘-openmp’ is not supported. Please use the replacement option ‘-qopenmp’
make: *** [m3utilio.mod] Error 1
make: Nothing to be done for `fixed_src’.

Not sure, where should the replacement go?

Look at OMPFLAGS in your ioapi-3.2/ioapi/Makeinclude.Linux2_x86_64ifort: Intel changed the flag between different versions of the compiler. It used to be (v15 or earlier) -openmp; for v16 and later, it preferred -qopenmp but still accepted -openmp; and then in the latest version it accepts -qopenmp only.

It makes it difficult for software authors who don’t know which version their clients are using, or whose clients may actually be (for various reasons, including both testing and avoiding bugs in specific compiler versions for particular programs) using multiple versions of the compiler.

Thank you. ‘make’ in /ioapi seems working but NOT in /m3tools. The error is
cd /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort; ifort -auto -warn notruncated_source -Bstatic -static-intel -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/ioapi -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DAVOID_FLUSH=1 -DBIT32=1 -O3 -unroll -stack_temps -safe_cray_ptr -convert big_endian -assume byterecl -traceback -xHost -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DAVOID_FLUSH=1 -DBIT32=1 -c /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/m3tools/airs2m3.f
cd /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort; ifort -auto -warn notruncated_source -Bstatic -static-intel airs2m3.o -L/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -lioapi -lnetcdff -lnetcdf -qopenmp -Bstatic -o airs2m3
/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libnetcdff.a(nf_var1io.o): In function nf_put_var1_int64_': /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/fortran/nf_var1io.F90:354: multiple definition ofnf_put_var1_int64_’
/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x71360): first defined here
/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libnetcdff.a(nf_var1io.o): In function nf_get_var1_real': /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/fortran/nf_var1io.F90:733: multiple definition ofnf_get_var1_int64_’
/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x71380): first defined here
/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libnetcdff.a(nf_varaio.o): In function nf_put_vara_int64_': /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/fortran/nf_varaio.F90:440: multiple definition ofnf_put_vara_int64_’
/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x713a0): first defined here
/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libnetcdff.a(nf_varaio.o): In function nf_get_vara_double': /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/fortran/nf_varaio.F90:933: multiple definition ofnf_get_vara_int64_’
/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x713c0): first defined here
make: *** [airs2m3] Error 1

Edit your ioapi/Makeinclude.Linux2_x86_64ifort so that ARCHFLAGS is
ARCHFLAGS =
-DIOAPI_NCF4=1
-DAUTO_ARRAYS=1
-DF90=1 -DFLDMN=1
-DFSTR_L=int
-DIOAPI_NO_STDOUT=1
-DAVOID_FLUSH=1 -DBIT32=1

and then make clean; make in your ioapi directory

1 Like

Thanks! No errors encountered with that.

Thanks for the feedback. I/ve updated the I/O API installation to note that this change is needed if the netCDF is built without the --disable-netcdf-4.

Thanks. But, thus built I/O API is failing in mcip make. (This is mcipv5.0 and the cmaq is v5.3). The output showing error is pasted below.

make[1]: Entering directory `/home/ytang/jjoshi/cmaq_test/CMAQv5.3/PREP/mcip/src’

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c const_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c const_pbl_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c coord_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c ctmvars_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c date_time_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c date_pack_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c files_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c lucats_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c mcipparm_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c metinfo_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c metvars_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c netcdf_io_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c vgrd_mod.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c xvars_mod.f90

make[1]: Leaving directory `/home/ytang/jjoshi/cmaq_test/CMAQv5.3/PREP/mcip/src’

make[1]: Entering directory `/home/ytang/jjoshi/cmaq_test/CMAQv5.3/PREP/mcip/src’

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c mcip.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c alloc_ctm.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c alloc_met.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c alloc_x.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c bcldprc_ak.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c blddesc.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c chkwpshdr.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c chkwrfhdr.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c close_files.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c comheader.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c comheader_lufrac.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c comheader_mos.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c comheader_soi.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c ctmout.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c ctmproc.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c dealloc_ctm.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c dealloc_met.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c dealloc_x.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c detangle_soil_px.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c e_aerk.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c dynflds.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c getluse.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c getmet.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c getpblht.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c getpsih.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c getsdt.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c graceful_stop.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c gridout.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c gridproc.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c init_ctm.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c init_io.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c init_met.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c init_x.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c julian.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c layht.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c ll2xy_lam.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c ll2xy_lam_sec.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c ll2xy_lam_tan.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c ll2xy_merc.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c ll2xy_ps.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c locate.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c mapfac_lam.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c mapfac_merc.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c mapfac_ps.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c metgrid2ctm.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c metvars2ctm.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c outclog.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c outcm3io.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c outglog.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c outgm3io.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c outncf.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c outncfbdy.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c outncfglobal.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c pblsup.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c ptemp.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c pvs.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c qsat.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c rdwrfem.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c readnml.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c resistcalc.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c setgriddefs.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c setup.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c setup_wrfem.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c sfclayer.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c statflds.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c vertarys.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c vertnhy_wrf.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c vstamp.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c vtemp.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c wind.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c wrfemopts.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c wrgdesc.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c xy2ll_lam.f90

ifort -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -c xy2ll_merc.f90

ifort -o mcip.exe -FR -O3 -traceback -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/include -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort mcip.o alloc_ctm.o alloc_met.o alloc_x.o bcldprc_ak.o blddesc.o chkwpshdr.o chkwrfhdr.o close_files.o comheader.o comheader_lufrac.o comheader_mos.o comheader_soi.o ctmout.o ctmproc.o dealloc_ctm.o dealloc_met.o dealloc_x.o detangle_soil_px.o e_aerk.o dynflds.o getluse.o getmet.o getpblht.o getpsih.o getsdt.o graceful_stop.o gridout.o gridproc.o init_ctm.o init_io.o init_met.o init_x.o julian.o layht.o ll2xy_lam.o ll2xy_lam_sec.o ll2xy_lam_tan.o ll2xy_merc.o ll2xy_ps.o locate.o mapfac_lam.o mapfac_merc.o mapfac_ps.o metgrid2ctm.o metvars2ctm.o outclog.o outcm3io.o outglog.o outgm3io.o outncf.o outncfbdy.o outncfglobal.o pblsup.o ptemp.o pvs.o qsat.o rdwrfem.o readnml.o resistcalc.o setgriddefs.o setup.o setup_wrfem.o sfclayer.o statflds.o vertarys.o vertnhy_wrf.o vstamp.o vtemp.o wind.o wrfemopts.o wrgdesc.o xy2ll_lam.o xy2ll_merc.o const_mod.o const_pbl_mod.o coord_mod.o ctmvars_mod.o date_time_mod.o date_pack_mod.o files_mod.o lucats_mod.o mcipparm_mod.o metinfo_mod.o metvars_mod.o netcdf_io_mod.o vgrd_mod.o xvars_mod.o -qopenmp -L/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort -lioapi -L/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/lib -lnetcdff -lnetcdf

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libnetcdff.a(nf_nc4.o): In function `nf_def_var_chunking_’:

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/fortran/nf_nc4.f90:1402: undefined reference to `nc_def_var_chunking_ints’

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libnetcdff.a(nf_nc4.o): In function `nf_inq_var_chunking_’:

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/fortran/nf_nc4.f90:1448: undefined reference to `nc_inq_var_chunking_ints’

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libnetcdff.a(nf_nc4.o): In function `nf_set_chunk_cache_’:

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/fortran/nf_nc4.f90:2018: undefined reference to `nc_set_chunk_cache_ints’

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libnetcdff.a(nf_nc4.o): In function `nf_get_chunk_cache_’:

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/fortran/nf_nc4.f90:2040: undefined reference to `nc_get_chunk_cache_ints’

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libnetcdff.a(nf_nc4.o): In function `nf_set_var_chunk_cache_’:

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/fortran/nf_nc4.f90:2073: undefined reference to `nc_set_var_chunk_cache_ints’

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/ioapi-3.2/Linux2_x86_64ifort/libnetcdff.a(nf_nc4.o): In function `nf_get_var_chunk_cache_’:

/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/fortran/nf_nc4.f90:2100: undefined reference to `nc_get_var_chunk_cache_ints’

make[1]: *** [mcip.exe] Error 1

make[1]: Leaving directory `/home/ytang/jjoshi/cmaq_test/CMAQv5.3/PREP/mcip/src’

make: *** [all] Error 2

Any hints, please?

Thanks

More info on I/O API

ident init3.o
init3.o:
Id: init3.F90 120 2019-06-21 14:18:20Z coats
ident libioapi.a
libioapi.a:
Id:: m3utilio.f 107 2018-07-26 14:05:39Z coats
Id:: modgctp.f90 108 2018-09-07 18:59:37Z coats
Id: modwrfio.f90 4 2017-06-20 17:43:15Z coats
Id: modmpasfio.f90 67 2017-11-22 21:07:51Z coats
Id: modmpasfio.f90 67 2017-11-22 21:07:51Z coats
Id:: modatts3.F90 96 2018-04-04 21:17:59Z coats
Id: init3.F90 120 2019-06-21 14:18:20Z coats
ident m3stat
m3stat:
Id:: m3stat.f 117 2019-06-15 14:56:29Z coats
Id: init3.F90 120 2019-06-21 14:18:20Z coats
Id:: m3utilio.f 107 2018-07-26 14:05:39Z coats
Id:: modatts3.F90 96 2018-04-04 21:17:59Z coats

As a test to see what netCDF has built: go to the "libnetcdf.a" directory, and do commands that search libnetcdf.a for the missing symbols, e.g.

nm libnetcdf.a | grep nc_get_var_chunk_cache_ints

If it’s in the library, this should generate a line like

0000000000001170 T nc_get_var_chunk_cache_ints

[This sounds like netCDF-4 stuff, which should have been excluded…]

Under your netCDF[-fortran] directories, find the commands nc-config and nf-config, and run them.
Then use what you find out about needed libraries to fix up your Makefiles. You may as well expect that to be somewhat messy ;-(

Thank you.
That didn’t find the symbol.
softwares/cmaq_libsicc19.0/netcdfs_icc19.0_formcip/lib> $ nm libnetcdf.a | grep nc_get_var_chunk_cache_ints

didn’t give anything!

That then suggests that your libnetcdf.a and libnetcdff.a builds are inconsistent.

What does the nf-config say?

Thanks.

In the directory cmaq_libsicc19.0/netcdf-fortran-4.5.1-icc19.0/bin (it has only nf-config)

$ ./nf-config --all

This netCDF-Fortran 4.5.1 has been built with the following features:

–cc -> icc
–cflags -> -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1-icc19.0/include -DNDEBUG -DpgiFortran -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-c-4.7.1-icc19.0/include

–fc -> ifort
–fflags -> -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1-icc19.0/include
–flibs -> -L/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1-icc19.0/lib -lnetcdff -L/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-c-4.7.1-icc19.0/lib -lnetcdf -lnetcdf -lm
–has-f90 ->
–has-f03 -> yes

–has-nc2 -> yes
–has-nc4 -> yes

–prefix -> /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1-icc19.0
–includedir-> /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1-icc19.0/include
–version -> netCDF-Fortran 4.5.1

And in the netcdf-c install directory
softwares/cmaq_libsicc19.0/netcdf-c-4.7.1-icc19.0/bin> $ ./nc-config --all

This netCDF 4.7.1 has been built with the following features:

–cc -> icc
–cflags -> -I/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-c-4.7.1-icc19.0/include -DNDEBUG -DpgiFortran
–libs -> -L/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-c-4.7.1-icc19.0/lib -lnetcdf
–static -> -lm

–has-c++ -> no
–cxx ->

–has-c++4 -> no
–cxx4 ->

–has-fortran -> no
–has-dap -> no
–has-dap2 -> no
–has-dap4 -> no
–has-nc2 -> yes
–has-nc4 -> no
–has-hdf5 -> no
–has-hdf4 -> no
–has-logging -> no
–has-pnetcdf -> no
–has-szlib ->
–has-cdf5 -> yes
–has-parallel4 -> no
–has-parallel -> no

–prefix -> /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-c-4.7.1-icc19.0
–includedir -> /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-c-4.7.1-icc19.0/include
–libdir -> /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-c-4.7.1-icc19.0/lib
–version -> netCDF 4.7.1

Just to give more information, in case if I did something wrong in the installation of netcdfs, here are the environment variables set for netcdf installation.
export CPPFLAGS="-DNDEBUG -DpgiFortran"

export CFLAGS ="-g -O"

export FFLAGS="-O2 -mp -recursive"

export CC=icc

export CXX=icpc

export FC=ifort

export F77=ifort

export F90=ifort

For netcdf-c
./configure --prefix=$NCDIR --disable-netcdf-4 --disable-dap

For netcdf-fortran
export LD_LIBRARY_PATH={NCDIR}/lib:{LD_LIBRARY_PATH}

export NFDIR={DIR}/netcdf{vers_nf}-icc19.0
CPPFLAGS="CPPFLAGS -I{NCDIR}/include" \

LDFLAGS="-L${NCDIR}/lib" \

./configure --prefix=${NFDIR}

Note the
–has-nc4 -> yes
vs
–has-nc4 -> no

That is the problem.

oh, I see. But don’t know how to fix that! I have been trying on it for months!

With the above environment flags in netcdf installation, I had skipped the make check in fortran because that NEVER succeeded in the latest versions, and build IOAPI and used that to run benchmark CMAQ (ICON,BCON and CCTM) successfully. But in mcip, I encountered the problem of undefined reference mentioned earlier. This sort of error appears when doing ‘make check’ in netcdf-fortran, a part of which is pasted below. Inquiring with unidata last time indicated a need to install with netcdf-4 enabled, but due to CMAQ documentations saying netcdf-4 disabled, I am confused heavily.

make check in netcdf-fortran-4.5.1 Error looks like this

/bin/sh …/libtool --tag=F77 --mode=link ifort -I…/fortran -O2 -mp -recursive -L/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_fortry/lib -o nf_test f03lib_f_interfaces.o test_get.o test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o f03lib.o …/fortran/libnetcdff.la -lnetcdf -lm

libtool: link: ifort -I…/fortran -O2 -mp -recursive -o .libs/nf_test f03lib_f_interfaces.o test_get.o test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o f03lib.o -L/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_fortry/lib …/fortran/.libs/libnetcdff.so /home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_fortry/lib/libnetcdf.so -lm -mp -Wl,-rpath -Wl,/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdfs_icc19.0_fortry/lib

ifort: command line remark #10148: option ‘-mp’ not supported

ifort: command line remark #10148: option ‘-mp’ not supported

…/fortran/.libs/libnetcdff.so: undefined reference to `nc_get_chunk_cache_ints’

…/fortran/.libs/libnetcdff.so: undefined reference to `nc_set_var_chunk_cache_ints’

…/fortran/.libs/libnetcdff.so: undefined reference to `nc_def_var_chunking_ints’

…/fortran/.libs/libnetcdff.so: undefined reference to `nc_set_chunk_cache_ints’

…/fortran/.libs/libnetcdff.so: undefined reference to `nc_get_var_chunk_cache_ints’

…/fortran/.libs/libnetcdff.so: undefined reference to `nc_inq_var_chunking_ints’

make[3]: *** [nf_test] Error 1

make[3]: Leaving directory `/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/nf_test’

make[2]: *** [check-am] Error 2

make[2]: Leaving directory `/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/nf_test’

make[1]: *** [check] Error 2

make[1]: Leaving directory `/home/ytang/jjoshi/softwares/cmaq_libsicc19.0/netcdf-fortran-4.5.1/nf_test’

Are you sure you could ever install netcdf-c-4.7.0 by using --disable-dap --disable-netcdf-4 ? Did anybody ever been successful?

####### Not understanding why you are giving version 4.7.0 in the example, which does not even work at all with disable-dap!
See the example link from unidata documenting such a problem. https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg14665.html

I have tried several times for a few months, and never got it working. I have contacted the unidata
netcdf person some days ago, and they said it’s not going to work finally. But you are saying use the latest versions of the libraries and config this way (-disable-dap disable-netcdf-4). Again CMAQ documentation uses the word ‘should be installed this way’. They are contradictory things from two sides.

I thought it might be the compiler issue with gcc and tried for many versions of gcc too! Then desperately requested for ‘intel’ compiler, which the CMAQ loves the most, but the problem is the same!

A mysterious secret!

Carlie, thanks for your help above. I am using another set of netcdf versions (a bit older) and didn’t get errors regarding undefined references. However there is a segmentation error at the end. I am using WRF-ARW v4.1.2 output without urban canopy model. Do you have any hints for this?

The error with MCIP run

Compiler is set to intel
Fri Sep 20 21:45:36 UTC 2019

 This program uses the EPA-AREAL/MCNC-EnvPgms/BAMS Models-3      
 I/O Applications Programming Interface, [I/O API] which is      
 built on top of the netCDF I/O library (Copyright 1993, 1996    
 University Corporation for Atmospheric Research/Unidata         
 Program) and the PVM parallel-programming library (from         
 Oak Ridge National Laboratory).                                 
 Copyright (C) 1992-2002 MCNC,                                   
 (C) 1992-2013 Carlie J. Coats, Jr.,                             
 (C) 2003-2012 Baron Advanced Meteorological Systems, LLC, and   
 (C) 2014-2019 UNC Institute for the Environment.                
 Released under the GNU LGPL  License, version 2.1.  See URL     
                                                                 
     https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html     
                                                                 
 for conditions of use.                                          
                                                                 
 ioapi-3.2: $Id: init3.F90 120 2019-06-21 14:18:20Z coats $
 Version with PARMS3.EXT/PARAMETER::MXVARS3= 2048
 netCDF version 4.6.1 of Sep 20 2019 20:21:18 $
  
  
 EXECUTION_ID: mcip

==============================================================================

              US EPA COMMUNITY MULTISCALE AIR QUALITY MODEL
                METEOROLOGY-CHEMISTRY INTERFACE PROCESSOR

                       MCIP V5.0 FROZEN 07/15/2019

==============================================================================

  • SUBROUTINE SETUP_WRFEM - READING WRF HEADER
    WRF GRID DIMENSIONS (X,Y,Z) 259 259 41

*** SUBROUTINE: SETUP_WRFEM
*** DID NOT FIND FRACTIONAL LAND USE IN wrfout
*** AND DID NOT FIND GEOGRID FILE
*** – WILL NOT USE FRACTIONAL LAND USE DATA



                    USER OPTIONS AND GRID DEFINITIONS

Output start date = 2018-07-07-01:00:00.0000
Output end date = 2018-07-07-23:00:00.0000
Output interval = 60 minutes

LPV = 0: Will not calculate and output 3D potential vorticity
LWOUT = 0: Will not output vertical velocity from the met model
LUVBOUT = 1: Will output u- and v-component winds on B grid
IOFORM = 1: Will write output in Models-3 I/O API

LAI was found in the meteorology input file

FRACTIONAL LAND USE was NOT found in the meteorology input file

MONIN-OBUKHOV LENGTH was NOT found in the meteorology input file

MONIN-OBUKHOV LENGTH will be recomputed by MCIP (Only for WRF P-X LSM)

AERODYNAMIC AND STOMATAL RESISTANCE was NOT found in the meteorology input file

2-m TEMPERATURE was found in the meteorology input file

2-m MIXING RATIO was found in the meteorology input file

VEGETATION FRACTION was found in the meteorology input file

10-m WIND was found in the meteorology input file

CANOPY WETNESS was found in the meteorology input file

ROUGHNESS LENGTH was NOT found in the meteorology input file

SOIL MOISTURE, TEMPERATURE, AND TYPE was found in the meteorology input file

SOIL MOISTURE, TEMPERATURE, AND TYPE will be in the output file

TURBULENT KINETIC ENERGY was NOT found in the meteorology input file

URBAN CANOPY MODEL (WRF ONLY) was NOT used in the meteorology model

3D RESOLVED CLOUD FRACTION was found in the meteorology input file

ADDITIONAL PX SURFACE VARIABLES will be in the output file

ADDITIONAL KF-RAD 3D VARIABLES will NOT be in the output file

HYBRID VERTICAL COORDINATE was used in the meteorology model

Met domain dimensions (col, row, lay): 259 259 41
MCIP X domain dimensions (col, row, lay): 258 258 41
Output domain dimensions (col, row, lay): 256 256 41

Output grid resolution: 1.00000000000000 km
Window domain origin on met domain (col,row): 1 , 1
Window domain far corner on met domain (col,row): 259 , 259

Cells and points for diagnostic prints
LPRT_COL LPRT_ROW 128 128
LPRT_XCOL LPRT_XROW 129 129
LPRT_METX LPRT_METY 129 129

IOAPI header variables:
GDTYP3D 2
GDNAM3D 2016_12SE1
P_ALP3D 32.300
P_BET3D 33.000
P_GAM3D -111.500
XCENT3D -111.500
YCENT3D 40.000
XORIG3D -132500.000
YORIG3D -935500.000
XCELL3D 1000.000
YCELL3D 1000.000
VGTYP3D -9999
VGTOP3D 5000.000

VGLVS3D   1.00000  0.99381  0.98595  0.97601  0.96356  0.94809
          0.92912  0.90619  0.87894  0.84721  0.81108  0.77095
          0.72753  0.68176  0.63450  0.58603  0.53665  0.48673
          0.43689  0.39165  0.35060  0.31333  0.27952  0.24882
          0.22097  0.19568  0.17274  0.15191  0.13301  0.11585
          0.10028  0.08615  0.07333  0.06169  0.05112  0.04154
          0.03283  0.02494  0.01777  0.01126  0.00536  0.00000

~~~ Processing meteorology for time = 2018-07-07-01:00:00.0000

U -0.3413 -0.6829 -0.8904 -1.0790 -1.2949
-1.5928 -1.9279 -2.3105 -2.7722 -3.5137
-4.9093 -6.9382 -9.0232 -11.2037 -12.1158
-10.5417 -7.2926 -5.7732 -5.4775 -6.4246
-9.1952 -12.2011 -12.4709 -9.5510 -6.1529
-4.9474 -5.7200 -6.0662 -6.1494 -6.4138
-6.5718 -6.8064 -8.0048 -9.3045 -9.7426
-9.5906 -9.3267 -9.2962 -9.5351 -9.9029
-10.4335

V 3.7987 4.5160 4.6825 4.6908 4.5877
4.3591 4.0247 3.5676 3.0220 2.5487
2.0218 1.1188 0.0471 -0.5618 -0.4220
0.8871 2.2768 1.3489 0.3138 -0.0179
-0.0391 0.1022 -0.7541 -3.3621 -4.1624
-2.9387 -0.5831 0.5845 0.6949 0.7974
1.3457 1.7699 1.6245 1.3260 1.0999
0.9277 0.6779 0.3536 -0.0171 -0.3926
-0.6413

W -0.0087 -0.0160 -0.0226 -0.0306 -0.0473
-0.0665 -0.0886 -0.1036 -0.0968 -0.0714
-0.0513 -0.0463 -0.0570 -0.0904 -0.1311
-0.1290 -0.0515 0.0366 0.0447 0.0370
0.0598 0.0684 0.0432 0.0033 -0.0238
-0.0224 -0.0121 -0.0074 -0.0024 0.0117
0.0284 0.0294 0.0114 -0.0076 -0.0111
-0.0066 -0.0036 -0.0072 -0.0046 0.0021
0.0059 0.0024

PH 0.0000 51.5225 116.5211 198.3145 300.4917
426.8784 581.3512 767.2670 987.0905 1241.4652
1528.7261 1844.8402 2183.0764 2533.9565 2887.7078
3237.9006 3599.9192 4002.7556 4432.0015 4842.9121
5226.2427 5589.0688 5953.2017 6308.7622 6640.5234
6948.3521 7241.6284 7529.1274 7818.1406 8114.5156
8317.6689 8412.8311 8427.7305 8421.9980 8437.6230
8506.1982 8638.1084 8837.7188 9091.2432 9383.8438
9705.6572 10048.1699

PHB 4628.5947 5112.2598 5729.4644 6513.0532 7501.4644
8738.2656 10270.8271 12147.6465 14414.3701 17108.6445
20254.4355 23857.1328 27900.9961 32349.8301 37173.7773
42405.9023 48082.2891 54241.8867 60898.3125 67468.1250
73957.0234 80368.5000 86704.3984 92965.4297 99151.4922
105261.0938 111255.6875 117115.3750 122840.1641 128430.0234
133995.5938 139561.1719 145126.7344 150692.3125 156257.8906
161823.4688 167389.0469 172954.6250 178520.1875 184085.7656
189651.3281 195216.8906

P 1006.5234 995.7344 981.8125 964.7031 943.2422
914.0156 881.6719 838.6250 787.8594 727.5469
658.9844 581.7422 498.6172 412.3867 326.9766
253.4570 194.7109 143.9062 100.9180 67.1523
42.2305 24.5234 12.5215 5.6797 2.6914
1.8633 1.5117 1.4199 1.2168 1.0146
0.8711 0.7480 0.7676 0.6553 0.4834
0.4160 0.2900 0.3071 0.2827 0.1963
0.0186

PB 94288.3984 93660.3906 92866.3438 91869.9609 90631.3672
89109.3359 87264.7891 85065.7578 82493.3359 79547.5859
76251.7891 72653.3672 68820.4766 64825.3555 60708.6523
56486.0391 52177.0547 47814.5078 43617.8789 39768.4453
36235.9219 32993.8438 30018.7148 27289.3828 24786.7617
22499.9199 20420.7305 18533.6738 16820.9961 15266.5889
13855.8213 12575.4219 11413.3428 10358.6484 9401.4180
8532.6445 7744.1514 7028.5234 6379.0259 5789.5479
5254.5435

THETA 317.8172 318.0180 318.0758 318.1028 318.1248
318.1498 318.1805 318.2233 318.2714 318.3367
318.4530 318.6309 318.8216 318.9382 319.6508
323.0564 326.9431 329.5624 331.9473 333.8318
335.9681 339.0196 341.5381 343.1305 344.4819
346.0043 347.7827 349.8054 352.0085 354.6735
357.8097 362.6458 371.4570 383.3573 397.8620
413.6353 430.3053 446.5354 462.1608 477.5097
492.6377

T 313.4709 313.0668 312.3577 311.4167 310.2245
308.7382 306.9148 304.7048 302.0625 298.9677
295.4406 291.4985 287.1290 282.2970 277.5964
274.7641 271.7780 267.1507 262.0613 256.6372
251.4678 247.0168 242.2001 236.7775 231.2596
225.9439 220.8995 216.1136 211.5324 207.3100
203.4286 200.5445 199.8049 200.5717 202.4722
204.7476 207.1788 209.1192 210.5232 211.5711
212.3081

QVAPOR 0.0103 0.0095 0.0093 0.0091 0.0091
0.0090 0.0090 0.0090 0.0089 0.0089
0.0089 0.0088 0.0086 0.0086 0.0072
0.0030 0.0013 0.0011 0.0009 0.0007
0.0005 0.0004 0.0002 0.0001 0.0001
0.0001 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000

QCLOUD 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000

QRAIN 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000

QICE 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000

QSNOW 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000

QGRAUP 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000

CLDFRA 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000
MU 653.3350 Pa
MUB 89565.1641 Pa
T2 313.6362 K
Q2 0.0108 kg kg-1
U10 -0.2782 m s-1
V10 3.2450 m s-1
PSFC 95568.7188 Pa
MAPFAC_M 1.0000 dimensionless
MAPFAC_U 1.0000 dimensionless
MAPFAC_V 1.0000 dimensionless
HGT 471.8241 m
RAINC 0.0000 cm
RAINNC 0.0000 cm
SWDOWN 273.5231 W m-2
GLW 436.5367 W m-2
XLAT 32.7550 degrees_north
XLAT_U 32.7550 degrees_north
XLAT_V 32.7505 degrees_north
XLONG -111.5535 degrees_east
XLONG_U -111.5588 degrees_east
XLONG_V -111.5535 degrees_east
LU_INDEX 10 category
LANDMASK 1.0000 category
HFX -5.0189 W m-2
LH 172.7593 W m-2
UST 0.2762 m
QFX 0.0001 kg m-2 s-1
PBLH 942.7836 m
LAI_PX 1.5000 m2 m-2
CANWAT 0.0000 kg m-2
VEGF_PX 0.5000 m2 m-2
ISLTYP 8 category
SMOIS 1 0.1660 m3 m-3
SMOIS 2 0.2427 m3 m-3

SMOIS 0.1660 0.2427
TSLB 1 313.4286 K
TSLB 2 307.4170 K

TSLB 313.4286 307.4170
TSK 313.4286 K
ALBEDO 0.1900 fraction
SNOWC 0.0000 category
SEAICE 0.0000 fraction
SNOWH 0.0000 m
WSAT_PX 0.4835 m3 m-3
WFC_PX 0.3055 m3 m-3
WWLT_PX 0.2165 m3 m-3
CSAND_PX 0.0000 1
FMSAND_PX 0.1000 1
CLAY_PX 0.3400 1
ZNT 0.1200 m
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
mcip.exe 000000000070FE13 Unknown Unknown Unknown
libpthread-2.17.s 00002AC1E5A155D0 Unknown Unknown Unknown
mcip.exe 0000000000437681 ctmproc_ 759 ctmproc.f90
mcip.exe 0000000000405D75 MAIN__ 171 mcip.f90
mcip.exe 0000000000405C12 Unknown Unknown Unknown
libc-2.17.so 00002AC1E5E483D5 __libc_start_main Unknown Unknown
mcip.exe 0000000000405B29 Unknown Unknown Unknown
Error running mcip

However, running mcip on the benchmark data (e.g. subset_wrfout_d01_2016-07-02_00:00:00) works fine.