Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d46efdd
Make run_reframe.sh loop over versions defined in EESSI_VERSIONS (int…
Jan 19, 2026
35a8b06
Add 2025.06 to default list of EESSI_VERSION
Jan 19, 2026
e937e4e
Improve behaviour in case EESSI module is NOT used, or in case local …
Jan 19, 2026
ed54378
Apply suggestion from @casparvl
casparvl Apr 9, 2026
7270887
Apply suggestion from @casparvl
casparvl Apr 9, 2026
47e28b3
Remove loop. Still WIP. But need to figure out if we should specify t…
Apr 30, 2026
7813dcc
Merge remote-tracking branch 'refs/remotes/origin/make_run_reframe_lo…
Apr 30, 2026
d13df26
Make sure we support EESSI and local programming environments, and pa…
Apr 30, 2026
89b1ace
Remove stray 'REFRAME_URL='
Jun 17, 2026
c1e3ded
No longer needed now that we've internalized the hpctestlib into EESS…
Jun 17, 2026
8fea8eb
Merge branch 'support_multiple_eessi_environments' into make_run_refr…
Jun 17, 2026
2bd4564
Remove more things related to cloning the reframe repo for the hpctes…
Jun 17, 2026
281d1ac
Merge branch 'main' into make_run_reframe_loop_eessi_versions
Jun 22, 2026
7b25663
Corrected path, it was missing 'versions' in the prefix
Jul 1, 2026
d72a9e1
Add a default env on the AWS cluster for testing with run_reframe.sh
Jul 10, 2026
9284d09
Forgot to actually add the default environment to the list of valid e…
Jul 10, 2026
a082116
Add early exit if no environment is to be tested. And make sure any m…
Jul 10, 2026
6611d83
Get rid of legacy code which assumed that the local module environmen…
Jul 10, 2026
4eaf857
Remove local environemnt (was just for testing)
Jul 10, 2026
774f992
Clarifying comment
Jul 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 102 additions & 75 deletions CI/run_reframe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,13 @@ fi
source "${CI_CONFIG}"

# Set default configuration, but let anything set by CI_CONFIG take priority
if [ -z "${REFRAME_ARGS}" ]; then
REFRAME_ARGS="--tag CI --tag 1_node"
fi
if [ -z "${REFRAME_VERSION}"]; then
REFRAME_VERSION=4.8.1
fi
if [ -z "${REFRAME_URL}" ]; then
REFRAME_URL='https://github.com/reframe-hpc/reframe.git'
fi
if [ -z "${REFRAME_BRANCH}" ]; then
REFRAME_BRANCH="v${REFRAME_VERSION}"
fi
if [ -z "${EESSI_TESTSUITE_URL}" ]; then
EESSI_TESTSUITE_URL='https://github.com/EESSI/test-suite.git'
fi
# Arguments that will be passed to the `reframe` command
REFRAME_ARGS="${REFRAME_ARGS:---tag CI --tag 1_node}"
# Version of ReFrame that will be pip-installed
REFRAME_VERSION="${REFRAME_VERSION:-4.8.1}"
# URL that will be used to clone the testsuite from.
# The same URL will be used by default to get the ReFrame config files from, unless EESSI_CONFIGS_TESTSUITE_URL is explicitely set
EESSI_TESTSUITE_URL="${EESSI_TESTSUITE_URL:-https://github.com/EESSI/test-suite.git}"
if [ -z "${EESSI_TESTSUITE_BRANCH}" ]; then
git clone -n --depth=1 --filter=tree:0 ${EESSI_TESTSUITE_URL} "${TEMPDIR}/test-suite-version-checkout"
cd "${TEMPDIR}/test-suite-version-checkout"
Expand All @@ -62,43 +54,49 @@ if [ -z "${EESSI_TESTSUITE_BRANCH}" ]; then
EESSI_TESTSUITE_BRANCH="${LATEST_VERSION}"
cd ${TEMPDIR}
fi
if [ -z "${EESSI_CONFIGS_TESTSUITE_URL}" ]; then
EESSI_CONFIGS_TESTSUITE_URL="${EESSI_TESTSUITE_URL}"
fi
if [ -z "${EESSI_CONFIGS_TESTSUITE_BRANCH}" ]; then
EESSI_CONFIGS_TESTSUITE_BRANCH="${EESSI_TESTSUITE_BRANCH}"
fi
if [ -z "${USE_EESSI_SOFTWARE_STACK}" ] || [ "$USE_EESSI_SOFTWARE_STACK" == "True" ]; then
export USE_EESSI_SOFTWARE_STACK=True
if [ -z "${EESSI_CVMFS_REPO}" ]; then
export EESSI_CVMFS_REPO=/cvmfs/software.eessi.io
fi
if [ -z "${EESSI_VERSION}" ]; then
export EESSI_VERSION=2023.06
fi
fi
if [ -z "${RFM_CONFIG_FILES}" ]; then
export RFM_CONFIG_FILES="${TEMPDIR}/configs/config/${EESSI_CI_SYSTEM_NAME}.py"
fi
if [ -z "${RFM_CHECK_SEARCH_PATH}" ]; then
export RFM_CHECK_SEARCH_PATH="${TEMPDIR}/test-suite/eessi/testsuite/tests/"
fi
if [ -z "${RFM_CHECK_SEARCH_RECURSIVE}" ]; then
export RFM_CHECK_SEARCH_RECURSIVE=1
fi
if [ -z "${RFM_PREFIX}" ]; then
export RFM_PREFIX="${HOME}/reframe_CI_runs"
fi
if [ -z "${REFRAME_TIMEOUT}" ]; then
# 10 minutes short of 1 day, since typically the test suite will be run daily.
# This will prevent multiple ReFrame runs from piling up and exceeding the quota on our Magic Castle clusters
export REFRAME_TIMEOUT=1430m
fi
if [ -z "${UNSET_MODULEPATH}" ]; then
export UNSET_MODULEPATH=True
fi
if [ -z "${SET_LOCAL_MODULE_ENV}" ]; then
export SET_LOCAL_MODULE_ENV=False
# The URL used to clone the ReFrame configuration files from
EESSI_CONFIGS_TESTSUITE_URL="${EESSI_CONFIGS_TESTSUITE_URL:-${EESSI_TESTSUITE_URL}}"
# The branch to clone for the ReFrame configuration files
EESSI_CONFIGS_TESTSUITE_BRANCH="${EESSI_CONFIGS_TESTSUITE_BRANCH:-${EESSI_TESTSUITE_BRANCH}}"
# If no module command is available from the system, the lmod init script will be sourced from the EESSI
# version defined by USE_MODULECMD_FROM_EESSI_VERSION
export USE_MODULECMD_FROM_EESSI_VERSION="${USE_MODULECMD_FROM_EESSI_VERSION:-2025.06}"
# The CVMFS repository that will be used to provide the module command or
# (if testing the EESSI software stack AND a module command is already available) to provide the modules to initialize EESSI
export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}"
# Determines if the EESSI software stack will be tested (as opposed to just local modules)
export USE_EESSI_SOFTWARE_STACK="${USE_EESSI_SOFTWARE_STACK:-True}"
if [ "$USE_EESSI_SOFTWARE_STACK" == "True" ]; then
Comment thread
casparvl marked this conversation as resolved.
# Which versions of EESSI will be tested. Note that these are names of ReFrame programming environments.
# These need to match names that are defined in the ReFrame configuration file
export REFRAME_EESSI_PROGRAMMING_ENVS="${REFRAME_EESSI_PROGRAMMING_ENVS:-EESSI-2023.06,EESSI-2025.06}"
fi
# Which ReFrame configuration file to use.
# Defaults to the ones from the EESSI_CONFIGS_TESTSUITE_URL and EESSI_CONFIGS_TESTSUITE_BRANCH for the provided EESSI_CI_SYSTEM_NAME
export RFM_CONFIG_FILES="${RFM_CONFIG_FILES:-${TEMPDIR}/configs/config/${EESSI_CI_SYSTEM_NAME}.py}"
# Path that ReFrame should search for tests
export RFM_CHECK_SEARCH_PATH="${RFM_CHECK_SEARCH_PATH:-${TEMPDIR}/test-suite/eessi/testsuite/tests/}"
# Should ReFrame search the path recursively
export RFM_CHECK_SEARCH_RECURSIVE="${RFM_CHECK_SEARCH_RECURSIVE:-1}"
# Where should reframe store the staging / output dirs etc
export RFM_PREFIX="${RFM_PREFIX:-${HOME}/reframe_CI_runs}"
# 10 minutes short of 1 day, since typically the test suite will be run daily.
# This will prevent multiple ReFrame runs from piling up and exceeding the quota on our Magic Castle clusters
export REFRAME_TIMEOUT="${REFRAME_TIMEOUT:-1430m}"
# Unsets the MODULEPATH before loading any EESSI or local environment modules
export UNSET_MODULEPATH="${UNSET_MODULEPATH:-True}"
# Which local programming environments to test. Note that these are names of ReFrame programming environments.
# These need to match names that are defined in the ReFrame configuration file
export REFRAME_LOCAL_PROGRAMMING_ENVS="${REFRAME_LOCAL_PROGRAMMING_ENVS:-}" # Assumed to be a comma seperated list

