Main menu

Navigation

Problem building a case with CLM5 on an intel machine

7 posts / 0 new
Last post
kamingfung@...
Problem building a case with CLM5 on an intel machine


Hi, I am trying to run CLM5 on my institute's cluster but I encountered a problem when trying to invoke case.build.

This is the error messages when running case.build:

 


Building case in directory /users/student/$HOME/CLM/clm5.0/test50

sharedlib_only is False

model_only is False

Generating component namelists as part of build

Creating component namelists

   Calling /users/student/$HOME/CLM/clm5.0/cime/src/components/data_comps/datm/cime_config/buildnml

   Calling /users/student/$HOME/CLM/clm5.0/cime_config/buildnml

   Calling /users/student/$HOME/CLM/clm5.0/cime/src/components/stub_comps/sice/cime_config/buildnml

   Calling /users/student/$HOME/CLM/clm5.0/cime/src/components/stub_comps/socn/cime_config/buildnml

   Calling /users/student/$HOME/CLM/clm5.0/components/mosart//cime_config/buildnml

File not found: frivinp_rtm = "/users/student/$HOME/CESM/input_data/rof/mosart/MOSART_routing_Global_0.5x0.5_c170601.nc", will attempt to download in check_input_data phase

   Running /users/student/$HOME/CLM/clm5.0/components/cism//cime_config/buildnml

 

   Calling /users/student/$HOME/CLM/clm5.0/cime/src/components/stub_comps/swav/cime_config/buildnml

   Calling /users/student/$HOME/CLM/clm5.0/cime/src/components/stub_comps/sesp/cime_config/buildnml

   Calling /users/student/$HOME/CLM/clm5.0/cime/src/drivers/mct/cime_config/buildnml

File not found: lnd2glc_fmapname = "cpl/gridmaps/fv1.9x2.5/map_fv1.9x2.5_TO_gland4km_aave.170429.nc", will attempt to download in check_input_data phase

File not found: lnd2glc_smapname = "cpl/gridmaps/fv1.9x2.5/map_fv1.9x2.5_TO_gland4km_blin.170429.nc", will attempt to download in check_input_data phase

File not found: glc2lnd_fmapname = "cpl/gridmaps/gland4km/map_gland4km_TO_fv1.9x2.5_aave.170429.nc", will attempt to download in check_input_data phase

File not found: glc2lnd_smapname = "cpl/gridmaps/gland4km/map_gland4km_TO_fv1.9x2.5_aave.170429.nc", will attempt to download in check_input_data phase

Finished creating component namelists

Building gptl with output to file /users/student/$HOME/CLM/run_dir/test50/bld/gptl.bldlog.180213-061727

Building mct with output to file /users/student/$HOME/CLM/run_dir/test50/bld/mct.bldlog.180213-061727

Building pio with output to file /users/student/$HOME/CLM/run_dir/test50/bld/pio.bldlog.180213-061727

Building csm_share with output to file /users/student/$HOME/CLM/run_dir/test50/bld/csm_share.bldlog.180213-061727

Component csm_share build complete with 1 warnings

ERROR: BUILD FAIL: buildlib.csm_share failed, cat /users/student/$HOME/CLM/run_dir/test50/bld/csm_share.bldlog.180213-061727

 

It looks like something wrong when building csm_share and here is the content in csm_share.bldlog.180213-061727:

 

/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads <> /users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads <> /users/student/$HOME/CLM/clm5.0/test50

installdir is /users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/mct/noesmf/c1a1l1i1o1r1g1w1e1

libdir is /users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/mct/noesmf/c1a1l1i1o1r1g1w1e1/csm_share

mpif90  -c -I. -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/include -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/mct/noesmf/c1a1l1i1o1r1g1w1e1/include -I/opt/share/netcdf-4.3.2.intel/include -I/opt/share/mpich-3.1.1.intel/include -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/include -I/users/student/$HOME/CLM/clm5.0/cime/src/share/util -I/users/student/$HOME/CLM/clm5.0/cime/src/share/include -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/include -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/mct/noesmf/include -I. -I/users/student/$HOME/CLM/clm5.0/test50/SourceMods/src.share -I/users/student/$HOME/CLM/clm5.0/cime/src/drivers/mct/shr -I/users/student/$HOME/CLM/clm5.0/cime/src/components/xcpl_models/xshare -I/users/student/$HOME/CLM/clm5.0/cime/src/components/data_comps/dshare -I/users/student/$HOME/CLM/clm5.0/cime/src/share/util -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/dsfmt_f03 -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/kissvec -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/mt19937 -I/users/student/$HOME/CLM/clm5.0/cime/src/share/esmf_wrf_timemgr -I/users/student/$HOME/CLM/run_dir/test50/bld/lib/include -fp-model source -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs  -O2  -DNUM_COMP_INST_ATM=1 -DNUM_COMP_INST_LND=1 -DNUM_COMP_INST_OCN=1 -DNUM_COMP_INST_ICE=1 -DNUM_COMP_INST_GLC=1 -DNUM_COMP_INST_WAV=1 -DNUM_COMP_INST_ROF=1 -DNUM_COMP_INST_ESP=1 -DNDEBUG -DHAVE_MPI -DPIO1 -DFORTRANUNDERSCORE -DNO_R16 -DLinux -DCPRINTEL  -free  -DUSE_CONTIGUOUS= /users/student/$HOME/CLM/clm5.0/cime/src/share/esmf_wrf_timemgr/ESMF_AlarmClockMod.F90

