Skip to content

Util script to automate running an integration suite comparison - #985

Open
matthewhoffman wants to merge 6 commits into
MPAS-Dev:mainfrom
matthewhoffman:automate-integration-suite-comparison
Open

Util script to automate running an integration suite comparison#985
matthewhoffman wants to merge 6 commits into
MPAS-Dev:mainfrom
matthewhoffman:automate-integration-suite-comparison

Conversation

@matthewhoffman

Copy link
Copy Markdown
Member

This PR adds a script that sets up and runs a compass suite for two different versions of the model, and optionally two versions of compass.

Checklist

  • User's Guide has been updated
  • Developer's Guide has been updated
  • API documentation in the Developer's Guide (api.rst) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • The E3SM-Project submodule has been updated with relevant E3SM changes
  • The MALI-Dev submodule has been updated with relevant MALI changes
  • Document (in a comment titled Testing in this PR) any testing that was used to verify the changes
  • New tests have been added to a test suite

matthewhoffman and others added 6 commits September 12, 2026 10:55
It takes refs for compass and MALI for the baseline and testing
versions,  It then sets up compass and MALI for baseline and testing.
Then submits jobs for both, with the testing one being dependent on the
first.  It was written with MALI in mind, but should work for MPAS-Ocean
as well.
Add EXISTING_COMPASS_DIR_BASELINE and EXISTING_COMPASS_DIR_TESTING
config options so the script can reuse an already-cloned (and
optionally already-deployed) compass checkout instead of always
managing its own clone under ROOT_WORK_DIR. When set, git
clone/checkout is skipped entirely to avoid touching the existing
working tree, and deploy.py is only run if no matching load script is
found. --force is ignored for these directories.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
log() and the noisy deploy.py/compass suite subcommands were writing
to stdout inside functions whose return value is captured via
command substitution (deploy_compass_env, setup_suite). This caused
all of their console output to be concatenated into the "returned"
path string, producing a bogus multi-line value that triggered
"File name too long" when later used with `source`.

Route log() to stderr and explicitly redirect deploy.py/compass
suite stdout to stderr so only the intended echoed value is captured.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The compass-generated load script chains into third-party pixi/conda
activation hooks (e.g. cartopy_offline_data-activate.sh) that
reference variables without guarding against nounset, causing our
strict `set -euo pipefail` to abort with "unbound variable" errors
that have nothing to do with this script's own logic.

Add a source_load_script helper that temporarily disables -u/-e for
the duration of the source call, then restores our strict settings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
compass suite requires -p pointing at the compiled MALI component
directory. Add a mali_path parameter to setup_suite and pass
<MALI-*>/components/mpas-albany-landice for both baseline and testing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
compass suite job scripts expect to be submitted from the suite work
dir they were written into (e.g. for relative paths used inside the
script). Cd into that directory before calling sbatch instead of
submitting from wherever this script happens to be run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant