CCTM compilation errorr (**ERROR** while running make command)

Hi,
I am getting errors while compiling the CCTM. I am attaching my log file for reference. And here is my errors:


/usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/lib/x86_64/intel2017.1.132/ioapi/lib/libnetcdf.a(libnetcdf4_la-nc4var.o): In function NC4_def_var': /usr/local/usrapps/fgarcia4/downloads/netcdf-c-intel2017/download/netcdf-c-4.6.1/libsrc4/nc4var.c:554: undefined reference to H5Tget_native_type’
/usr/local/usrapps/fgarcia4/downloads/netcdf-c-intel2017/download/netcdf-c-4.6.1/libsrc4/nc4var.c:568: undefined reference to H5Tget_class' /usr/local/usrapps/fgarcia4/downloads/netcdf-c-intel2017/download/netcdf-c-4.6.1/libsrc4/nc4var.c:665: undefined reference to H5Dclose’
/usr/local/usrapps/fgarcia4/downloads/netcdf-c-intel2017/download/netcdf-c-4.6.1/libsrc4/nc4var.c:671: undefined reference to H5Gunlink' /usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/lib/x86_64/intel2017.1.132/ioapi/lib/libnetcdf.a(libnetcdf4_la-nc4var.o): In function NC4_rename_var’:
/usr/local/usrapps/fgarcia4/downloads/netcdf-c-intel2017/download/netcdf-c-4.6.1/libsrc4/nc4var.c:1622: undefined reference to H5Gmove' /usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/lib/x86_64/intel2017.1.132/ioapi/lib/libnetcdf.a(libnetcdf4_la-nc4attr.o): In function NC4_rename_att’:
/usr/local/usrapps/fgarcia4/downloads/netcdf-c-intel2017/download/netcdf-c-4.6.1/libsrc4/nc4attr.c:463: undefined reference to H5Adelete' /usr/local/usrapps/fgarcia4/downloads/netcdf-c-intel2017/download/netcdf-c-4.6.1/libsrc4/nc4attr.c:456: undefined reference to H5Adelete’
/usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/lib/x86_64/intel2017.1.132/ioapi/lib/libnetcdf.a(libnetcdf4_la-nc4attr.o): In function NC4_del_att': /usr/local/usrapps/fgarcia4/downloads/netcdf-c-intel2017/download/netcdf-c-4.6.1/libsrc4/nc4attr.c:566: undefined reference to H5Adelete’
make: *** [CCTM_v521.exe] Error 1
ERROR while running make command

endif
else if ( 0 ) then
endif
mv Makefile Makefile.intel2017.1.132
mv: ‘Makefile’ and ‘Makefile.intel2017.1.132’ are the same file
if ( -e Makefile.intel2017.1.132 && -e Makefile ) rm Makefile
rm Makefile
ln -s Makefile.intel2017.1.132 Makefile
if ( 0 != 0 ) then
if ( -e /usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/CCTM/scripts/BLD_CCTM_v521_intel2017.1.132/CCTM_v521.cfg ) then
echo >>> previous CCTM_v521.cfg exists, re-naming to CCTM_v521.cfg.old <<<

previous CCTM_v521.cfg exists, re-naming to CCTM_v521.cfg.old <<<
mv /usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/CCTM/scripts/BLD_CCTM_v521_intel2017.1.132/CCTM_v521.cfg /usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/CCTM/scripts/BLD_CCTM_v521_intel2017.1.132/CCTM_v521.cfg.old
endif
mv CCTM_v521.cfg.bld /usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/CCTM/scripts/BLD_CCTM_v521_intel2017.1.132/CCTM_v521.cfg
exit


And here is the environment settings in my config_cmaq.csh script:


