From 69ae50855076cf8ac07add717f91969bf2322e2c Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 28 Feb 2023 09:01:42 +0000 Subject: [PATCH 01/41] #3060: add jasmin framework --- .../opt/rose-suite-jasmin.conf | 12 ++++ .../recipe_test_workflow/rose-suite.conf | 2 +- .../recipe_test_workflow/site/jasmin-env | 55 +++++++++++++++++++ .../recipe_test_workflow/site/jasmin.cylc | 17 ++++++ 4 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/opt/rose-suite-jasmin.conf create mode 100644 esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env create mode 100644 esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc 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..5d4235016c --- /dev/null +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/opt/rose-suite-jasmin.conf @@ -0,0 +1,12 @@ +[template variables] +DRS_CMIP5="BADC" +DRS_CMIP6="BADC" +DRS_OBS="default" +DRS_OBS4MIPS="default" +KGO_ROOT_PATH="/data/users/esmval/KGO_v2.6.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/rose-suite.conf b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/rose-suite.conf index 3010c43b0a..bba21692c6 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/rose-suite.conf +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/rose-suite.conf @@ -21,4 +21,4 @@ ROOTPATH_OBS="" ROOTPATH_OBS4MIPS="" ROOTPATH_OBS6="" ROOTPATH_RAWOBS="" -SITE="metoffice" +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 100644 index 0000000000..34a7ad9b6f --- /dev/null +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env @@ -0,0 +1,55 @@ +#!/bin/bash -l +# +# Usage metoffice-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..3594637a55 --- /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 = {{ MAX_PARALLEL_TASKS }} + + [[process]] + [[[directives]]] + --time = 2 + --mem = 2G + + [[process]] + [[[directives]]] + --time = 6 + --mem = 2G From b06abbfe7b315a4dd9cfc6feaeffa94524139cbf Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 7 Mar 2023 12:28:31 +0000 Subject: [PATCH 02/41] #3060: add jasmin specific requirements --- .../recipe_test_workflow/recipe_test_workflow/flow.cylc | 9 +++++++++ 1 file changed, 9 insertions(+) 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 640ff8e4ca..6d828a185b 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -28,6 +28,15 @@ ESMVALCORE_DIR = ${CYLC_WORKFLOW_RUN_DIR}/lib/ESMValCore ESMVALTOOL_DIR = ${CYLC_WORKFLOW_RUN_DIR}/lib/ESMValTool PYTHONPATH_PREPEND = ${ESMVALCORE_DIR}:${ESMVALTOOL_DIR} +{% if SITE == "jasmin" %} + [[[job]]] + batch system = slurm + execution time limit = PT15M + [[[directives]]] + -q = short-serial + -W = 5:00 + -n = 1 +{% endif %} [[install_cold]] platform = localhost From c916ea4cddf1656bba8fa8597c714af7419af1a0 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Wed, 8 Mar 2023 15:02:34 +0000 Subject: [PATCH 03/41] #3060: modify platform settings --- .../utils/recipe_test_workflow/recipe_test_workflow/flow.cylc | 4 ++++ 1 file changed, 4 insertions(+) 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 6d828a185b..dca1a97b46 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -39,13 +39,17 @@ {% endif %} [[install_cold]] +{% if SITE == "jasmin" %} platform = localhost +{% endif %} [[[environment]]] SITE = {{ SITE }} [[configure]] pre-script = "mkdir -p ${USER_CONFIG_DIR}" +{% if SITE == "jasmin" %} platform = localhost +{% endif %} [[[environment]]] ROSE_TASK_APP = configure DRS_CMIP3 = {{ DRS_CMIP3 }} From ca07fd5ebc6adbc633176a8ef8dc997412a157ca Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Wed, 8 Mar 2023 15:14:24 +0000 Subject: [PATCH 04/41] #3060: modify platform settings --- .../recipe_test_workflow/recipe_test_workflow/flow.cylc | 6 ------ 1 file changed, 6 deletions(-) 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 dca1a97b46..654fec5d26 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -39,17 +39,11 @@ {% endif %} [[install_cold]] -{% if SITE == "jasmin" %} - platform = localhost -{% endif %} [[[environment]]] SITE = {{ SITE }} [[configure]] pre-script = "mkdir -p ${USER_CONFIG_DIR}" -{% if SITE == "jasmin" %} - platform = localhost -{% endif %} [[[environment]]] ROSE_TASK_APP = configure DRS_CMIP3 = {{ DRS_CMIP3 }} From 4509345874aa082dff900cffa02656a445225194 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Wed, 8 Mar 2023 15:26:27 +0000 Subject: [PATCH 05/41] #3060: modify directives --- .../recipe_test_workflow/recipe_test_workflow/flow.cylc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 654fec5d26..2120c8c9e0 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -33,9 +33,9 @@ batch system = slurm execution time limit = PT15M [[[directives]]] - -q = short-serial - -W = 5:00 - -n = 1 + --qos=short-serial + --time=05:00 + --ntasks=1 {% endif %} [[install_cold]] From bf6733c3301347e6f845962be29b9d7356c76a92 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Mon, 13 Mar 2023 09:10:00 +0000 Subject: [PATCH 06/41] #3060: add cloning urls to site specific config files --- .../recipe_test_workflow/app/configure/bin/configure.py | 4 ++-- .../recipe_test_workflow/app/install_cold/rose-app.conf | 4 ++-- .../recipe_test_workflow/opt/rose-suite-jasmin.conf | 2 ++ .../recipe_test_workflow/opt/rose-suite-metoffice.conf | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py index d3ab11f214..f955cef11b 100755 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py @@ -13,7 +13,7 @@ category=UserWarning, module="esmvalcore.experimental._warnings", ) - import esmvalcore.experimental as esmvaltool + import esmvalcore.config import yaml USER_CONFIG_PATH = os.environ["USER_CONFIG_PATH"] @@ -25,7 +25,7 @@ def main(): # Get the default configuration values from ESMValTool. A dictionary is # needed here to avoid the config object from converting paths to PosixPath # objects, which causes issues when writing the YAML file. - config_values = dict(esmvaltool.CFG) + config_values = dict(esmvalcore.config.CFG) # Get the configuration values defined in the environment for the # ``configure`` task. diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/rose-app.conf b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/rose-app.conf index 4e2b085536..f2ac7a225f 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/rose-app.conf +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/rose-app.conf @@ -3,6 +3,6 @@ default=install_cold.sh [env] BRANCH=main -ESMVALCORE_URL=git@github.com:ESMValGroup/ESMValCore.git -ESMVALTOOL_URL=git@github.com:ESMValGroup/ESMValTool.git +ESMVALCORE_URL=${ESMVALCORE_URL} +ESMVALTOOL_URL=${ESMVALTOOL_URL} SITE=${SITE} 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 index 5d4235016c..a089442422 100644 --- 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 @@ -3,6 +3,8 @@ DRS_CMIP5="BADC" DRS_CMIP6="BADC" DRS_OBS="default" DRS_OBS4MIPS="default" +ESMVALCORE_URL="https://github.com/ESMValGroup/ESMValCore.git" +ESMVALTOOL_URL="https://github.com/ESMValGroup/ESMValTool.git" KGO_ROOT_PATH="/data/users/esmval/KGO_v2.6.0/" MODULE_NAME="esmvaltool/2.7" ROOTPATH_CMIP5="/badc/cmip5/data/cmip5/output1" diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/opt/rose-suite-metoffice.conf b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/opt/rose-suite-metoffice.conf index a20cee88e7..e12093eac7 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/opt/rose-suite-metoffice.conf +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/opt/rose-suite-metoffice.conf @@ -3,8 +3,10 @@ DRS_CMIP5="BADC" DRS_CMIP6="BADC" DRS_OBS="default" DRS_OBS4MIPS="default" +ESMVALCORE_URL="git@github.com:ESMValGroup/ESMValCore.git" +ESMVALTOOL_URL="git@github.com:ESMValGroup/ESMValTool.git" KGO_ROOT_PATH="/data/users/esmval/KGO_v2.6.0/" -MODULE_NAME="scitools/community/esmvaltool/2.6.0" +MODULE_NAME="scitools/community/esmvaltool/2.7.0" ROOTPATH_CMIP5="/project/champ/data/cmip5/output1" ROOTPATH_CMIP6="/project/champ/data/CMIP6" ROOTPATH_OBS="data/users/esmval/ESMValTool/temporary/obs/" From 8cb0cf27e1532d8675580f1186520395ab00c950 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Mon, 13 Mar 2023 09:16:20 +0000 Subject: [PATCH 07/41] #3060: add cloning urls to general config --- .../recipe_test_workflow/recipe_test_workflow/rose-suite.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/rose-suite.conf b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/rose-suite.conf index bba21692c6..5a2246090c 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/rose-suite.conf +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/rose-suite.conf @@ -8,6 +8,8 @@ DRS_NATIVE6="default" DRS_OBS="default" DRS_OBS4MIPS="default" DRS_OBS6="default" +ESMVALCORE_URL="" +ESMVALTOOL_URL="" KGO_ROOT_PATH="" MAX_PARALLEL_TASKS=4 MODULE_NAME="" From 99708d35d511258aaaf1f385393944ae1597b9e9 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Mon, 13 Mar 2023 09:21:11 +0000 Subject: [PATCH 08/41] #3060: add cloning urls to flow.cylc --- .../utils/recipe_test_workflow/recipe_test_workflow/flow.cylc | 2 ++ 1 file changed, 2 insertions(+) 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 2120c8c9e0..cbeb6e3db3 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -40,6 +40,8 @@ [[install_cold]] [[[environment]]] + ESMVALCORE_URL = {{ ESMVALCORE_URL }} + ESMVALTOOL_URL = {{ ESMVALTOOL_URL }} SITE = {{ SITE }} [[configure]] From 92bf1873c03af4dd82267af4b653d3d820b64a68 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Mon, 13 Mar 2023 09:32:22 +0000 Subject: [PATCH 09/41] #3060: comment out install image hash --- .../recipe_test_workflow/app/install_cold/bin/install_cold.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh index b4460bfb1b..c435137b21 100755 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh @@ -34,4 +34,4 @@ git clone -q -b "${BRANCH}" "${ESMVALCORE_URL}" "${ESMVALCORE_DIR}" # Manually and temporarily install imagehash (it will be included in the # next ESMValTool community environment). -rtw-env pip install imagehash -t "${CYLC_WORKFLOW_RUN_DIR}/lib/python" +#rtw-env pip install imagehash -t "${CYLC_WORKFLOW_RUN_DIR}/lib/python" From b0cea51f0860691eb8216b78a56eb2fc42336edf Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Mon, 13 Mar 2023 09:39:51 +0000 Subject: [PATCH 10/41] #3060: make rtw file executable --- .../recipe_test_workflow/app/install_cold/bin/install_cold.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh index c435137b21..4a9b1b7eeb 100755 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh @@ -16,6 +16,7 @@ mkdir "${TARGET_DIR}" # Copy the environment file to the 'bin' directory. cp "${SOURCE_PATH}" "${TARGET_DIR}/${ENV_FILE}" +chmod u+x "${TARGET_DIR}/${ENV_FILE}" # Remove the ESMValTool and ESMValCore directories, if they exist. if [[ -d ${ESMVALTOOL_DIR} ]]; then From 80f7d480385e9619b75d148c7bc83e64f04baab4 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Mon, 13 Mar 2023 10:01:02 +0000 Subject: [PATCH 11/41] #3060: remove jasmin-env --- .../recipe_test_workflow/site/jasmin-env | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env 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 deleted file mode 100644 index 34a7ad9b6f..0000000000 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -l -# -# Usage metoffice-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} From 3d735c80f111f7379d9deb99bdc0991489e16fe1 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Mon, 13 Mar 2023 10:12:49 +0000 Subject: [PATCH 12/41] #3060: add jasmin-env again --- .../recipe_test_workflow/site/jasmin-env | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env 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 100644 index 0000000000..34a7ad9b6f --- /dev/null +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env @@ -0,0 +1,55 @@ +#!/bin/bash -l +# +# Usage metoffice-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} From e13b95d60ab334d68560c9a94af6c3d43003312e Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Mon, 13 Mar 2023 10:13:39 +0000 Subject: [PATCH 13/41] #3060 remove jasmin.cylc --- .../recipe_test_workflow/site/jasmin.cylc | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc 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 deleted file mode 100644 index 3594637a55..0000000000 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc +++ /dev/null @@ -1,17 +0,0 @@ -#!jinja2 -[runtime] - [[COMPUTE]] - platform = lotus - [[[directives]]] - --wckey = RTW - --ntasks = {{ MAX_PARALLEL_TASKS }} - - [[process]] - [[[directives]]] - --time = 2 - --mem = 2G - - [[process]] - [[[directives]]] - --time = 6 - --mem = 2G From fe016567bf4741c4d65ef10b8ec4925494c20135 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Mon, 13 Mar 2023 10:21:24 +0000 Subject: [PATCH 14/41] #3060 add jasmin.cylc --- .../recipe_test_workflow/site/jasmin.cylc | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc 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..01ce1f8bb3 --- /dev/null +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc @@ -0,0 +1,7 @@ +#!jinja2 +[runtime] + [[COMPUTE]] + platform = lotus + [[[directives]]] + --wckey = RTW + --ntasks = {{ MAX_PARALLEL_TASKS }} From 1f6d19871c3a23844d0738d1f760f73ecfbad6bc Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 09:03:30 +0000 Subject: [PATCH 15/41] #3060: change localhost to batch system --- .../recipe_test_workflow/site/jasmin.cylc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 index 01ce1f8bb3..668424ad77 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc @@ -1,7 +1,17 @@ #!jinja2 [runtime] [[COMPUTE]] - platform = lotus + batch system = slurm [[[directives]]] --wckey = RTW --ntasks = {{ MAX_PARALLEL_TASKS }} + + [[process]] + [[[directives]]] + --time = 2 + --mem = 2G + + [[process]] + [[[directives]]] + --time = 6 + --mem = 2G From 522a4804cd13cb0bde1cf1ee720fa04dbd72c77a Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 09:05:54 +0000 Subject: [PATCH 16/41] #3060: change batch to platform --- .../utils/recipe_test_workflow/recipe_test_workflow/flow.cylc | 2 +- .../recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 cbeb6e3db3..65e0f665c6 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -30,7 +30,7 @@ PYTHONPATH_PREPEND = ${ESMVALCORE_DIR}:${ESMVALTOOL_DIR} {% if SITE == "jasmin" %} [[[job]]] - batch system = slurm + platform = lotus execution time limit = PT15M [[[directives]]] --qos=short-serial 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 index 668424ad77..3594637a55 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc @@ -1,7 +1,7 @@ #!jinja2 [runtime] [[COMPUTE]] - batch system = slurm + platform = lotus [[[directives]]] --wckey = RTW --ntasks = {{ MAX_PARALLEL_TASKS }} From ac082cd3e5ee4cc65446a414c0b20ca97e6707de Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 09:10:40 +0000 Subject: [PATCH 17/41] #3060: change batch to platform --- .../recipe_test_workflow/recipe_test_workflow/flow.cylc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 65e0f665c6..d6e9701e94 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -18,6 +18,11 @@ [runtime] [[root]] +{% if SITE == "jasmin" %} + platform = lotus +{% else %} + platform = localhost +{% endif %} script = rose task-run env-script = "eval $(rose task-env)" [[[environment]]] @@ -30,7 +35,6 @@ PYTHONPATH_PREPEND = ${ESMVALCORE_DIR}:${ESMVALTOOL_DIR} {% if SITE == "jasmin" %} [[[job]]] - platform = lotus execution time limit = PT15M [[[directives]]] --qos=short-serial From b1242bbfbc533dc8242e9d285c714d0e84491bf3 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 09:20:37 +0000 Subject: [PATCH 18/41] #3060: update max tasks and time limit --- .../utils/recipe_test_workflow/recipe_test_workflow/flow.cylc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 d6e9701e94..7e768dadc3 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -38,8 +38,8 @@ execution time limit = PT15M [[[directives]]] --qos=short-serial - --time=05:00 - --ntasks=1 + --time=15:00 + --ntasks={{ MAX_PARALLEL_TASKS}} {% endif %} [[install_cold]] From 6fb55c6a25217b523eb978f41a68b1ab3af95411 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 09:25:34 +0000 Subject: [PATCH 19/41] #3060: add batch system back --- .../utils/recipe_test_workflow/recipe_test_workflow/flow.cylc | 1 + 1 file changed, 1 insertion(+) 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 7e768dadc3..e55cb4c063 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -35,6 +35,7 @@ PYTHONPATH_PREPEND = ${ESMVALCORE_DIR}:${ESMVALTOOL_DIR} {% if SITE == "jasmin" %} [[[job]]] + batch system = slurm execution time limit = PT15M [[[directives]]] --qos=short-serial From 03c7df75f352f4e2c4898b9a2e272195b70c0444 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 09:27:16 +0000 Subject: [PATCH 20/41] #3060: add method = slurm --- .../utils/recipe_test_workflow/recipe_test_workflow/flow.cylc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e55cb4c063..eb9b042459 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -35,7 +35,7 @@ PYTHONPATH_PREPEND = ${ESMVALCORE_DIR}:${ESMVALTOOL_DIR} {% if SITE == "jasmin" %} [[[job]]] - batch system = slurm + method = slurm execution time limit = PT15M [[[directives]]] --qos=short-serial From 85eb16d424c0fd68f46894efe961707a327ff730 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 09:28:08 +0000 Subject: [PATCH 21/41] #3060: add job submission --- .../utils/recipe_test_workflow/recipe_test_workflow/flow.cylc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 eb9b042459..f4c0e610a6 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -34,7 +34,7 @@ ESMVALTOOL_DIR = ${CYLC_WORKFLOW_RUN_DIR}/lib/ESMValTool PYTHONPATH_PREPEND = ${ESMVALCORE_DIR}:${ESMVALTOOL_DIR} {% if SITE == "jasmin" %} - [[[job]]] + [[[job submission]]] method = slurm execution time limit = PT15M [[[directives]]] From 476040b18f1847a1f062817ed419ed7b929d5be6 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 09:29:36 +0000 Subject: [PATCH 22/41] #3060: put it back to how it was --- .../utils/recipe_test_workflow/recipe_test_workflow/flow.cylc | 4 ++-- .../recipe_test_workflow/site/jasmin.cylc | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) 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 f4c0e610a6..e55cb4c063 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -34,8 +34,8 @@ ESMVALTOOL_DIR = ${CYLC_WORKFLOW_RUN_DIR}/lib/ESMValTool PYTHONPATH_PREPEND = ${ESMVALCORE_DIR}:${ESMVALTOOL_DIR} {% if SITE == "jasmin" %} - [[[job submission]]] - method = slurm + [[[job]]] + batch system = slurm execution time limit = PT15M [[[directives]]] --qos=short-serial 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 index 3594637a55..07fa2aa286 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc @@ -1,7 +1,6 @@ #!jinja2 [runtime] [[COMPUTE]] - platform = lotus [[[directives]]] --wckey = RTW --ntasks = {{ MAX_PARALLEL_TASKS }} From 41158978eaf98d2a6b915e027baae18acb3a96cd Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 09:30:22 +0000 Subject: [PATCH 23/41] #3060: remove platform --- .../recipe_test_workflow/recipe_test_workflow/flow.cylc | 5 ----- 1 file changed, 5 deletions(-) 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 e55cb4c063..c3441d329b 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -18,11 +18,6 @@ [runtime] [[root]] -{% if SITE == "jasmin" %} - platform = lotus -{% else %} - platform = localhost -{% endif %} script = rose task-run env-script = "eval $(rose task-env)" [[[environment]]] From f042102259be7c623e2dd69a3cb0be23d2364037 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 10:44:33 +0000 Subject: [PATCH 24/41] #3060: revert changes back to working copy --- .../recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc | 1 + 1 file changed, 1 insertion(+) 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 index 07fa2aa286..3594637a55 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc @@ -1,6 +1,7 @@ #!jinja2 [runtime] [[COMPUTE]] + platform = lotus [[[directives]]] --wckey = RTW --ntasks = {{ MAX_PARALLEL_TASKS }} From 5645c56d85e5197db59d5ad89bd0bd871a08e733 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 10:45:09 +0000 Subject: [PATCH 25/41] #3060: revert changes back to working copy --- .../utils/recipe_test_workflow/recipe_test_workflow/flow.cylc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 c3441d329b..cbeb6e3db3 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -34,8 +34,8 @@ execution time limit = PT15M [[[directives]]] --qos=short-serial - --time=15:00 - --ntasks={{ MAX_PARALLEL_TASKS}} + --time=05:00 + --ntasks=1 {% endif %} [[install_cold]] From c35b24c205bea3af44a123d7e536245487017b28 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 10:50:28 +0000 Subject: [PATCH 26/41] #3060: remove host specification --- .../recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc | 1 - 1 file changed, 1 deletion(-) 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 index 3594637a55..07fa2aa286 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc @@ -1,7 +1,6 @@ #!jinja2 [runtime] [[COMPUTE]] - platform = lotus [[[directives]]] --wckey = RTW --ntasks = {{ MAX_PARALLEL_TASKS }} From 6462efcf78e15f3ab2178f2f079948b7f40a7031 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 11:44:10 +0000 Subject: [PATCH 27/41] #3060: add localhost declaration --- .../utils/recipe_test_workflow/recipe_test_workflow/flow.cylc | 2 +- .../recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 cbeb6e3db3..8639828a9c 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -18,6 +18,7 @@ [runtime] [[root]] + platform = localhost script = rose task-run env-script = "eval $(rose task-env)" [[[environment]]] @@ -30,7 +31,6 @@ PYTHONPATH_PREPEND = ${ESMVALCORE_DIR}:${ESMVALTOOL_DIR} {% if SITE == "jasmin" %} [[[job]]] - batch system = slurm execution time limit = PT15M [[[directives]]] --qos=short-serial 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 index 07fa2aa286..3594637a55 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc @@ -1,6 +1,7 @@ #!jinja2 [runtime] [[COMPUTE]] + platform = lotus [[[directives]]] --wckey = RTW --ntasks = {{ MAX_PARALLEL_TASKS }} From 184625afaebcbb52fc950387d470624700ac6693 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 11:49:17 +0000 Subject: [PATCH 28/41] #3060: chang max tasks --- .../recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 3594637a55..c0b51decbb 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc @@ -4,7 +4,7 @@ platform = lotus [[[directives]]] --wckey = RTW - --ntasks = {{ MAX_PARALLEL_TASKS }} + --ntasks = 1 [[process]] [[[directives]]] From 3331e1eee417026cbc9ff6f81169e449dd8093bd Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 11:53:35 +0000 Subject: [PATCH 29/41] #3060: get rid of the jasmin specific things --- .../recipe_test_workflow/recipe_test_workflow/flow.cylc | 8 -------- 1 file changed, 8 deletions(-) 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 8639828a9c..827a969395 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -29,14 +29,6 @@ ESMVALCORE_DIR = ${CYLC_WORKFLOW_RUN_DIR}/lib/ESMValCore ESMVALTOOL_DIR = ${CYLC_WORKFLOW_RUN_DIR}/lib/ESMValTool PYTHONPATH_PREPEND = ${ESMVALCORE_DIR}:${ESMVALTOOL_DIR} -{% if SITE == "jasmin" %} - [[[job]]] - execution time limit = PT15M - [[[directives]]] - --qos=short-serial - --time=05:00 - --ntasks=1 -{% endif %} [[install_cold]] [[[environment]]] From 0ce85762a77daa56c471fb37730dcb5701fd436e Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 11:59:44 +0000 Subject: [PATCH 30/41] #3060: checkout to non broken commit --- .../recipe_test_workflow/app/install_cold/bin/install_cold.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh index 4a9b1b7eeb..6a9af6b1bf 100755 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh @@ -32,6 +32,8 @@ fi # (which is done via done via 'stderr'). git clone -q -b "${BRANCH}" "${ESMVALTOOL_URL}" "${ESMVALTOOL_DIR}" git clone -q -b "${BRANCH}" "${ESMVALCORE_URL}" "${ESMVALCORE_DIR}" +cd "${ESMVALCORE_DIR}" +git checkout 4527173 # Manually and temporarily install imagehash (it will be included in the # next ESMValTool community environment). From 2109ab1c57614efb154bbc0642352d78fe37ce3d Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Tue, 14 Mar 2023 12:36:24 +0000 Subject: [PATCH 31/41] #3060: fix configure step --- .../recipe_test_workflow/app/configure/bin/configure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py index f955cef11b..d3ab11f214 100755 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py @@ -13,7 +13,7 @@ category=UserWarning, module="esmvalcore.experimental._warnings", ) - import esmvalcore.config + import esmvalcore.experimental as esmvaltool import yaml USER_CONFIG_PATH = os.environ["USER_CONFIG_PATH"] @@ -25,7 +25,7 @@ def main(): # Get the default configuration values from ESMValTool. A dictionary is # needed here to avoid the config object from converting paths to PosixPath # objects, which causes issues when writing the YAML file. - config_values = dict(esmvalcore.config.CFG) + config_values = dict(esmvaltool.CFG) # Get the configuration values defined in the environment for the # ``configure`` task. From dfe056d3217bec9513fb0c0f1c34c8f28f90ed90 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Thu, 16 Mar 2023 12:54:42 +0000 Subject: [PATCH 32/41] #3060: update esmvaltool to checkout at non broken version --- .../recipe_test_workflow/app/install_cold/bin/install_cold.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh index 6a9af6b1bf..6f36a4c027 100755 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh @@ -31,6 +31,8 @@ fi # quiet ('-q') option to prevent the progress status from being reported # (which is done via done via 'stderr'). git clone -q -b "${BRANCH}" "${ESMVALTOOL_URL}" "${ESMVALTOOL_DIR}" +cd "${ESMVALTOOL_DIR}" +git checkout 146c92b git clone -q -b "${BRANCH}" "${ESMVALCORE_URL}" "${ESMVALCORE_DIR}" cd "${ESMVALCORE_DIR}" git checkout 4527173 From 96120c6a26ce83ab6479d5741f3867f503743af6 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Thu, 16 Mar 2023 13:16:35 +0000 Subject: [PATCH 33/41] #3060: add imagehash back in --- .../recipe_test_workflow/app/install_cold/bin/install_cold.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh index 6f36a4c027..04e960df74 100755 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/install_cold/bin/install_cold.sh @@ -39,4 +39,4 @@ git checkout 4527173 # Manually and temporarily install imagehash (it will be included in the # next ESMValTool community environment). -#rtw-env pip install imagehash -t "${CYLC_WORKFLOW_RUN_DIR}/lib/python" +rtw-env pip install imagehash -t "${CYLC_WORKFLOW_RUN_DIR}/lib/python" From d28f487199985858306f90815f3b53e113b2480c Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Thu, 16 Mar 2023 15:49:09 +0000 Subject: [PATCH 34/41] #3060: add KGO path to jasmin site conf --- .../recipe_test_workflow/opt/rose-suite-jasmin.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index a089442422..e4c85ee5c6 100644 --- 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 @@ -5,7 +5,7 @@ DRS_OBS="default" DRS_OBS4MIPS="default" ESMVALCORE_URL="https://github.com/ESMValGroup/ESMValCore.git" ESMVALTOOL_URL="https://github.com/ESMValGroup/ESMValTool.git" -KGO_ROOT_PATH="/data/users/esmval/KGO_v2.6.0/" +KGO_ROOT_PATH="/gws/nopw/j04/esmeval/KGO_v2.6.0/" MODULE_NAME="esmvaltool/2.7" ROOTPATH_CMIP5="/badc/cmip5/data/cmip5/output1" ROOTPATH_CMIP6="/badc/cmip6/data/CMIP6" From dccc4c618481ed1a7caf36c988d1b9a1f302b4bb Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Thu, 16 Mar 2023 16:13:46 +0000 Subject: [PATCH 35/41] #3060: set remove_preproc_dir to false --- .../recipe_test_workflow/app/configure/bin/configure.py | 1 + 1 file changed, 1 insertion(+) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py index d3ab11f214..a9c808f333 100755 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py @@ -68,6 +68,7 @@ def get_config_values_from_task_env(): "extra_facets_dir": [], "max_parallel_tasks": int(os.environ["MAX_PARALLEL_TASKS"]), "output_dir": os.environ["OUTPUT_DIR"], + "remove_preproc_dir": False, "rootpath": { "ana4mips": os.environ["ROOTPATH_ANA4MIPS"], "CMIP3": os.environ["ROOTPATH_CMIP3"], From af5c09f7216e55e35acfe082d6642f7af3c4e151 Mon Sep 17 00:00:00 2001 From: Emma Hogan Date: Wed, 30 Aug 2023 15:43:45 +0100 Subject: [PATCH 36/41] #3060: Keep ESMVal URLs with the clone app, fix typos, updates to attempt to get this working on JASMIN --- .../app/clone_latest_esmval/rose-app.conf | 5 ++--- .../recipe_test_workflow/recipe_test_workflow/flow.cylc | 4 +--- .../recipe_test_workflow/meta/rose-meta.conf | 2 +- .../recipe_test_workflow/opt/rose-suite-jasmin.conf | 6 +----- .../recipe_test_workflow/rose-suite.conf | 2 -- .../recipe_test_workflow/site/jasmin-env | 2 +- 6 files changed, 6 insertions(+), 15 deletions(-) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/clone_latest_esmval/rose-app.conf b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/clone_latest_esmval/rose-app.conf index 574f009a38..d2d4ffe572 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/clone_latest_esmval/rose-app.conf +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/clone_latest_esmval/rose-app.conf @@ -3,6 +3,5 @@ default=clone_latest_esmval.sh [env] BRANCH=main -ESMVALCORE_URL=${ESMVALCORE_URL} -ESMVALTOOL_URL=${ESMVALTOOL_URL} -SITE=${SITE} +ESMVALCORE_URL="https://github.com/ESMValGroup/ESMValCore.git" +ESMVALTOOL_URL="https://github.com/ESMValGroup/ESMValTool.git" 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 34ca150044..8ebe34bb33 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -20,7 +20,6 @@ [runtime] [[root]] - platform = localhost script = rose task-run env-script = "eval $(rose task-env)" [[[environment]]] @@ -35,14 +34,13 @@ [[install_env_file]] platform = localhost [[[environment]]] - ESMVALCORE_URL = {{ ESMVALCORE_URL }} - ESMVALTOOL_URL = {{ ESMVALTOOL_URL }} SITE = {{ SITE }} [[clone_latest_esmval]] platform = localhost [[configure]] + platform = localhost pre-script = "mkdir -p ${USER_CONFIG_DIR}" [[[environment]]] ROSE_TASK_APP = configure 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 index e4c85ee5c6..0b919d09b1 100644 --- 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 @@ -1,11 +1,7 @@ [template variables] DRS_CMIP5="BADC" DRS_CMIP6="BADC" -DRS_OBS="default" -DRS_OBS4MIPS="default" -ESMVALCORE_URL="https://github.com/ESMValGroup/ESMValCore.git" -ESMVALTOOL_URL="https://github.com/ESMValGroup/ESMValTool.git" -KGO_ROOT_PATH="/gws/nopw/j04/esmeval/KGO_v2.6.0/" +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" diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/rose-suite.conf b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/rose-suite.conf index 029b295dc1..433815fd48 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/rose-suite.conf +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/rose-suite.conf @@ -8,8 +8,6 @@ DRS_NATIVE6="default" DRS_OBS="default" DRS_OBS4MIPS="default" DRS_OBS6="default" -ESMVALCORE_URL="" -ESMVALTOOL_URL="" KGO_ROOT_PATH="" MAX_PARALLEL_TASKS=4 MODULE_NAME="" 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 index 34a7ad9b6f..56c6b251a9 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env @@ -1,6 +1,6 @@ #!/bin/bash -l # -# Usage metoffice-env COMMAND +# USAGE jasmin-env COMMAND # # ENVIRONMENT # MODULE_NAME The name of the module to load From d3ea7d85512270c175edf92aaa1d3900eaf494bc Mon Sep 17 00:00:00 2001 From: Emma Hogan Date: Wed, 27 Sep 2023 13:01:15 +0100 Subject: [PATCH 37/41] #3060: Revert ESMVal URLs --- .../app/clone_latest_esmval/rose-app.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/clone_latest_esmval/rose-app.conf b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/clone_latest_esmval/rose-app.conf index d2d4ffe572..8911ca1cfd 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/clone_latest_esmval/rose-app.conf +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/clone_latest_esmval/rose-app.conf @@ -3,5 +3,5 @@ default=clone_latest_esmval.sh [env] BRANCH=main -ESMVALCORE_URL="https://github.com/ESMValGroup/ESMValCore.git" -ESMVALTOOL_URL="https://github.com/ESMValGroup/ESMValTool.git" +ESMVALCORE_URL=git@github.com:ESMValGroup/ESMValCore.git +ESMVALTOOL_URL=git@github.com:ESMValGroup/ESMValTool.git From 9546bb2c02e92816e621549e346cb4ed1b09c104 Mon Sep 17 00:00:00 2001 From: Emma Hogan Date: Wed, 27 Sep 2023 15:10:45 +0100 Subject: [PATCH 38/41] #3060: Add executable permissions to the jasmin-env file --- .../recipe_test_workflow/recipe_test_workflow/site/jasmin-env | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin-env 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 old mode 100644 new mode 100755 From 2cb317badc9ddc19e44647dee4471cea6ddbbedf Mon Sep 17 00:00:00 2001 From: Emma Hogan Date: Fri, 6 Oct 2023 16:31:39 +0100 Subject: [PATCH 39/41] #3060: Use 'execution time limit' rather than the '--time' directive --- .../recipe_test_workflow/site/jasmin.cylc | 4 ++-- .../recipe_test_workflow/site/metoffice.cylc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 index c0b51decbb..5c3bea5fc1 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/site/jasmin.cylc @@ -7,11 +7,11 @@ --ntasks = 1 [[process]] + execution time limit = PT2M [[[directives]]] - --time = 2 --mem = 2G [[process]] + execution time limit = PT6M [[[directives]]] - --time = 6 --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 From 49ac5addc4ec5fab60618513dccabf5a1e7d048b Mon Sep 17 00:00:00 2001 From: Emma Hogan Date: Wed, 18 Oct 2023 11:20:25 +0100 Subject: [PATCH 40/41] #3060: Update quick start documentation --- .../doc/source/user_guide/quick_start.rst | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) 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..5e2f189f6e 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,28 @@ 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:: + + export CYLC_VERSION=8 + cylc vip -O jasmin * Browse the logs using `Cylc Review`_, a web service for browsing logs via an HTTP interface. From 63e8a732f61476ea8cec951d0b2966e24502eebe Mon Sep 17 00:00:00 2001 From: Emma Hogan Date: Fri, 20 Oct 2023 14:58:38 +0100 Subject: [PATCH 41/41] #3060: Add cd command to JASMIN instructions --- .../recipe_test_workflow/doc/source/user_guide/quick_start.rst | 1 + 1 file changed, 1 insertion(+) 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 5e2f189f6e..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 @@ -32,6 +32,7 @@ Quick Start * run the RTW on JASMIN:: + cd ESMValTool/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow export CYLC_VERSION=8 cylc vip -O jasmin