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

Porting CESM v1.2.2.1 error with ./case.build

AndrewLowry

Andrew Lowry
New Member
I'm hoping someone can help me with a port of CESM v.1.2.2.1 to my local institutions HPC. I have followed the instructions at https://www2.cesm.ucar.edu/models/cesm1.2/cesm/doc/usersguide/x1794.html and created the two new files for my machine (env_mach_specific.bunya and mkbatch.bunya) and edited config_compilers.xml and config_machines.xml, these are all attached.
There does not seem to be a "describe_version" or similar for CESM1.2.2.1, but I downloaded as per instructions on https://www2.cesm.ucar.edu/models/cesm1.2/cesm/doc/usersguide/x290.html#download_ccsm_code and made modifications to some SVN_EXTERNAL_DIRECTORIES as per GoogleCode Repositories are Offline PIO source not found no other changes have been made to the code.

To build the dependencies I am using EasyBuild, which loads all the modules needed. I have removed netCDF-c and netCDF-fortran from this as I believe CESM1 likes to have them in the same directory, and I haven't worked out how to force EasyBuild to put different software in the same directory. The EasyBuild script (CESM-deps-1-foss-2021a) is attached to show the software used, but in short in includes the usual suspects HDF5, zlib, slib, svn, OpenMPI, GCC, all compiled with foss 2021a.

To install netCDF-c (v.4.8.0) and netCDF-fortran (v.4.5.3) I built them from source and installed them into the same directory. I added the netcdf_intall/bin to $PATH and netcdf_install/lib to $LD_LIBRARY_PATH and set everything in the above mentioned config_compilers.xml.

The create_newcase, cesm_setup work fine, but unfortunately I am getting an error with building the executable from case.build. See attached cesm.bldlog. My suspicion is that it's something to do with netCDF and linking it correctly, but I've run out of ideas. I've enclosed the case/Macros file as well, which is what I've been playing with to try get this to work.

As an aside I have managed to use an almost identical procedure to port CESM2.1.3, where I was able to set NETCDF_C_PATH and NETCDF_FORTRAN_PATH in config_compilers.xml, which I don't believe is available in CESM1.
 

Attachments

  • cesm.bldlog.230307-045429.txt
    308.3 KB · Views: 6
  • CESM-deps-1-foss-2021a.txt
    1.9 KB · Views: 4
  • config_compilers.txt
    37.9 KB · Views: 7
  • config_machines.txt
    31.2 KB · Views: 5
  • env_mach_specific.bunya.txt
    345 bytes · Views: 4
  • Macros.txt
    1.4 KB · Views: 4
  • mkbatch.bunya.txt
    2.9 KB · Views: 4

AndrewLowry

Andrew Lowry
New Member
Thanks for this, that has worked and solved the problem.
For others who stumble on this thread I also managed to use EasyBuild to install all the dependencies including netCDF-c, netCDF-fortran, netCDF-c++, contrary to what was mentioned above. I then created a separate directory, e.g. path/to/netcdf/ with subdirectories bin, lib, and include. Into each of those I linked the files from the EasyBuild install locations and then set <NETCDF_PATH>path/to/netcdf/</NETCDF_PATH> in config_compilers.xml.
 

langford

Thomas Langford
New Member
@AndrewLowry Would you be able to share your CESM 1.2.2 easyconfig? We've been trying to build it on our HPC cluster for ages and have made no headway in using easybuild for it. We have a stable, manual, build of it using Intel 2015 and OpenMPI 2, but I'm hoping to migrate it to at least the 2020b toolchain if at all possible. Any help would be amazing.
 

AndrewLowry

Andrew Lowry
New Member
Hi Thomas, absolutely see attached. I've used foss 2021a as you can see. Let me know if I can be of more help.
 

Attachments

  • CESM-deps-1-foss-2021a.txt
    1.3 KB · Views: 8
Top