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

BandDiagonalMod.F90:210: undefined reference to `dgbsv_'

I'm trying to compile cesm1.2 with pgi. It compiles everything, but fails in cesm.buildexe.csh:mpif90  -o /pic/scratch/d3e462/easm/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/pic/scratch/d3e462/easm/bld/lib/ -latm  -L/pic/scratch/d3e462/easm/bld/lib/ -lice  -L/pic/scratch/d3e462/easm/bld/lib/ -llnd  -L/pic/scratch/d3e462/easm/bld/lib/ -locn  -L/pic/scratch/d3e462/easm/bld/lib/ -lrof  -L/pic/scratch/d3e462/easm/bld/lib/ -lglc  -L/pic/scratch/d3e462/easm/bld/lib/ -lwav -L/pic/scratch/d3e462/easm/bld/lib -lcsm_share  -L/pic/scratch/d3e462/easm/bld/mct/mct -lmct -L/pic/scratch/d3e462/easm/bld/mct/mpeu -lmpeu -L/pic/scratch/d3e462/easm/bld/pio -lpio -lgptl -L/pic/apps/netcdf/4.1.3/pgi/11.8/lib/../lib -lnetcdf -lnetcdff -lpmi   -time -Wl,--allow-multiple-definition
/pic/scratch/d3e462/easm/bld/lib//liblnd.a(BandDiagonalMod.o): In function `banddiagonalmod_banddiagonal_':
/pic/projects/camdev/d3e462/CAM/code/model/cesm1_2_0/models/lnd/clm/src/clm4_5/biogeophys/BandDiagonalMod.F90:210: undefined reference to `dgbsv_'
gmake: *** [/pic/scratch/d3e462/easm/bld/cesm.exe] Error 2

dgbsv is called, but I cannot find where it should be. it looks like a standard tridiagonal solver. Is a library missing?Steve Ghan
 
I should add that this was a code combination that that has apparently not been tried before:./create_newcase  -case $CASEROOT -mach $MACH -res f19_g16 -user_compset 1850_CAM5_CLM45%BGC_CICE_POP2_RTM_SGLC_SWAV -compiler pgi ./xmlchange CLM_CONFIG_OPTS="-phys clm4_5 -bgc cn -vsoilc_centbgc on -clm4me
 

erik

Erik Kluzek
CSEG and Liaisons
Staff member
Hi Steve
You didn't say what machine this was on. But, the problem is that CLM4.5 (in any configuration) REQUIRES the LAPACK/BLAS libraries. And they MUST be linked in with it. For PGI these libraries are already part of the distribution so you just need to add "-llapack -lblas" to the link step. For another compiler you would also have to include the path to them (which means you also need to have them installed and point to the path of where they are at with the -L option).
For most Macro's files that have been created for you this means adding "-llapack -lblas" to the SLIBS+= line. You can also add that definition to your machine in scripts/Machines/config_compilers.xml (either SLIBS or ADD_SLIBS). Also look at scripts/Machines/config_machines.xml to see how it's handled for other machines.You might also try do something we HAVE done out of the box -- running a CLM45 I compset, make sure you get that to work. And then go onto doing the fully coupled case. Anyway, happing debugging.    
 

Chiyang

liyang
New Member
I encountered the same error as you when I compile CESM, I wonder how to solve this problem. Thank you a lot for your help~
 
Top