Hi,
I am getting errors while compiling the CCTM. I am attaching my log file for reference. And here is my errors:
/home/hanlu_sun/CMAQ-main/lib/x86_64/intel/ioapi/lib/libnetcdf.a (libnchdf5_la-hdf5attr.o): in function 'NC4_HDF5_rename_att ’ in:
hdf5attr.c:(.text+0x29f): undefined reference to ‘H5Adelete’
hdf5attr.c:(.text+0x377): undefined reference to ‘H5Adelete’
/home/hanlu_sun/CMAQ-main/lib/x86_64/intel/ioapi/lib/libnetcdf.a (libnchdf5_la-hdf5attr.o): in function 'NC4_HDF5_del_att ’ in:
hdf5attr.c:(.text+0x5ce): undefined reference to ‘H5Adelete’
/home/hanlu_sun/CMAQ-main/lib/x86_64/intel/ioapi/lib/libnetcdf.a (libnchdf5_la-hdf5create.o): in function 'NC4_create ':
hdf5create.c:(.text+0x76): undefined reference to ‘H5Pclose’
hdf5create.c:(.text+0x1bb): undefined reference to ‘H5check_version’
hdf5create.c:(.text+0x1e1): undefined reference to ‘H5check_version’
hdf5create.c:(.text+0x23e): undefined reference to ‘H5open’
hdf5create.c:(.text+0x245): undefined reference to ‘H5P_CLS_FILE_ACCESS_g’
hdf5create.c:(.text+0x24c): undefined reference to ‘H5Pcreate’
hdf5create.c:(.text+0x276): undefined reference to ‘H5Pset_fclose_degree’
hdf5create.c:(.text+0x2c6): undefined reference to ‘H5Pset_cache’
hdf5create.c:(.text+0x2e3): undefined reference to ‘H5Pset_libver_bounds’
hdf5create.c:(.text+0x2f6): undefined reference to ‘H5open’
hdf5create.c:(.text+0x2fd): undefined reference to ‘H5P_CLS_FILE_CREATE_g’
hdf5create.c:(.text+0x304): undefined reference to ‘H5Pcreate’
hdf5create.c:(.text+0x321): undefined reference to ‘H5Pset_obj_track_times’
hdf5create.c:(.text+0x33f): undefined reference to ‘H5Pset_link_creation_order’
hdf5create.c:(.text+0x35d): undefined reference to ‘H5Pset_attr_creation_order’
hdf5create.c:(.text+0x41d): undefined reference to ‘H5Pset_fapl_core’
hdf5create.c:(.text+0x444): undefined reference to ‘H5Fcreate’
hdf5create.c:(.text+0x48c): undefined reference to ‘H5Gopen2’
hdf5create.c:(.text+0x4ab): undefined reference to ‘H5Pclose’
hdf5create.c:(.text+0x4ba): reference to ‘H5Pclose’ undefined
hdf5create.c:(.text+0x4f9): reference to ‘H5Fcreate’ undefined
make: *** [CCTM_v54.exe] error 1
ERROR while running make command
if ( ! 0 ) then
mv Makefile Makefile.intel
mv: “Makefile” and “Makefile.intel” are the same file.
if ( -e Makefile.intel && -e Makefile ) rm Makefile
rm Makefile
ln -s Makefile.intel Makefile
endif
if ( 0 != 0 ) then
if ( -e /home/hanlu_sun/CMAQ-main/CCTM/scripts/BLD_CCTM_v54_intel/CCTM_v54.cfg ) then
echo >>> previous CCTM_v54.cfg exists, re-naming to CCTM_v54.cfg.old <<<
previous CCTM_v54.cfg exists, re-naming to CCTM_v54.cfg.old <<<
mv /home/hanlu_sun/CMAQ-main/CCTM/scripts/BLD_CCTM_v54_intel/CCTM_v54.cfg /home/hanlu_sun/CMAQ-main/CCTM/scripts/BLD_CCTM_v54_intel/CCTM_v54.cfg.old
endif
mv CCTM_v54.cfg.bld /home/hanlu_sun/CMAQ-main/CCTM/scripts/BLD_CCTM_v54_intel/CCTM_v54.cfg
if ( 0 ) then
exit
And i used:
hdf5-1.10.6
zlib-1.2.8
netcdf-c-4.7.4
netcdf-fortran-4.5.3
ioapi-3.2
intel 2022 compiler
And here is the environment settings in my config_cmaq.csh script:
#> Intel fortran compiler…
case intel:
#> I/O API, netCDF Library Locations -- used in WRF-CMAQ
setenv NETCDF /home/hanlu_sun/CMAQ_models/tools/netcdf4 # Note please combine netCDF-C & Fortran Libraries
setenv IOAPI /home/hanlu_sun/CMAQ_models/tools/ioapi32
setenv WRF_ARCH # [1-75]
#> I/O API, netCDF, and MPI Library Locations -- used in CMAQ
setenv IOAPI_INCL_DIR /home/hanlu_sun/CMAQ_models/tools/ioapi32/ioapi/fixed_src #> I/O API include header files
setenv IOAPI_LIB_DIR /home/hanlu_sun/CMAQ_models/tools/ioapi32/Linux2_x86_64ifort #> I/O API libraries
setenv NETCDF_LIB_DIR /home/hanlu_sun/CMAQ_models/tools/netcdf4/lib #> netCDF C directory path
setenv NETCDF_INCL_DIR /home/hanlu_sun/CMAQ_models/tools/netcdf4/include #> netCDF C directory path
setenv NETCDFF_LIB_DIR /home/hanlu_sun/CMAQ_models/tools/netcdf4/lib #> netCDF Fortran directory path
setenv NETCDFF_INCL_DIR /home/hanlu_sun/CMAQ_models/tools/netcdf4/include #> netCDF Fortran directory path
setenv MPI_INCL_DIR /apps/intel/oneapi/mpi/2021.6.0/include #> MPI Include directory path
setenv MPI_LIB_DIR /apps/intel/oneapi/mpi/2021.6.0/lib #> MPI Lib directory path
#> Compiler Aliases and Flags
#> set the compiler flag -qopt-report=5 to get a model optimization report in the build directory with the optrpt extension
setenv myFC mpiifort
setenv myCC icc
setenv myFSTD "-O3 -fno-alias -mp1 -fp-model source -ftz -simd -align all -xHost -vec-guard-write -unroll-aggressive"
setenv myDBG "-O0 -g -check bounds -check uninit -fpe0 -fno-alias -ftrapuv -traceback"
setenv myLINK_FLAG "" #-simd" openMP not supported w/ CMAQ
setenv myFFLAGS "-fixed -132"
setenv myFRFLAGS "-free"
setenv myCFLAGS "-O2"
setenv extra_lib ""
It is worth noting that setting setenv myLINK_FLAG to “-qopenmp” still gives the same error.