Building pio2 fails when porting CESM3.0 to a new machine

lprates

Lucas Prates
New Member
I am working on porting CESM3.0 (cesm3.0-alphabranch, with describe version output cesm3_0_beta03-285-g8a3a165) to Trillium. I have successfully ported previous versions of CESM (cesm2.1.0 and 2.1.5) to this machine following the DRAC guide for their older machine, Niagara. I want to set up a spectral element CAM run test case using F2000climo and ne30_ne30_mg16 with CESM3, but the build process is consistently failing to build pio2, and any solutions I have found to fix this cause problems downstream. Here is the list of steps that I took to create the case:

First, I downloaded CESM3.0 using
Code:
git clone -b cesm3.0-alphabranch https://github.com/ESCOMP/CESM.git /path/to/CESM

Then, I populated the model components with
Code:
./bin/git-fleximod update

In ccs_config/machines/config_machines.xml, I added the NODENAME_REGEX for trillium,
XML:
<value MACH="trillium">tri*</value>

I then created the ccs_config/machines/trillium directory, where I added config_machines.xml and config_batch.xml files based on the DRAC guide for Niagara. Since I noticed there are no config_compilers.xml files in this version of CESM, I instead created a file called intel_trillium.cmake and tried to make it consistent with the previous config_compilers.xml file, although the inclusion of this file appears to be irrelevant to the problem at hand. I have attached these three files below.

I created the case with the following command:
Code:
./create_newcase --case $SCRATCH/CESM/cesm3_0/cases/test_ne30np4_cam6 --compset F2000climo --res ne30_ne30_mg16 --machine trillium --run-unsupported

In the case directory, I made to changes to the xml files and simply ran ./case.setup followed by ./case.build, which resulted in the following error while building pio2:
Code:
CMake Error at src/clib/CMakeLists.txt:168 (message):
  Must have PnetCDF and/or NetCDF C libraries

I tried to fix this by pointing the NETCDF_C_PATH environment variable in env_machine_specific.xml to the netcdf-mpi installation rather than netcdf-c++4, like so
XML:
<env name="NETCDF_C_PATH">/cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v4/MPI/intel2023/openmpi4/netcdf-mpi/4.9.2/</env>

The result was that pio2 built successfully, but this caused another crash downstream in building cam, with the error
Code:
ERROR: yaml-cpp library not found at /scratch/lprates/CESM/cesm3_0/output/test_ne30np4_cam6_compiled_w_c/bld/lib/lib/libyaml-cpp.a

I have also attached the associated log file. I would really appreciate if someone could help me identify how to fix this problem. I believe I have provided a complete list of steps for what I have done so far, but please let me know if any more details are required.
 

Attachments

fischer

CSEG and Liaisons
Staff member
Hi Lucas,

Please update to the latest cesm3 beta tag and try again.

git clone -b cesm3_0_beta08 GitHub - ESCOMP/CESM: The Community Earth System Model

There's a new CAM_LINKED_LIBS variable that involves yaml. Hopefully this will fix your issue.

Also a couple of other things. You shouldn't be using the cesm3.0-alphabranch, it can be unstable. Also the ne30_ne30_mg16 is a legacy grid, you should be using ne30_ne30_mg17.

Chris
 
Vote Upvote 0 Downvote

lprates

Lucas Prates
New Member
Hi Chris,

Thanks for the reply. I repeated the process from my original post with cesm3_0_beta08 and the new grid. I checked my env_build.xml file and CAM_LINKED_LIBS was set to the default value "-ltuvx -lyaml-cpp -lstdc++", but the build still failed with the same error yaml-cpp error.

- Lucas
 
Vote Upvote 0 Downvote

fischer

CSEG and Liaisons
Staff member
Hi Lucas,

I'm trying to track down why libyaml-cpp.a isn't being built for you. I am making some progress. But I believe if you try cesm3_0_alpha08k instead of cesm3_0_beta08, you should be able to build. CAM has added a new external, tuv-x, that's suppose to be building the yaml library.

Chris
 
Vote Upvote 0 Downvote
Back
Top