Repository navigation
GitHub Actions CI: CPU compilers with ECT validation - #1524
cenamiller wants to merge 10 commits into
Conversation
Add the GitHub Actions CI infrastructure for MPAS-Atmosphere CPU testing. This includes: - ci-config.env: central configuration for container images, compiler mappings, MPI flags, test data release tags, and ECT parameters. Test data is hosted on NCAR/MPAS-Model-CI GitHub releases. - Composite actions for building MPAS (build-mpas), downloading test data archives (download-testdata), resolving container images (resolve-container), running MPAS (run-mpas), running perturbed ensemble members for ECT (run-perturb-mpas), validating with PyCECT (validate-ect), extracting the MPAS version from Registry.xml (mpas-version), printing per-rank log files (print-mpas-logs), and generating consolidated ECT summary tables (ect-summary). - ECT variable exclusion list. Developed in NCAR/MPAS-Model-CI. Cursor assistance.
Add GitHub Actions workflows that build MPAS-Atmosphere and validate correctness using the Ensemble Consistency Test (PyCECT) across three compiler families and two MPI implementations: - _test-compiler.yml: reusable workflow (build -> 3 perturbed ensemble members in parallel -> PyCECT validation -> artifact cleanup) - Per-compiler callers: GCC+MPICH, GCC+OpenMPI, Intel+MPICH, Intel+OpenMPI, NVHPC+MPICH, NVHPC+OpenMPI All callers run automatically on push/PR to master, develop, and feature/ci-cpu-testing. All builds run on GitHub-hosted ubuntu-latest runners inside NCAR hpcdev Docker containers. Test data and ECT ensemble summaries are downloaded from NCAR/MPAS-Model-CI GitHub releases. ECT reference: Price-Broncucia et al. (2025), doi:10.5194/gmd-18-2349-2025 Developed in NCAR/MPAS-Model-CI. Cursor assistance.
Add a CI Status section to the top of README.md showing ECT validation badges for all six compiler+MPI combinations (GCC, Intel, NVHPC x MPICH, OpenMPI). Badges link to the GitHub Actions workflow runs. Cursor assistance.
Prevent GITHUB_TOKEN from persisting in .git/config after checkout. Only the build job's checkouts had this set; add it to config, ect-run, and ect-validate jobs. Cursor assistance.
Move actions:write from workflow-level to the cleanup job, which is the only job that needs it (for deleting temporary artifacts). Other jobs now run with only contents:read. Cursor assistance.
Pin all GitHub Actions (checkout, upload-artifact, download-artifact, cache, setup-python) to full commit SHAs instead of mutable version tags. Pin PyCECT clone to a verified commit SHA (3.3.1 tag) and add a commit verification check in validate-ect. Cursor assistance.
Derive ECT release tags from the MPAS major/minor version so compatible patch releases use the same ensemble summary and spin-up restart. Assisted-by: Claude
Resolve ECT versions from the source under test, fail when required artifacts or restart data are missing, and retain failed ECT summaries. Guard optional container setup, verify NVHPC Makefile edits, and remove the unused run-mpas action. Assisted-by: Claude
|
Depending on what science changes have been merged into develop at the same time, we shouldn't expect the ect to pass until I generate a new summary file. But let's see! |
|
@cenamiller Thanks for this new PR! |
|
@cenamiller @abishekg7 Following up on the comments from PR #1469 (which this PR replaces), I agree with most of them, and I'm fine with addressing some of them (e.g., adding build tests for the Is it the case as of now that all of the tests will run with every push to a PR branch? |
It is now a pared down set of tests, but yes, they will be triggered with every push to a PR branch. |
|
Hi, yes, agreed with Abishek. I've been thinking about this. It may be nice to have the "runs on every push to a PR" branch feature for a bit, because it makes it easier to trigger tests on old PRs, with just a push. Otherwise, contributors would need to close/reopen the PR in order to trigger tests. But once we've run them on some old PRs, we can very easily turn that trigger off. And anyway, if the tests make it to the default branch, you'll be able to manually dispatch tests when you think it's appropriate and we won't be so beholden to an automatic trigger. |
|
@cenamiller @abishekg7 What do you all think about (1) removing the ECT tests from this PR, and (2) adding build tests for the |
|
@mgduda Yes, we can do that! It won't take very long to set up, but I don't have those tests ready as stand-alones. I can submit them before lunch tomorrow though. Would you like them to run on the same triggers as these? And which compilers for each? The options for 'just build' would be GNU, Intel OneAPI, NVHPC (for CPU) and NVHPC+OpenACC. And for sides we have PIO/SMIOL and MPICH/OpenMPI. |
In the interest of keeping everything as simple as possible for now, would it be reasonable to add an extra step to the build workflows to compile the |
|
I think keeping the existing build matrix and triggers, and just adding the build of |
Adding a build of the |
Replaces #1469 (closed prematurely).
This PR adds some initial GitHub Actions continuous integration (CI) for MPAS-A. These workflows do automated build and correctness testing for Intel OneAPI, NVHPC, and GNU compilers on CPU.
This is a subset of the testing that's been developed on the github.com/NCAR/MPAS-Model-CI fork.
The goal of this testing is to catch build issues and validate that the model output remains within the bounds of internal variability using the Ensemble Consistency Test (ECT/PyCECT; Price-Broncucia et al. 2025, doi:10.5194/gmd-18-2349-2025).
These workflows:
hpcdevDocker containers on GitHub-hosted runners. (PIO testing is available on the MPAS-Model-CI fork and will be included in future PRs)develop(or when someone pushes a new commit to an open PR) and on push tomaster. Only the GNU + MPICH test also runs on push todevelop.README CI status badges are not included and can be added as a future feature.
Test case data and ECT ensemble summaries are still hosted as GitHub release assets on
NCAR/MPAS-Model-CI. TheDATA_REPOSITORYvariable in.github/ci-config.envcontrols where data is downloaded from.File descriptions:
.github/ci-config.env— central CI configuration.github/actions/— 8 composite actions (build-mpas, download-testdata, resolve-container, run-perturb-mpas, validate-ect, mpas-version, print-mpas-logs, ect-summary).github/workflows/_test-compiler.yml— reusable CPU build + ECT validation workflow.github/workflows/test-{gcc,intel,nvhpc}-mpich.yml— 3 caller workflows.github/data/ect_excluded_vars.txt— ECT variable exclusion listDeveloped in
NCAR/MPAS-Model-CI. Claude assistance.