Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The E3SM model can be run within the E3SM Singularity container. This page describes how to install Singularity, build or download the E3SM container, and run the E3SM model within the container.

Install Singularity

Install Singularity as described at Singularity Installation.

Download the E3SM container

The latest version of the E3SM container can be downloaded from e3sm.sif. If you would like to build the container with some changes, the E3SM Singularity definition file is available at e3sm.def. To build the container, run:

sudo singularity build e3sm.sif e3sm.def

Run the E3SM developer tests

Download the E3SM source

git clone -b maint-1.2 --recursive git@github.com:E3SM-Project/E3SM.git

Modify cime/config/e3sm/machines/config_machines.xml, so a value of the NODENAME_REGEX element of the linux-generic machine is singularity. Remove openmpi from MPILIBS:

<MPILIBS>mpich</MPILIBS>

Specify GMAKE command above the GMAKE_J element:

<GMAKE>make</GMAKE>
<GMAKE_J>4</GMAKE_J>

Define also environment variables:

<environment_variables>
  <env name="E3SM_SRCROOT">$SRCROOT</env>
</environment_variables>
<environment_variables mpilib="mpi-serial">
  <env name="NETCDF_PATH">/usr/local/packages/netcdf-serial</env>
  <env name="PATH">/usr/local/packages/hdf5-1.10.6-serial/bin:/usr/local/packages/netcdf-serial/bin:$ENV{PATH}</env>
  <env name="LD_LIBRARY_PATH">/usr/local/packages/szip-2.1.1/lib:/usr/local/packages/hdf5-1.10.6-serial/lib:/usr/local/packages/netcdf-serial/lib</env>
</environment_variables>
<environment_variables mpilib="!mpi-serial">
  <env name="NETCDF_PATH">/usr/local/packages/netcdf-parallel</env>
  <env name="PNETCDF_PATH">/usr/local/packages/pnetcdf-1.12.1</env>
  <env name="PATH">/usr/local/packages/mpich-3.3.2/bin:/usr/local/packages/hdf5-1.10.6-parallel/bin:/usr/local/packages/netcdf-parallel/bin:/usr/local/packages/pnetcdf-1.12.1/bin:$ENV{PATH}</env>
  <env name="LD_LIBRARY_PATH">/usr/local/packages/mpich-3.3.2/lib:/usr/local/packages/szip-2.1.1/lib:/usr/local/packages/hdf5-1.10.6-parallel/lib:/usr/local/packages/netcdf-parallel/lib:/usr/local/packages/pnetcdf-1.12.1/lib</env>
</environment_variables>

Then add options -lblas -llapack to a linker in cime/config/e3sm/machines/config_compilers.xml:

<compiler COMPILER="gnu" MACH="linux-generic">
  <NETCDF_PATH> $(NETCDF_PATH)</NETCDF_PATH>
  <PNETCDF_PATH> $(PNETCDF_PATH)</PNETCDF_PATH>
  <ADD_SLIBS> $(shell $(NETCDF_PATH)/bin/nf-config --flibs) -lblas -llapack</ADD_SLIBS>
</compiler>

At this point you can run the container

mkdir $HOME/projects

singularity shell -B $HOME/projects e3sm.sif

Singularity> cd <E3SM_SRC_DIR>/cime/scripts

Singularity> ./create_test e3sm_developer

The developer test creates and runs 36 cases. To create a new case separately and run it, for example A_WCYCL1850 with ultra low resolution:

Singularity> ./create_newcase --case master.A_WCYCL1850.ne4_oQU240.baseline —-compset A_WCYCL1850 —-res ne4_oQU240

Singularity> cd master.A_WCYCL1850.ne4_oQU240.baseline

Singularity> ./case.setup

Singularity> ./case.build

Singularity> ./case.submit

For more details on how to create a new case and run it, please refer to E3SM Quick Start.

  • No labels