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 CESM2 to a machine with Slurm but no module manager

Seb Eastham

Seb Eastham
New Member
Hello,

I am currently attempting to port CESM (v2.1.1) to a new machine which uses Slurm for queue management, but which does not use a module system. As such, I am struggling to understand how I can supply information about my environment to CESM when running a case. I am able to set up a compset and build CESM successfully (including running ./check_case), but when I get to the "./case.submit" stage, I find that the submission fails. The error I receive is

Generating namelists for /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/cime/scripts/case.FC2000climo
Creating component namelists
Calling /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/components/cam//cime_config/buildnml
CAM namelist copy: file1 /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/cime/scripts/case.FC2000climo/Buildconf/camconf/atm_in file2 /net/d13/data/seastham/CESM-GC_2022/CESM/output/Run/case.FC2000climo/run/atm_in
Calling /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/components/clm//cime_config/buildnml
ERROR: Command /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/components/clm/bld/build-namelist failed rc=2
out=
err=Can't locate XML/SAX/Exception.pm in @INC (you may need to install the XML::SAX::Exception module) (@INC contains: /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/components/clm/bld /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/components/clm/bld /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/cime/scripts/Tools/../../utils/perl5lib /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/components/clm/bld /home/seastham/perl5/lib/perl5/5.30.0/x86_64-linux-gnu-thread-multi /home/seastham/perl5/lib/perl5/5.30.0 /home/seastham/perl5/lib/perl5/x86_64-linux-gnu-thread-multi /home/seastham/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /home/seastham/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/XML/LibXML.pm line 2038.
BEGIN failed--compilation aborted at /home/seastham/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/XML/LibXML.pm line 2038.
Compilation failed in require at /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/cime/scripts/Tools/../../utils/perl5lib/Config/SetupTools.pm line 5.
BEGIN failed--compilation aborted at /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/cime/scripts/Tools/../../utils/perl5lib/Config/SetupTools.pm line 5.
Compilation failed in require at /net/d13/data/seastham/CESM-GC_2022/CESM/CESM/components/clm/bld/CLMBuildNamelist.pm line 414.


However, if I run perl -e "XML::SAX::Exception;" from the terminal which submitted the job, I see no error, indicating the the module is available. Furthermore, cpan -D XML::SAX::Exception shows

CPAN: Module::CoreList loaded ok (v5.20190522)
(no description)
G/GR/GRANTM/XML-SAX-Base-1.09.tar.gz
/usr/share/perl5/XML/SAX/Exception.pm
Installed: 1.09
CPAN: 1.09 up to date
Grant McLean (GRANTM)
grantm@cpan.org


Can you advise? My suspicion is that something about the environment is not being correctly passed through the various CIME scripts and through Slurm; however, since we do not use a module system, I am not sure how to tell CIME where to find perl and its libraries. I am also concerned that the same issue will arise for the Intel Fortran libraries, which are usually set up through a call to a script (which cannot be easily replicated through a set of static environment variables).
 

jedwards

CSEG and Liaisons
Staff member
Is the filesystem with your perl code available on all of the compute nodes? It looks like /usr/share/perl5 may not be.
Usually if you set the enviroment you need up on your login node then export the env to your job using slurm you will be fine
as long as the filesystems are available.
 

Seb Eastham

Seb Eastham
New Member
Thanks jedwards! You're right about perl - I realized that the compute nodes did not have access to the same filesystem, and have resolved the issue. However, I now have a new one. This also ended up being the key to getting CESM to run - we had a quirk where Intel's 2022 compiler tools were not available on the compute nodes, but were available on the head node. Thanks again!
 

ohmpawat

ohmpawat chen
Member
Thanks jedwards! You're right about perl - I realized that the compute nodes did not have access to the same filesystem, and have resolved the issue. However, I now have a new one. This also ended up being the key to getting CESM to run - we had a quirk where Intel's 2022 compiler tools were not available on the compute nodes, but were available on the head node. Thanks again!
Hello, I had the same problem recently. Can you tell me about the solution? I don't even know how to set the environment. Thanks for your help!
 
Top