Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

undefined reference to `ddot_' when building CESM1.2.2

wadewei

Wade Wei
Member
Hi everyone,

I used to run F1850 compset with my CESM1.2.2. Today when I was trying out -compset F_1850_CN_GLC_CISM1, build failed with the following message. A bit of googling tells me this has something to do with lapack but didn't yield much else. I am using intel compiler and mkl 2016u2 FYI. Does anyone have a clue? Thank you very much!

Wade


I have mpiifort -o /home/wade/cesmcasedata/archive/test_CISM__1014/bld/cesm.exe ccsm_comp_mod.o ccsm_driver.o mrg_mod.o seq_avdata_mod.o seq_diag_mct.o seq_domain_mct.o seq_flux_mct.o seq_frac_mct.o seq_hist_mod.o seq_map_esmf.o seq_map_mod.o seq_mctext_mod.o seq_rest_mod.o -L/home/wade/cesmcasedata/archive/test_CISM__1014/bld/lib/ -latm -L/home/wade/cesmcasedata/archive/test_CISM__1014/bld/lib/ -lice -L/home/wade/cesmcasedata/archive/test_CISM__1014/bld/lib/ -llnd -L/home/wade/cesmcasedata/archive/test_CISM__1014/bld/lib/ -locn -L/home/wade/cesmcasedata/archive/test_CISM__1014/bld/lib/ -lrof -L/home/wade/cesmcasedata/archive/test_CISM__1014/bld/lib/ -lglc -L/home/wade/cesmcasedata/archive/test_CISM__1014/bld/lib/ -lwav -L/home/wade/cesmcasedata/archive/test_CISM__1014/bld/glc/lib/ -lglimmercismfortran -L/home/wade/cesmcasedata/archive/test_CISM__1014/bld/intel/impi/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -lcsm_share -L/home/wade/cesmcasedata/archive/test_CISM__1014/bld/intel/impi/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/opt/netcdf/4.3.2-intel16/lib -lnetcdf -L/opt/intel/2016u2/compilers_and_libraries/linux/mpi/bin64/lib -lmpi -L/opt/hdf5/1.8.18-intel16/lib -lhdf5 -L/opt/netcdf/4.3.2-intel16/lib -lnetcdf -lnetcdff
/home/wade/cesmcasedata/archive/test_CISM__1014/bld/glc/lib//libglimmercismfortran.a(dcgs.f.o): In function `dcgs_':
dcgs.f:(.text+0x54b): undefined reference to `ddot_'
dcgs.f:(.text+0x9ab): undefined reference to `ddot_'
dcgs.f:(.text+0xcb5): undefined reference to `daxpy_'
dcgs.f:(.text+0xd3f): undefined reference to `daxpy_'
/home/wade/cesmcasedata/archive/test_CISM__1014/bld/glc/lib//libglimmercismfortran.a(dcgs.f.o): In function `isdcgs_':
dcgs.f:(.text+0x1178): undefined reference to `dnrm2_'
dcgs.f:(.text+0x1196): undefined reference to `dnrm2_'
dcgs.f:(.text+0x11c5): undefined reference to `dnrm2_'
dcgs.f:(.text+0x1260): undefined reference to `dnrm2_'
dcgs.f:(.text+0x12c4): undefined reference to `dnrm2_'
/home/wade/cesmcasedata/archive/test_CISM__1014/bld/glc/lib//libglimmercismfortran.a(dcgs.f.o):dcgs.f:(.text+0x1442): more undefined references to `dnrm2_' follow
/home/wade/cesmcasedata/archive/test_CISM__1014/bld/glc/lib//libglimmercismfortran.a(dcgs.f.o): In function `dsdcgs_':
dcgs.f:(.text+0x1ca5): undefined reference to `ddot_'
dcgs.f:(.text+0x215a): undefined reference to `ddot_'
dcgs.f:(.text+0x2465): undefined reference to `daxpy_'
dcgs.f:(.text+0x24f4): undefined reference to `daxpy_'
 

wadewei

