Skip to content
Snippets Groups Projects
Commit d6d58a52 authored by Oriol Tintó's avatar Oriol Tintó
Browse files

Further simplification of the test cases.

parent 2b7aad26
No related branches found
No related tags found
No related merge requests found
Pipeline #18809 failed
#!/bin/bash
#######################################################################################################################
# Three variables are required to define the test case
EXPID="rfipsp"
ICON_CASE="real-from-ideal"
ICON_VERSION="psp"
EXTRA_NAMELIST=$(
......@@ -30,11 +31,4 @@ source ${SCRIPT_DIR}/example_utils.sh
# case: right now it can be real-from-ideal or real-from-dwd-ana
# ICON_VERSION: it can be master, psp, plexrt or a specific version like 2.6.5-nwp0 (the latest at that moment)
# EXTRA_NAMELIST: In case we want to provide extra parameters we can use it
setup_autoicon_example "$ICON_CASE" "$ICON_VERSION" "${EXTRA_NAMELIST}"
# Create and run experiment
autosubmit create ${EXPID} -np
autosubmit run ${EXPID}
# Check that all jobs finished correctly
[ ! -s autosubmit/${EXPID}/tmp/ASLOGS/jobs_failed_status.log ] || exit 1
run_autoicon_example "$EXPID" "$ICON_CASE" "$ICON_VERSION" "${EXTRA_NAMELIST}"
#!/bin/bash
#######################################################################################################################
# Three variables are required to define the test case
EXPID="rfi"
ICON_CASE="real-from-ideal"
ICON_VERSION="2.6.5-nwp0"
EXTRA_NAMELIST=""
......@@ -19,11 +20,6 @@ source ${SCRIPT_DIR}/example_utils.sh
# case: right now it can be real-from-ideal or real-from-dwd-ana
# ICON_VERSION: it can be master, psp, plexrt or a specific version like 2.6.5-nwp0 (the latest at that moment)
# EXTRA_NAMELIST: In case we want to provide extra parameters we can use it
setup_autoicon_example "$ICON_CASE" "$ICON_VERSION" "${EXTRA_NAMELIST}"
run_autoicon_example "$EXPID" "$ICON_CASE" "$ICON_VERSION" "${EXTRA_NAMELIST}"
# Create and run experiment
autosubmit create ${EXPID} -np
autosubmit run ${EXPID}
# Check that all jobs finished correctly
[ ! -s autosubmit/${EXPID}/tmp/ASLOGS/jobs_failed_status.log ] || exit 1
#!/bin/bash
#######################################################################################################################
# Three variables are required to define the test case
EXPID="rfda"
ICON_CASE="real-from-dwd-ana"
ICON_VERSION="2.6.5-nwp0"
EXTRA_NAMELIST=""
......@@ -19,11 +20,4 @@ source ${SCRIPT_DIR}/example_utils.sh
# case: right now it can be real-from-ideal or real-from-dwd-ana
# ICON_VERSION: it can be master, psp, plexrt or a specific version like 2.6.5-nwp0 (the latest at that moment)
# EXTRA_NAMELIST: In case we want to provide extra parameters we can use it
setup_autoicon_example "$ICON_CASE" "$ICON_VERSION" "${EXTRA_NAMELIST}"
# Create and run experiment
autosubmit create ${EXPID} -np
autosubmit run ${EXPID}
# Check that all jobs finished correctly
[ ! -s autosubmit/${EXPID}/tmp/ASLOGS/jobs_failed_status.log ] || exit 1
run_autoicon_example "$EXPID" "$ICON_CASE" "$ICON_VERSION" "${EXTRA_NAMELIST}"
# setup_autoicon_example function that sets up an AutoSub environment for the ICON model
function setup_autoicon_example() {
function run_autoicon_example() {
# Read the input parameters
local ICON_CASE=$1
local ICON_VERSION=$2
local EXTRA_NAMELIST=$3
local EXPID=$1
local ICON_CASE=$2
local ICON_VERSION=$3
local EXTRA_NAMELIST=$4
# Setup environment
setup_environment
......@@ -12,7 +14,9 @@ function setup_autoicon_example() {
configure_and_install_autosubmit
# Set up project
setup_project
setup_project "$EXPID"
create_and_run_experiment "$EXPID"
}
......@@ -57,9 +61,9 @@ function configure_and_install_autosubmit() {
}
function setup_project() {
local EXPID=$1
PROJECT_ORIGIN="https://gitlab.physik.uni-muenchen.de/w2w/autoicon.git"
PROJECT_BRANCH="master"
EXPID=rfi001
# If experiment directory doesn't exist, create it and set up the experiment
if [ ! -e autosubmit/$EXPID/ ]; then
......@@ -113,7 +117,6 @@ spack:
upstreams: "/software/opt/focal/x86_64/spack/2023.02/spack/opt/spack"
icon:
#build_cmd: "icon-nwp@%ICON.VERSION%% %SPACK.COMPILER%+debug+petsc target=x86_64_v2 ^openmpi+pmi+legacylaunchers schedulers=slurm fabrics=ucx ucx+dc+dm+ib_hw_tm+mlx5_dv+rc+rdmacm+thread_multiple+ud+verbs"
build_cmd: "icon-nwp@%ICON.VERSION%% %SPACK.COMPILER%+debug~mpichecks target=x86_64_v2 source=dkrz_https"
version: ${ICON_VERSION}
......@@ -134,3 +137,16 @@ EOF
fi
}
function create_and_run_experiment() {
local EXPID=$1
# Create and run experiment
autosubmit create ${EXPID} -np
autosubmit run ${EXPID}
# Check that all jobs finished correctly
[ ! -s autosubmit/${EXPID}/tmp/ASLOGS/jobs_failed_status.log ] || (
cat autosubmit/${EXPID}/tmp/ASLOGS/jobs_failed_status.log
exit 1
)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment