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

CAM5 standalone on supported NERSC machine

I'd like to build CAM5 (the version distributed with CESM1.0.6) on NERSC's Hopper, which is a supported machine for CESM. Since I'm on Hopper it was a breeze to get CESM running, but as far as I can tell the scripts for CAM5 standalone don't interact with the "supported machine" architecture that took care of all machine-specific details for me when building CESM. (I need CAM5 standalone because I ultimately want to run in aquaplanet mode, which I understand is not supported from CESM scripts. For now, I'd be happy to get the model built with any compset.)

I'm new to this, so I doubt the problems I'm running into are very difficult to solve. I've pasted below the output from my failed attempt. Any pointers will be greatly appreciated.

Thanks,
Jake

>./configure -dyn fv -hgrid 10x15 -nospmd -nosmp -test

Issuing command to the CICE configure utility:
/global/u1/s/seeley/second_project/cesm1_0_6/models/ice/cice/bld/configure -hgrid 10x15 -cice_mode prescribed -ntr_aero 0 -ntasks 1 -nthreads 1 -cache config_cache_cice.xml -cachedir /global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld
configure done.
MCT configure is done.
creating /global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/Filepath
creating /global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/Makefile
creating /global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/config.h
creating /global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/config_cache.xml
Looking for a valid GNU make... using gmake
Testing for Fortran 90 compatible compiler... **** FAILED ****
Issued the command:
gmake -f /global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/Makefile test_fc 2>&1

The output was:
/global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/mkSrcfiles > /global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/configure-tests/Srcfiles
/global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/mkDepends Filepath Srcfiles > /global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/configure-tests/Depends
pgf90 -c -Mfree -I. -I/global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/configure-tests -I/opt/cray/netcdf/4.3.0/PGI/121/include -I/opt/cray/netcdf/4.3.0/PGI/121/include -I/global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/mct-serial/mct -I/global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/mct-serial/mpeu -I/global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/mct-serial/mpi-serial -DNO_SHR_VMATH -DSEQ_MCT -DFORTRANUNDERSCORE -DCO2A -DMAXPATCH_PFT=numpft+1 -DLSMLAT=1 -DLSMLON=1 -DPLON=24 -DPLAT=19 -DPLEV=30 -DPCNST=25 -DPCOLS=16 -DPTRM=1 -DPTRN=1 -DPTRK=1 -DSTAGGERED -DCCSMCOUPLED -Dcoupled -Dncdf -DNCAT=1 -DNXGLOB=24 -DNYGLOB=19 -DNTR_AERO=0 -DBLCKX=24 -DBLCKY=19 -DMXBLCKS=1 -DDUST -DPROGSSLT -DMODAL_AERO -DMODAL_AERO_3MODE -D_USEBOX -D_NETCDF -DLINUX -DNO_R16 -i4 -Mdalign -Mextend -byteswapio -gopt -O2 -Mvect=nosse -Kieee -DHIDE_MPI -D_MPISERIAL -DNO_MPI2 test_fc.F90
pgf90 -o test_fc test_fc.o -Wl,-rpath /opt/cray/netcdf/4.3.0/PGI/121/lib -lnetcdff -L/global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/mct-serial/mct -lmct -L/global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/mct-serial/mpeu -lmpeu -L/global/u1/s/seeley/second_project/cesm1_0_6/models/atm/cam/bld/mct-serial/mpi-serial -lmpi-serial
File with unknown suffix passed to linker: /opt/cray/netcdf/4.3.0/PGI/121/lib
/usr/bin/ld: cannot find -lnetcdff
/usr/bin/ld: cannot find -lmct
/usr/bin/ld: cannot find -lmpeu
/usr/bin/ld: cannot find -lmpi-serial
gmake: *** [test_fc] Error 2
 

jedwards

CSEG and Liaisons
Staff member
Hi Jacob, First Aquaplanet mode is supported in CESM in the 1.2,2 release.  You should use that unless there is a compeling reason to stick with 1.0.6.   As far as the error above you have: -Wl,-rpath /opt/cray/netcdf/4.3.0/PGI/121/lib  but it should be -L /opt/cray/netcdf/4.3.0/PGI/121/lib  it also looks like mct and mpi-serial builds didn't complete but I cannot tell from what you sent.
 

eaton

CSEG and Liaisons
It is certainly best to use cesm1_2_2 if there is no reason to use an older model version.  The configure/build you were attempting works out of the box in that code base.
Just for the record, here are the bug fixes for the cesm1_0_6 version of CAM's Makefile that caused the problems you encountered:At line 162 of models/atm/cam/bld/Makefile.in change
    $(LINKER) -o $@ test_fc.o $(LDFLAGS)
to
    $(LINKER) -o $@ test_fc.o

At line 164 of models/atm/cam/bld/Makefile.in change
    $(LINKER) -o $@ test_nc.o -L$(LIB_NETCDF) -lnetcdf $(LDFLAGS)
to
    $(LINKER) -o $@ test_nc.o -L$(LIB_NETCDF) -lnetcdff -lnetcdf

At line 407 of models/atm/cam/bld/Makefile.in change
  LDFLAGS       := -Wl,-rpath $(LIB_NETCDF)
to
  LDFLAGS       := -Wl,-rpath=$(LIB_NETCDF)

At line 619 of models/atm/cam/bld/Makefile.in change
  FFLAGS  += -DHIDE_MPI -D_MPISERIAL -DNO_MPI2
to
  FFLAGS  += -DHIDE_MPI -D_MPISERIAL -DNO_MPI2 -DNO_MPIMOD

 

santos

Member
If you're running aquaplanet using the CESM scripts, there are only two compsets defined out of the box, which are FC4AQUAP (year 2000 CAM 4) and FC5AQUAP (year 2000 CAM 5). In this configuration, CAM is the only component that is actually doing anything (there are not even any data models present), so any physics or forcing options that you can change at all will probably be controlled by CAM_CONFIG_OPTS or the namelist. There's really no tutorial for aquaplanet, but mostly because there's really not anything that you can configure other than the usual CAM namelist options.If you wanted a bunch of changes, say, to run a different time period, you could try using FC5AQUAP with a different use case (variable CAM_NML_USE_CASE in env_run.xml), rather than changing all of the individual namelist options by hand. If you need more help to set up a specific run, you should probably open a new topic on this forum and explain in more detail what you want in your case.
 
Top