Wade Wei
Member
Added -mkl=cluster to config_compilers.xml directly will result in mct compilation to fail from the beginning.

vi test_CISM_1014/bld/intel/impi/nodebug/nothreads/mct/config.log
configure:2398: checking whether the C compiler works
configure:2420: icc -O2 -fp-model precise -xHost -DLINUX -DNDEBUG -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_R16 -DLINUX -DCPRINTEL -DHAVE_SLASHPROC -I.. -I. -I/home/wade/cesmcasedata/archive/test_CISM_1014/bld/intel/impi/nodebug/nothreads/include -I/home/wade/cesmcasedata/archive/test_CISM_1014/bld/intel/impi/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -I/opt/netcdf/4.3.2-intel16/include -I/opt/intel/2016u2/compilers_and_libraries/linux/mpi/bin64/include -I/home/wade/cesmcasedata/archive/test_CISM_1014/bld/intel/impi/nodebug/nothreads/include -I/home/wade/cesm1_2_2/models/csm_share/shr -L/opt/hdf5/1.8.18-intel16/lib -lhdf5 -L/opt/netcdf/4.3.2-intel16/lib -lnetcdf -lnetcdff conftest.c /opt/intel/2016/compilers_and_libraries_2016/linux/mkl/lib/intel64/libmkl_blas95_lp64.a /opt/intel/2016/compilers_and_libraries_2016/linux/mkl/lib/intel64/libmkl_lapack95_lp64.a -L/opt/intel/2016/compilers_and_libraries_2016/linux/mkl/lib/intel64 -liomp5 -lpthread -lm -ldl -mkl=cluster >&5
/opt/intel/2016/compilers_and_libraries_2016/linux/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.so: undefined reference to `MPI_Waitall'
/opt/intel/2016/compilers_and_libraries_2016/linux/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.so: undefined reference to `MPI_Abort'
/opt/intel/2016/compilers_and_libraries_2016/linux/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.so: undefined reference to `MPI_Waitany'
/opt/intel/2016/compilers_and_libraries_2016/linux/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.so: undefined reference to `MPI_Wtime'
 

wadewei

Wade Wei
Member
The compiler should not be icc it should be mpicc or mpiicc
Emmm I took a look at previous F-compset cases that were working, they seem to have the same icc -o test here at the beginning of config.log.
MPICC were indeed set to mpiicc in config_compilers.xml. I wonder though, what the SCC option in that file is meant for.

Below is the machine-specific contents in config_compilers.xml

<compiler MACH="paleo">
<MPICC>mpiicc</MPICC>
<MPIFC>mpiifort</MPIFC>
<MPICXX>mpiicpc</MPICXX>
<SFC>ifort</SFC>
<SCC>icc</SCC>
<SCXX>icpc</SCXX>
<ADD_FFLAGS> -xHost </ADD_FFLAGS>
<ADD_CFLAGS> -xHost </ADD_CFLAGS>
<ADD_LDFLAGS>-L/opt/hdf5/1.8.18-intel16/lib -lhdf5 -L/opt/netcdf/4.3.2-intel16/lib -lnetcdf -lnetcdff</ADD_LDFLAGS>
<NETCDF_PATH>/opt/netcdf/4.3.2-intel16</NETCDF_PATH>
<ADD_SLIBS>/opt/intel/2016/compilers_and_libraries_2016/linux/mkl/lib/intel64/libmkl_blas95_lp64.a /opt/intel/2016/compilers_and_libraries_2016/linux/mkl/lib/intel64/libmkl_lapack95_lp64.a -L/opt/intel/2016/compilers_and_libraries_2016/linux/mkl/lib/intel64 -liomp5 -lpthread -lm -ldl</ADD_SLIBS>
<MPI_PATH>/opt/intel/2016u2/compilers_and_libraries/linux/mpi/bin64</MPI_PATH>
</compiler>
 

jedwards

CSEG and Liaisons
Staff member
Ah I see. I think that you added the mkl=cluster to LDFLAGS, it should be SLIBS instead.
 
Top