mpif90  -c -I. -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/include -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/mct/noesmf/c1a1l1i1o1r1g1w1e1/include -I/opt/share/netcdf-4.3.2.intel/include -I/opt/share/mpich-3.1.1.intel/include -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/include -I/users/student/$HOME/CLM/clm5.0/cime/src/share/util -I/users/student/$HOME/CLM/clm5.0/cime/src/share/include -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/include -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/mct/noesmf/include -I. -I/users/student/$HOME/CLM/clm5.0/test50/SourceMods/src.share -I/users/student/$HOME/CLM/clm5.0/cime/src/drivers/mct/shr -I/users/student/$HOME/CLM/clm5.0/cime/src/components/xcpl_models/xshare -I/users/student/$HOME/CLM/clm5.0/cime/src/components/data_comps/dshare -I/users/student/$HOME/CLM/clm5.0/cime/src/share/util -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/dsfmt_f03 -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/kissvec -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/mt19937 -I/users/student/$HOME/CLM/clm5.0/cime/src/share/esmf_wrf_timemgr -I/users/student/$HOME/CLM/run_dir/test50/bld/lib/include -fp-model source -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs  -O2  -DNUM_COMP_INST_ATM=1 -DNUM_COMP_INST_LND=1 -DNUM_COMP_INST_OCN=1 -DNUM_COMP_INST_ICE=1 -DNUM_COMP_INST_GLC=1 -DNUM_COMP_INST_WAV=1 -DNUM_COMP_INST_ROF=1 -DNUM_COMP_INST_ESP=1 -DNDEBUG -DHAVE_MPI -DPIO1 -DFORTRANUNDERSCORE -DNO_R16 -DLinux -DCPRINTEL  -free  -DUSE_CONTIGUOUS= /users/student/$HOME/CLM/clm5.0/cime/src/share/util/shr_strconvert_mod.F90

/users/student/$HOME/CLM/clm5.0/cime/src/externals/genf90/genf90.pl /users/student/$HOME/CLM/clm5.0/cime/src/share/util/shr_assert_mod.F90.in > shr_assert_mod.F90

mpicc   -c -I. -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/include -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/mct/noesmf/c1a1l1i1o1r1g1w1e1/include -I/opt/share/netcdf-4.3.2.intel/include -I/opt/share/mpich-3.1.1.intel/include -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/include -I/users/student/$HOME/CLM/clm5.0/cime/src/share/util -I/users/student/$HOME/CLM/clm5.0/cime/src/share/include -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/include -I/users/student/$HOME/CLM/run_dir/test50/bld/intel/mpich/nodebug/nothreads/mct/noesmf/include -I. -I/users/student/$HOME/CLM/clm5.0/test50/SourceMods/src.share -I/users/student/$HOME/CLM/clm5.0/cime/src/drivers/mct/shr -I/users/student/$HOME/CLM/clm5.0/cime/src/components/xcpl_models/xshare -I/users/student/$HOME/CLM/clm5.0/cime/src/components/data_comps/dshare -I/users/student/$HOME/CLM/clm5.0/cime/src/share/util -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/dsfmt_f03 -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/kissvec -I/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/mt19937 -I/users/student/$HOME/CLM/clm5.0/cime/src/share/esmf_wrf_timemgr -I/users/student/$HOME/CLM/run_dir/test50/bld/lib/include -O2 -fp-model precise  -DNUM_COMP_INST_ATM=1 -DNUM_COMP_INST_LND=1 -DNUM_COMP_INST_OCN=1 -DNUM_COMP_INST_ICE=1 -DNUM_COMP_INST_GLC=1 -DNUM_COMP_INST_WAV=1 -DNUM_COMP_INST_ROF=1 -DNUM_COMP_INST_ESP=1 -DNDEBUG -DHAVE_MPI -DPIO1 -DFORTRANUNDERSCORE -DNO_R16 -DLinux -DCPRINTEL  -O3 -fp-model fast /users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/kissvec/kissvec.c

/users/student/$HOME/CLM/clm5.0/cime/src/externals/genf90/genf90.pl /users/student/$HOME/CLM/clm5.0/cime/src/share/util/shr_frz_mod.F90.in > shr_frz_mod.F90

