Versions Compared

Key

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

...

Note
  • At the time of writing open-mpi is downloaded and built as part of the image creation. This is quite slow, so in the future we will investigate the use of a standard library
  • If a fresh build is required but an image has already been built, then execute the following command, which is the same as above but with no-cache
Code Block
languagebash
themeMidnight
docker build --no-cache --tag "openifs-48r1.1" .
  • The tag name does not need to be provided but it is useful for identifying images.

Running OpenIFS -test using the docker image

Once a build has completed, the image can be checked by typing docker images , e.g.,

Code Block
languagebash
themeMidnight
docker images

REPOSITORY          TAG       IMAGE ID       CREATED       SIZE
openifs-48r1.1      latest    f72ea92f010f   5 hours ago   2.15GB

And the container can be run using the following

Code Block
languagebash
themeMidnight
docker run -it 'openifs-48r1.1'

This command will open an interactive session in the new container, in which the entry directory is the openifs-48r1.1 directory, e.g.

Code Block
languagebash
themeMidnight
docker run -it 'openifs-48r1.1'

OpenIFS environment variables are:
------------------------------------------------------
OIFS_CYCLE=48r1
OIFS_DATA_DIR=/perm/openifs/oifs_data/48r1/48r1
OIFS_HOME=/home/openifs/openifs-48r1.1
OIFS_LOGFILE=/home/openifs/openifs-48r1.1/oifs_test_log.txt

openifs@d1bd89ccc47f:~/openifs-48r1.1$ ls
CHANGES  COPYING  NOTICE  arch        ifs-source  oifs-config.edit_me.sh  scripts
CITE     LICENSE  README  bundle.yml  ifs-test    openifs-bundle


Note
  • In the above code block the openifs config (oifs-config.edit_me.sh) is sourced automatically so the container has the correct environment for OpenIFS

Once inside the container, the openifs-test.sh  script can be run, e.g., 

Code Block
languagebash
themeMidnight
openifs@d1bd89ccc47f:~/openifs-48r1.1$ ./scripts/openifs-test.sh -cbt -s docker

where :

-c will clean the directory (not necessary for a fresh image or new container)

-b will configure the bundle and build OpenIFS, i.e.,

  • the OpenIFS double and single precision master executables (ifsMASTER.DP and ifsMASTER.SP, respectively) , which are used to run 3-D OpenIFS. The executables are located in  $OIFS_HOME/build/bin.
  • the double and single precision Single Column Model (SCM) executables (MASTER_scm.DP and MASTER_scm.SP, respectively), which are used to run the SCM derived from OpenIFS. The executables are located in  $OIFS_HOME/build/bin.

-t will run the ifs-test

  • 21 3-D OpenIFS forecast-only tests with and without chemistry
  • 1 SCM test (based on TWP-ICE)

-s docker defines the system as docker, which makes the script use the correct build commands