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

CESM2 build error: ERROR: BUILD FAIL: clm.buildlib failed

Status
Not open for further replies.

rjallen@ucr_edu

New Member
Hi,

I'm trying to port CESM2 to a new cluster. I get as far as ./case.build, where I get the following error:

PGF90-S-0087-Non-constant expression where constant expression required (/home/rallen/my_cesm_sandbox/components/clm/src/utils/clmfates_paraminterfaceMod.F90: 197)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (/home/rallen/my_cesm_sandbox/components/clm/src/utils/clmfates_paraminterfaceMod.F90: 197)
0 inform, 0 warnings, 2 severes, 0 fatal for parametersfromnetcdf
make: *** [clmfates_paraminterfaceMod.o] Error 2
make: *** Waiting for unfinished jobs....

ERROR: Command make complib -j 8 MODEL=clm COMPLIB=/projects/ps-rallen/rallen/cam6_runs/scratch/B_1850/bld/pgi/mvapich2/nodebug/nothreads/mct/noesmf/lib/libclm.a -f /home/rallen/my_cesm_sandbox/cime/scripts/B_1850/Tools/Makefile MACFILE=/home/rallen/my_cesm_sandbox/cime/scripts/B_1850/Macros.tscc failed with rc=2

I don't see any prior discussions of a similar error. Any suggestions on how to fix it?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
See this CTSM issue regarding pgi build:


The fix is to add the following line:

use shr_kind_mod, only : r8 => shr_kind_r8

just before this line at the top of the module:

use FatesGlobals, only : fates_log
 

Shruti

Shruti Joshi
Member
Hello,

This issue seems to be for pgi compiler but I am working on clang.
Nevertheless tried the above method. But the error still seems to exist.

cime/scripts/caseB5/Tools/Makefile:888: recipe for target 'clmfates_paraminterfaceMod.o' failed
rm ncdio_pio.F90 dynVarMod.F90 restUtilMod.F90 initInterp2dvar.F90 array_utils.F90 dynVarTimeUninterpMod.F90 dynVarTimeInterpMod.F90

err:

cat: Srcfiles: No such file or directory

make: *** [clmfates_paraminterfaceMod.o] Error 1
make: *** Waiting for unfinished jobs....

ERROR: Command make complib -j 4 MODEL=clm COMPLIB=cime/projects/scratch/caseB5/bld/aocc/openmpi/nodebug/nothreads/mct/noesmf/lib/libclm.a -f cime/scripts/caseB5/Tools/Makefile MACFILE=cime/scripts/caseB5/Macros.amd failed with rc=2

Any help would be appreciated
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
The original post indicated that the pgi compiler was being used.
I see you've posted on the porting forum, hopefully they can help you there.
 

Shruti

Shruti Joshi
Member
Hello,

Regarding my previous post for B1850 compset with clang.
The suggestion to add the following line:
"use shr_kind_mod, only : r8 => shr_kind_r8 "

Did not resolve the error for me. It was not able to identify the data type.
Instead adding the below line to clmfates_paraminterfaceMod.F90 worked for me.
"use shr_kind_mod, only: r8 => shr_kind_r8, i8 => shr_kind_i4"

Does this seem like an acceptable patch for clang to work with B1850?
 
Status
Not open for further replies.
Top