This file provides guidance to agents when working with code in this repository.
This repo contains Jenkins CI and cron test scripts for the E3SM climate model. Scripts are run by Jenkins on HPC machines; they are not run locally.
Jenkins clones two repos side by side:
E3SM/
E3SM_test_scripts/
setup_common.sh auto-detects whether the E3SM repo is named E3SM or ACME. Override with FORCE_REPO_PATH.
export SCRIPTROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )
export CIME_MACHINE=$machine
source $SCRIPTROOT/util/setup_common.shjenkins/${machine}_${test_or_branch}.sh
- Locates the E3SM repo and sets
$E3SMREPO - Finds
jenkins_scriptinside E3SM and sets$RUNSCRIPT - Sources
util/${CIME_MACHINE}_setup.shif it exists (loads modules, sets$RUNSCRIPT_FLAGS, etc.) - If
$DEBUGis set,$RUNSCRIPTbecomesecho <path>(dry-run mode)
| Variable | Description |
|---|---|
SCRIPTROOT |
Root of this repo |
CIME_MACHINE |
Machine name (e.g., chrysalis, pm-cpu, frontier) |
E3SMREPO |
Path to E3SM source repo |
RUNSCRIPT |
Path to jenkins_script inside E3SM |
RUNSCRIPT_FLAGS |
Extra flags, typically set in machine setup files |
SCREAM_MACHINE |
Set for SCREAM/EAMxx tests (often mirrors CIME_MACHINE) |
| Flag | Purpose |
|---|---|
-t <suite> |
Test suite (e.g., e3sm_prod, e3sm_eamxx_v1_medres) |
--compiler=<compiler> |
Compiler (e.g., intel, oneapi-ifx, craycray-mphipcc, craygnu-mphipcc) |
-O <branch> or -b <branch> |
Baseline branch for comparisons |
--baseline-compare |
Enable baseline comparison |
--pes-file <path> |
PE layout XML file |
-j <N> |
Number of parallel jobs |
--jenkins-id <X> |
Identifier for scripts running multiple test suites |
--scratch-root <path> |
Override scratch directory |
- Create
jenkins/${machine}_${test}.sh - Add the 3-line boilerplate (setting
CIME_MACHINEto the target machine) - Call
$RUNSCRIPTwith the appropriate flags - If the machine needs environment setup (modules, scratch paths), add or update
util/${machine}_setup.sh
Each util/${machine}_setup.sh is machine-specific:
- Loads lmod/Python/modules needed by CIME
- Sets
$RUNSCRIPT_FLAGS(e.g.,--scratch-root) - Sets
$PROJECTif required by the batch system
util/run_cime_tests.sh- Runs CIME Python unit tests via cmake/ctest against CDashutil/run_e3sm_test.sh+util/run_e3sm_ctest/- CMake+CTest project that testsrun_e3sm.template.cshand posts results to CDash