# Check that SOME programming env has been defined. If not, exit early with instructions
if [ -z $REFRAME_EESSI_PROGRAMMING_ENVS ] && [ -z $REFRAME_LOCAL_PROGRAMMING_ENVS ]; then
msg="You should define at least one ReFrame programming environment that needs to be tested (by defining either"
msg="$msg REFRAME_EESSI_PROGRAMMING_ENVS or REFRAME_LOCAL_PROGRAMMING_ENVS). Note that"
msg="$msg REFRAME_EESSI_PROGRAMMING_ENVS can be set indirectly by setting USE_EESSI_SOFTWARE_STACK=True."
msg="$msg Exiting..."
echo "$msg"
exit 1
fi

# Create virtualenv for ReFrame using system python
Expand All @@ -107,12 +105,6 @@ source "${TEMPDIR}"/reframe_venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install reframe-hpc=="${REFRAME_VERSION}"

# Clone reframe repo to have the hpctestlib:
REFRAME_CLONE_ARGS="${REFRAME_URL} --branch ${REFRAME_BRANCH} --depth 1 ${TEMPDIR}/reframe"
echo "Cloning ReFrame repo: git clone ${REFRAME_CLONE_ARGS}"
git clone ${REFRAME_CLONE_ARGS}
export PYTHONPATH="${PYTHONPATH}":"${TEMPDIR}"/reframe

