diff --git a/esmvaltool/utils/recipe_test_workflow/doc/source/user_guide/quick_start.rst b/esmvaltool/utils/recipe_test_workflow/doc/source/user_guide/quick_start.rst index a6985c768f..f4a7b733ff 100644 --- a/esmvaltool/utils/recipe_test_workflow/doc/source/user_guide/quick_start.rst +++ b/esmvaltool/utils/recipe_test_workflow/doc/source/user_guide/quick_start.rst @@ -12,11 +12,29 @@ Quick Start cd ESMValTool/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow rose edit -* Run the |RTW| at the Met Office, where ```` is a unique run name - relevant to the current configuration:: +* Run the |RTW|: - cylc install --run-name= -O metoffice - cylc play recipe_test_workflow/ + * at the Met Office:: + + export CYLC_VERSION=8 + cylc vip -O metoffice + + * on JASMIN: + + * add the following line to your ``~/.bashrc`` file to ensure the Cylc and + Rose executables can be found:: + + export PATH=/apps/jasmin/metomi/bin:$PATH + + * SSH to the Rose and Cylc server:: + + ssh -X cylc + + * run the RTW on JASMIN:: + + cd ESMValTool/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow + export CYLC_VERSION=8 + cylc vip -O jasmin * Browse the logs using `Cylc Review`_, a web service for browsing logs via an HTTP interface. diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc index d5a16a8c7a..351f71b0c8 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -37,8 +37,8 @@ platform = localhost [[configure]] - pre-script = "mkdir -p ${USER_CONFIG_DIR}" platform = localhost + pre-script = "mkdir -p ${USER_CONFIG_DIR}" [[[environment]]] ROSE_TASK_APP = configure DRS_CMIP3 = {{ DRS_CMIP3 }} diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/meta/rose-meta.conf b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/meta/rose-meta.conf index 366976440d..83c613251f 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/meta/rose-meta.conf +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/meta/rose-meta.conf @@ -182,4 +182,4 @@ compulsory=true description=The site at which the Rose suite will run. help=This value must be set in a site-specific configuration file located in =the 'opt/' directory. -values="metoffice" +values="metoffice, jasmin" diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/opt/rose-suite-jasmin.conf b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/opt/rose-suite-jasmin.conf new file mode 100644 index 0000000000..0b919d09b1 --- /dev/null +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/opt/rose-suite-jasmin.conf @@ -0,0 +1,10 @@ +[template variables] +DRS_CMIP5="BADC" +DRS_CMIP6="BADC" +KGO_ROOT_PATH="/gws/nopw/j04/esmeval/KGO_v2.7.0/" +MODULE_NAME="esmvaltool/2.7" +ROOTPATH_CMIP5="/badc/cmip5/data/cmip5/output1" +ROOTPATH_CMIP6="/badc/cmip6/data/CMIP6" +ROOTPATH_OBS="/gws/nopw/j04/esmeval/obsdata-v2" +ROOTPATH_OBS4MIPS="/gws/nopw/j04/esmeval/obsdata-v2" +SITE="jasmin" diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env new file mode 100755 index 0000000000..56c6b251a9 --- /dev/null +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env @@ -0,0 +1,55 @@ +#!/bin/bash -l +# +# USAGE jasmin-env COMMAND +# +# ENVIRONMENT +# MODULE_NAME The name of the module to load +# PYTHONPATH_PREPEND The path to prepend to PYTHONPATH after loading the +# module +# QUIET_MODE Don't print confirmation messages +# +# OPTIONS +# COMMAND The command to execute with options +set -eu + +module_count(){ + module list -t 2>&1 | wc -l +} + +safe_load(){ + PRE_LOAD_COUNT=$(module_count) + + module load "${1}" + # Check module count to determine whether module load was successful. + if (( PRE_LOAD_COUNT == $(module_count) )); then + echo "[ERROR] Failed to load: ${1}" + exit 1 + fi +} + +# Must be run before importing numpy, see +# https://www-avd/sci/dask_best_practice/numpy-threads.html. +export OMP_NUM_THREADS=1 +export OPENBLAS_NUM_THREADS=1 +export MKL_NUM_THREADS=1 +export VECLIB_MAXIMUM_THREADS=1 +export NUMEXPR_NUM_THREADS=1 + +# Ensure '~/.local' isn't added to 'sys.path'. +export PYTHONNOUSERSITE=True + +safe_load "${MODULE_NAME}" + +# If PYTHONPATH_PREPEND has been set, prepend it to PYTHONPATH to extend the +# Python environment. +if [[ ! -z ${PYTHONPATH_PREPEND:-} ]]; then + echo "[INFO] Prepending the following to PYTHONPATH: ${PYTHONPATH_PREPEND}" + export PYTHONPATH=${PYTHONPATH_PREPEND}:${PYTHONPATH:-} +fi + +if [[ -z ${QUIET_MODE:-} ]]; then + echo "[OK] Modules loaded." +fi + +command="/usr/bin/time -v -o ${CYLC_TASK_LOG_ROOT}.time $@" +exec ${command} diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc new file mode 100644 index 0000000000..5c3bea5fc1 --- /dev/null +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc @@ -0,0 +1,17 @@ +#!jinja2 +[runtime] + [[COMPUTE]] + platform = lotus + [[[directives]]] + --wckey = RTW + --ntasks = 1 + + [[process]] + execution time limit = PT2M + [[[directives]]] + --mem = 2G + + [[process]] + execution time limit = PT6M + [[[directives]]] + --mem = 2G diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/metoffice.cylc b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/metoffice.cylc index 6e7fea381f..83314fde40 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/metoffice.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/metoffice.cylc @@ -7,11 +7,11 @@ --ntasks = {{ MAX_PARALLEL_TASKS }} [[process]] + execution time limit = PT2M [[[directives]]] - --time = 2 --mem = 2G [[process]] + execution time limit = PT6M [[[directives]]] - --time = 6 --mem = 2G