Util script to automate running an integration suite comparison - #985
Open
matthewhoffman wants to merge 6 commits into
Open
Util script to automate running an integration suite comparison#985matthewhoffman wants to merge 6 commits into
matthewhoffman wants to merge 6 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
api.rst) has any new or modified class, method and/or functions listedE3SM-Projectsubmodule has been updated with relevant E3SM changesMALI-Devsubmodule has been updated with relevant MALI changesTestingin this PR) any testing that was used to verify the changes