# Clone configs from test suite repo
EESSI_CONFIGS_CLONE_ARGS="-n --filter=tree:0 ${EESSI_CONFIGS_TESTSUITE_URL} --branch ${EESSI_CONFIGS_TESTSUITE_BRANCH} --depth 1 ${TEMPDIR}/configs"
echo "Cloning configs from EESSI test suite repo:"
Expand All @@ -128,31 +120,48 @@ git checkout
echo "cd ${TEMPDIR}"
cd ${TEMPDIR}


# Clone test suite repo
EESSI_CLONE_ARGS="${EESSI_TESTSUITE_URL} --branch ${EESSI_TESTSUITE_BRANCH} --depth 1 ${TEMPDIR}/test-suite"
echo "Cloning EESSI repo: git clone ${EESSI_CLONE_ARGS}"
git clone ${EESSI_CLONE_ARGS}
export PYTHONPATH="${PYTHONPATH}":"${TEMPDIR}"/test-suite/

# Unset the ModulePath on systems where it is required
unset MODULEPATH_ORIGINAL # Make sure this isn't defined, or we might restore from some external value later on
if [ "$UNSET_MODULEPATH" == "True" ]; then
unset MODULEPATH
fi

# Set local module environment
if [ "$SET_LOCAL_MODULE_ENV" == "True" ]; then
if [ -z "${LOCAL_MODULES}" ]; then
echo "You have to add the name of the module in the ci_config.sh file of your system"
else
# Store the original modulepath. If we need to use the module command from EESSI, we need
# to restore this modulepath after initializing the module command
MODULEPATH_ORIGINAL=$MODULEPATH
fi

# With https://github.com/EESSI/test-suite/pull/326 we no longer need to load the EESSI module
# before running the reframe command (reframe will load the modules for us)
# However, on systems in which there is no module command, we do need to initialize an
# EESSI environment to get a module command
if ! command -v module &>/dev/null; then
# No module command available
if [ ! -z "$USE_MODULECMD_FROM_EESSI_VERSION" ]; then
echo "Using module command from EESSI version ${USE_MODULECMD_FROM_EESSI_VERSION}"
source "${EESSI_CVMFS_REPO}/versions/${USE_MODULECMD_FROM_EESSI_VERSION}/init/lmod/bash"
module unload EESSI
if [ ! -z "$MODULEPATH_ORIGINAL" ]; then
echo "Prepending original modulepath: $MODULEPATH_ORIGINAL"
module use "$MODULEPATH_ORIGINAL"
fi
else
msg="No module command available, and this CI run was not configured to use the EESSI module command."
msg="$msg Consider setting 'USE_MODULECMD_FROM_EESSI_VERSION=<eessi_version>' in your CI runs to use a module"
msg="$msg command from the EESSI compatibility layer. Exiting..."
echo $msg
exit 1
fi
module load ${LOCAL_MODULES}
fi

