Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The E3SM model can be run within the E3SM Docker container. This page describes how to install Singularity Docker on your laptop/workstation, build or download the Docker container, and run the E3SM model within the container.

Note: the container is limited to the resources of the single node or workstation it runs on so keep your case sizes in mind.

Install

...

Docker

Install Docker on Linux, macOS or Windows as described at Get Docker.

...

The latest version of the E3SM container can be downloaded from e3sm.tar.bz2. Due to a size, the container was compressed, and need to be decompressed before loaded to your local docker.

$ bzip2 -dk e3sm.tar.bz2

$ docker load < e3sm_2021.03.18.tardocker repository:

$ docker pull lukaszlacinski/e3sm:2021.03.19

$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
lukaszlacinski/e3sm 2021.03.19 12d20f57cd94 10 months ago 702 MB

Example

By default, Docker containers do not use the host filesystem. Any host system directories that, a user wants to make accessible from the container environment, must be mounted when the container is started. A directory with SSH private keys will be needed in the container, if you plan to ssh from the container (clone the E3SM repository recursively). If you have the E3SM repository already cloned on your host system, and you want to work on it in the container environment, you need to mount it as well. Also do mkdir -p $HOME/projects/e3sm/cesm-inputdata (this directory is assumed to exist by the machine entry above. Input data will be downloaded here. (could get large, THE CONTAINER DOES NOT HAVE INPUT DATA)).

...

--hostname singularity \

--shm-size=512m \

lukaszlacinski/e3sm:2021.03.18 19 /bin/su - e3sm

The command starts a Docker container with e3sm:2021.03.18 19 image, mounts your .ssh/ directory to a corresponding directory of the ‘e3sm’ user in the container, mounts your e3sm project data directory projects/e3sm to a corresponding directory in the container, and run a command to switch to the ‘e3sm’ user in the container. By default, Docker sets a memory usage limit for containers on macOS and Windows systems to 2 GB. The limit may trigger the OOM Killer that will kill a running case with 9 signal. If needed, a memory limit can be increased with the -m option when starting a docker container, e.g. -m 16g.

If you want to use ssh with public-key authentication without being asked for your private key passphrase, you can set up an ssh-agent:

...

If you mounted your github repository from the host filesystem, you can skip the step above and to go directory to the repo, and run a case. By default, it assumes that 16 threads/cores available on the machine, <GMAKE_J>16</GMAKE_J>. If you run it on less powerful workstation/laptop, you may run into an error when building the model, and need to change it (in the example below to 2).

e3sm@singularity:~$ cd E3SM/cime/scripts/
e3sm@singularity:~$ ./create_newcase --case container.A_WCYCL1850.ne4_oQU240.baseline --compset A_WCYCL1850 --res ne4_oQU240
e3sm@singularity:~$ cd container.A_WCYCL1850.ne4_oQU240.baseline/
e3sm@singularity:~$ ./case.setup
e3sm@singularity:~$ ./xmlchange GMAKE_J=2
e3sm@singularity:~$ ./case.build
e3sm@singularity:~$ ./case.submit

...