#> I/O API, netCDF, and MPI library locations

    setenv IOAPI_MOD_DIR /usr/local/usrapps/fgarcia4/ioapi-3.1-intel2017.1.132/Linux2_x86_64ifort  #> I/O API precompiled modules
    setenv IOAPI_INCL_DIR /usr/local/usrapps/fgarcia4/ioapi-3.1-intel2017.1.132/ioapi   #> I/O API include header files
    setenv IOAPI_LIB_DIR /usr/local/usrapps/fgarcia4/ioapi-3.1-intel2017.1.132/Linux2_x86_64ifort  #> I/O API libraries
    setenv NETCDF_LIB_DIR /usr/local/usrapps/fgarcia4/netcdf-c-4.6.1-intel2017/lib #> netCDF directory path
    setenv NETCDF_INCL_DIR /usr/local/usrapps/fgarcia4/netcdf-c-4.6.1-intel2017/include #> netCDF directory path
    setenv MPI_LIB_DIR /opt/intel/compilers_and_libraries_2018/linux/mpi/intel64/bin    #> MPI directory path
    setenv MPI_INC /opt/intel/compilers_and_libraries_2018/linux/mpi/intel64/include    #> MPI Include file directory path # I have added it
    setenv INC_MPI /opt/intel/compilers_and_libraries_2018/linux/mpi/intel64/include 
    
    #> Compiler Aliases and Flags
    setenv myFC mpiifort
    setenv myCC icc       
    setenv myFSTD "-O3 -fno-alias -mp1 -fp-model source"
    setenv myDBG  "-O0 -g -check bounds -check uninit -fpe0 -fno-alias -ftrapuv -traceback"
    setenv myLINK_FLAG -qopenmp
    setenv myFFLAGS "-fixed -132 -O1 -qoverride-limits -fno-alias -mp1 -fp-model precise"   
    setenv myFRFLAGS "-free -O1 -fno-alias -mp1 -fp-model precise"  
    setenv myCFLAGS "-O2"
    #setenv extra_lib "-lcurl"
    setenv extra_lib "-L/$H5DIR/lib -lhdf5_hl -lhdf5 -lz -L/$CURLDIR/lib -lcurl"  
    setenv mpi_lib -lmpich    #> No Library specification needed for mpiifort
                         #> -lmpich for mvapich 
                         #> -lmpi for openmpi # James 5.0.1 script

It would be great if anyone can help me. I badly need help. I appreciate your help.
Thanks,
Sadia

Sadiabuild_cctm_log.txt (211.7 KB)

It is strongly recommended (https://www.cmascenter.org/ioapi/documentation/all_versions/html/AVAIL.html#ncf4)
that you build netCDF for yourself using the same compilers and flags used for your I/O API installation, and using the netCDF-configure flags
--disable-netcdf-4 --disable-dap
This would seem to be something other than the recommended netCDF configuration.

Thank you so much for your response.

Hi sadia, I am facing same problem here. Did you solved it with enabled --dap and netcdf-4? or you installed netcdf again by disabling --dap?

My problems were solved when I applied a different version of ioapi library and different compiler. You can also check with updated version of ioapi. Hope that would be helpful. Best of luck.

Sadia

1 Like

Thank you. I am using pgi 18.10 compiler and ioapi 3.1. Now I will use ioapi 3.2 as you suggested!

Hi Sadia, I tried by changing ioapi version. I used:
Ioapi 3.2
netcdf 4.6.1
pgi 18.10
cmaq 5.2.1
but still got those error during cctm build!

Do you think I should use dap disabled netcdf version?

Hi Uzzal,

Sorry to know that. I really not that much knowledge about that and I did not use pgi. I used Ioapi 3.2, netcdf4.6.1, but intel2018 compiler. Did you properly checked the path of the mpi and other libraries and include files in the cmaq_config.csh and cctm_run.csh scripts? As far I could remember I had to change some configuration of my cctm_rum script. But I am really don’t know whether the version is dap disabled or not. Sorry, I could not help you in this regard.

Thank you Sadia. I solved my problem by using netcdf 3.6.3 along with my other configuration.

See https://www.cmascenter.org/ioapi/documentation/all_versions/html/AVAIL.html#ncf4:

NetCDF Version 4.1 and later also split the Fortran interfaces into a separate library libnetcdff.a As a result, much compatiblity with the infrastructure (Makefiles, etc.) is broken: you must modify all Makefiles, replacing -lnetcdf with -lnetcdff -lnetcdf . If you don’t build netCDF as indicated above, you will need additional libraries that may be discovered by running the netCDF commands

nc-config --libs
nf-config --libs

Alternatively, netCDF 3.something did not split out separate Fortran and C libraries…