# Start the EESSI environment
if [ "$USE_EESSI_SOFTWARE_STACK" == "True" ]; then
eessi_init_path="${EESSI_CVMFS_REPO}"/versions/"${EESSI_VERSION}"/init/bash
source "${eessi_init_path}"
else
# Module command available. Make sure the EESSI modules are on the PATH if we are testing EESSI environments
if [ "$USE_EESSI_SOFTWARE_STACK" == "True" ]; then
module use "${EESSI_CVMFS_REPO}/init/modules/"
fi
Comment thread
casparvl marked this conversation as resolved.
fi

# Needed in order to make sure the reframe from our TEMPDIR is first on the PATH,
Expand All @@ -161,6 +170,26 @@ fi
deactivate
source "${TEMPDIR}"/reframe_venv/bin/activate

# Modify the REFRAME_ARGS to take the requested programming environments into account
REFRAME_PROGRAMMING_ENVS="${REFRAME_LOCAL_PROGRAMMING_ENVS},${REFRAME_EESSI_PROGRAMMING_ENVS}"
REFRAME_PROGRAMMING_ENVS="${REFRAME_PROGRAMMING_ENVS%,}" # Remove any leading comma in case 1st list is empty
REFRAME_PROGRAMMING_ENVS="${REFRAME_PROGRAMMING_ENVS#,}" # Remove any trailing comma in case 2nd list is empty
# Replace commas by | since ReFrame expects a regex and we want tests to run if they match any of the programming envs
REFRAME_PROGRAMMING_ENVS_PIPED="${REFRAME_PROGRAMMING_ENVS//,/|}"
# This should always be true, as either REFRAME_LOCAL_PROGRAMMING_ENVS or REFRAME_EESSI_PROGRAMMING_ENVS should be
# defined (otherwise this script would have already hit an early exit, see above). But check in case the manipulation
# of these envirionment variables above somehow failed
if [ -n "$REFRAME_PROGRAMMING_ENVS_PIPED" ]; then
REFRAME_ARGS="${REFRAME_ARGS} -p $REFRAME_PROGRAMMING_ENVS_PIPED"
else
msg="REFRAME_PROGRAMMING_ENVS_PIPED appears to be unset or emtpy. This should never happen."
msg="$msg It is constructed from REFRAME_EESSI_PROGRAMMING_ENVS=$REFRAME_EESSI_PROGRAMMING_ENVS and"
msg="$msg REFRAME_LOCAL_PROGRAMMING_ENVS=$REFRAME_LOCAL_PROGRAMMING_ENVS. Please check that either of these"
msg="$msg has been set. Exiting..."
echo "$msg"
exit 1
fi
Comment thread
casparvl marked this conversation as resolved.

# Print ReFrame config
echo "Starting CI run with the follwing settings:"
echo ""
Expand All @@ -170,17 +199,15 @@ echo "EESSI test suite URL: ${EESSI_TESTSUITE_URL}"
echo "EESSI test suite version: ${EESSI_TESTSUITE_BRANCH}"
echo "EESSI test suite URL for configs: ${EESSI_CONFIGS_TESTSUITE_URL}"
echo "EESSI test suite version for configs: ${EESSI_CONFIGS_TESTSUITE_BRANCH}"
echo "HPCtestlib from ReFrame URL: ${REFRAME_URL}"
echo "HPCtestlib from ReFrame branch: ${REFRAME_BRANCH}"
echo "ReFrame executable: $(which reframe)"
echo "ReFrame version: $(reframe --version)"
echo "ReFrame config file: ${RFM_CONFIG_FILES}"
echo "ReFrame check search path: ${RFM_CHECK_SEARCH_PATH}"
echo "ReFrame check search recursive: ${RFM_CHECK_SEARCH_RECURSIVE}"
echo "ReFrame prefix: ${RFM_PREFIX}"
echo "Testing ReFrame programming environments: ${REFRAME_PROGRAMMING_ENVS}"
echo "ReFrame args: ${REFRAME_ARGS}"
echo "Using EESSI: ${USE_EESSI_SOFTWARE_STACK}"
echo "Using local software stack ${SET_LOCAL_MODULE_ENV}"
echo "MODULEPATH: ${MODULEPATH}"
echo ""

Expand Down
2 changes: 1 addition & 1 deletion config/aws_mc.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
] + list(SCALES.keys()),
'prepare_cmds': [
# This system doesn't have an lmod installation by default, so source one from EESSI
'source /cvmfs/software.eessi.io/2025.06/init/lmod/bash',
'source /cvmfs/software.eessi.io/versions/2025.06/init/lmod/bash',
'module unload EESSI',
# Required when using srun as launcher with --export=NONE in partition access, in order to ensure job
# steps inherit environment. It doesn't hurt to define this even if srun is not used
Expand Down
Loading