icc: command line warning #10121: overriding '-fp-model precise' with '-fp-model fast'

/users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/kissvec/kissvec.c(21): error: identifier "restrict" is undefined

  void kiss_rng(uint32_t seed1[restrict], uint32_t seed2[restrict],

                               ^

 

compilation aborted for /users/student/$HOME/CLM/clm5.0/cime/src/share/RandNum/src/kissvec/kissvec.c (code 2)

make: *** [kissvec.o] Error 2

make: *** Waiting for unfinished jobs....

rm shr_assert_mod.F90 shr_frz_mod.F90

make complib -j 4 MODEL=csm_share COMPLIB=libcsm_share.a USER_CPPDEFS="  -DNUM_COMP_INST_ATM=1 -DNUM_COMP_INST_LND=1 -DNUM_COMP_INST_OCN=1 -DNUM_COMP_INST_ICE=1 -DNUM_COMP_INST_GLC=1 -DNUM_COMP_INST_WAV=1 -DNUM_COMP_INST_ROF=1 -DNUM_COMP_INST_ESP=1" -f /users/student/$HOME/CLM/clm5.0/test50/Tools/Makefile  returned non-zero exit status 2

I googled it. I guess one of the possibility is that my compiler is not capable of interpreting the C99-style usage of "restrict" in kissvec.c. Other possible cause maybe I didn't do it right to specify my compilers or I am using wrong compilers in Macros.make under my case folder, i.e. "test50" in this case. I appended my Macros.make below:

CPPDEFS+= -DFORTRANUNDERSCORE -DNO_R16 -DLinux -DCPRINTEL 

 

SLIBS+=# USERDEFINED $(shell $(NETCDF_PATH)/bin/nc-config --flibs)

 

CFLAGS:= -O2 -fp-model precise 

 

CONFIG_ARGS:=

 

CXX_LDFLAGS:= -cxxlib 

 

CXX_LINKER:=FORTRAN

 

ESMF_LIBDIR:=

 

FC_AUTO_R8:= -r8 

 

FFLAGS:= -fp-model source -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs 

 

FFLAGS_NOOPT:= -O0 

 

FIXEDFLAGS:= -fixed -132 

 

FREEFLAGS:= -free 

 

MPICC:= mpicc  

 

MPICXX:= mpicxx 

 

MPIFC:= mpif90 

 

MPI_LIB_NAME:= mpich

 

MPI_PATH:= /opt/share/mpich2-1.5rc3

 

NETCDF_PATH:= /opt/share/netcdf-4.3.2.intel

 

PNETCDF_PATH:=

 

SCC:= icc 

 

SCXX:= g++ 

 

SFC:= ifort 

 

SUPPORTS_CXX:=FALSE

 

 

ifeq ($(compile_threaded), true) 

 

   FFLAGS += -openmp 

 

   LDFLAGS += -openmp 

 

   CFLAGS += -openmp 

 

endif

 

 

 

ifeq ($(MODEL), pop2) 

 

   CPPDEFS += -D_USE_FLOW_CONTROL 

 

endif

 

 

ifeq ($(DEBUG), FALSE) 

 

   FFLAGS += -O2 

 

endif

 

 

 

ifeq ($(DEBUG), TRUE) 

 

   FFLAGS += -O0 -g -check uninit -check bounds -check pointers -fpe0 

 

 

endif

 

I have been trying to fix it for two days but still, don't have a clue what went wrong. Would anyone please give some directions/hints on how to solve this issue?

 

Thank you so much. Our machine is running on SUSE Linus version 3.0.1010-0.47.67-default with gcc version 4.3.4.
jedwards

You are using the intel compiler - but you did not report the version - perhaps it's very old?   You might consider trying the gcc / gfortran compilers instead.   

Please include compiler version numbers in your reply.  

CESM Software Engineer

kamingfung@...
Thanks. We are using: gcc version 4.3.4 mpich2.1.5 ncdf4.3.2 Perl5.20.1 Cmake3.2.2
jedwards

According to the output you originally posted that is not correct, you are using an intel compiler (icc, ifort) and I am guessing that its a quite old one.

CESM Software Engineer

kamingfung@...
case.build works after I changed the following lines in my Macros.make: CFLAGS:= -std=gnu99 SCC:= gcc SCXX:= g++ Thank you so much.
jedwards

You need a proper machine definition in config_machines.xml or in .cime/config_machines.xml, although your fix in Macros has solved the immediate problem you are left with a mix of gnu and intel definition that may have unintended consequences. 

CESM Software Engineer

kamingfung@...
Thanks for the heads-up. The model seems running well with the new Macros.make. I am working on adding a machine definition in config_machines.xml for our machine.
Log in or register to post comments

Who's new

  • wurjicnip@...
  • 479266557@...
  • fmoyano@...
  • asayeed@...
  • nbren12@...