Skip to content

Cleanup/repo housekeeping - #1558

Closed
cenamiller wants to merge 159 commits into
MPAS-Dev:masterfrom
NCAR:cleanup/repo-housekeeping
Closed

cenamiller wants to merge 159 commits into
MPAS-Dev:masterfrom
NCAR:cleanup/repo-housekeeping

Conversation

@cenamiller

Copy link
Copy Markdown

First step of the MPAS-Model-CI cleanup. No changes to how tests run.

  • Fix stale references (missing checkout-mpas-source action, docs sync branch)
  • Move CI badges to .github/README.md; root README matches upstream again
  • Remove non-CI notes from .github/docs
  • Drop hackathon-* branch triggers
  • Add shared-paths.list, sync-shared.sh and mk-prtest.sh for keeping
    files shared with MPAS-Dev in sync
  • Add PR_MAP.md (upstream PR ↔ branch mapping, incl. GitHub Actions CI: CPU compilers with ECT validation #1469 status)

Branches being removed are archived as archive/* tags.
Prepared with help from Claude (co-author trailer on commits).

cenamiller and others added 30 commits January 12, 2026 20:49
CPU only resources, testing 240km test case on
cisldev containers
using mpich3 instead. Openmpi build failing,
but would like to test what works at this point
CIRRUS GPU/CPU resources, testing 240km test case on
cisldev containers. Skip restart file upload step
for now, not sure how artifacts work on CIRRUS,
but otherwise the CPU build/run and GPU build
just worked on Github Actions. Testing the GPU
run.
run with nvhpc/smiol/cuda, targeting GPUs, starting
with 1 rank.

Also added timeout-minutes to the build and run steps.

Goal at this point is to get more quick gpu testing
and feedback through the CIRRUS CI system.
tried to make "includes/excludes" into a single
block of settings at the top of the file.
workflows to limit the number of concurrent jobs.
script for OpenMPI runs in containers
the reference standard (reference_log.atmosphere.0000.out)
which can be changed but was generated from an
nvhpc/mpich3/nogpu/smiol/1proc run.

Also increased run job timeout to 20 minutes,
to see what's going on with oneapi runs?
so added it to .github/workflows/validation/
so that it's easier to reuse in other workflows
and to read the workflow file.
  The oneapi  builds were crashing at startup with
  SIGSEGV due to stack overflow from automatic arrays. Intel Fortran
  allocates automatic arrays on the stack by default.
  Trying:
  - Add -heap-arrays flag to FFLAGS_OPT and FFLAGS_DEBUG for Intel
    Fortran targets (ifort, ifort-scorep, ifort-gcc, intel-mpi,
    intel-nersc, intel/oneapi)
  - Add ulimit -s unlimited to run script, which I remember
  using years ago!?
for the 'which mpicc' command.
  Introduce a modular CI architecture using GitHub Actions composite
  actions for better reusability and portability across different
  runner environments.
  New composite actions:
  - .github/actions/build-mpas: Build MPAS-A with configurable
    compiler, PIO, and OpenACC options
  - .github/actions/run-mpas: Run MPAS test cases with configurable
    MPI, duration, and namelist modifications
  - .github/actions/validate-logs: Validate output logs against
    reference standards
  New workflows using modular structure:
  - test-ga-nogpu.yml: GitHub Actions runners, all compilers,
    nogpu configurations only
  - test-cirrus-nvhpc.yml: CIRRUS runners, nvhpc compiler,
    comparing GPU (cuda) vs CPU (nogpu) builds
  This structure allows:
  - Easier to add new test types
  - Mixing and matching build/run configurations per workflow
  - Porting to different runner environments by changing runs-on
    and container images without modifying action logic
instead of always showing green checkmark
These are stubs so the workflows appear in the Actions UI and can be
triggered via gh CLI on any branch. The actual implementation (actions,
scripts, config) lives on feature-ci-test-cases.

Co-authored-by: Cursor <cursoragent@cursor.com>
cenamiller and others added 28 commits June 10, 2026 12:46
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.
Auto-run CPU ECT/BFB on PRtest-* the same as hackathon-*. Document
building those branches from develop with a master CI overlay.

Co-authored-by: Cursor <cursoragent@cursor.com>
Adds a reusable workflow that builds MPAS-A NVHPC CPU (no OpenACC) and
NVHPC GPU (OpenACC) on the same CIRRUS-32x256-A10 runner group so both
legs run on identical hardware, then compares wall-clock time per MPAS
native timer (e.g. atm_advance_acoustic_step, atm_compute_dyn_tend) --
no source changes required since MPAS_NATIVE_TIMERS is on by default.

New files:
- .github/scripts/parse-mpas-timers.py: parses the native timer table
  from log.atmosphere.0000.out into JSON
- .github/scripts/summarize-perf.py: joins CPU + GPU timer JSON into a
  step-summary comparison table and a durable perf-result.json
- .github/actions/parse-mpas-timers/: composite action wrapping the parser
- .github/workflows/_test-perf.yml: reusable build+run+compare workflow
- .github/workflows/perf-cpu-vs-gpu.yml: workflow_dispatch caller --
  pick any branch (including a hack26_* routine branch) as the ref

workflow_dispatch only, matching the existing GPU/CIRRUS security model.
GPU kernel-level (Nsight) granularity is a deliberate follow-up, not
included here to keep the first pass simple.

Drafted with Claude assistance.
Making the runner group a caller-configurable input undermined the
whole point of this workflow (both legs must run on identical
hardware for the comparison to be fair). Also brings it in line with
how _test-gpu.yml / _test-bfb.yml hardcode their runner groups rather
than parameterizing them.

Drafted with Claude assistance.
ci: don't have runner group as an input option
Derive the ECT release tag from the MPAS major/minor version so ect-v8.4 serves all 8.4.x releases.

Pass the derived tag through ECT readers and writers, and include it in restart cache keys to prevent reuse across version series.

Assisted-by: Cursor <cursoragent@cursor.com>
Run CPU ECT, CPU BFB, CUDA compile-only, and unit-test workflows on hotfix-* and hotfix/** branches.

Add pull-request triggers to the CPU BFB workflows and remove the obsolete feature-ci-bfb trigger. GPU execution remains manual-only.

Assisted-by: Cursor <cursoragent@cursor.com>
CI: don't require new ensemble generation for bugfix versions
- run-mpas: add opt-in mpi-run-flags input (empty default; every existing
  caller unaffected). Also honors MPICH_RUN_FLAGS alongside the existing
  OPENMPI_RUN_FLAGS, left unset in ci-config.env so it stays a no-op until
  someone opts in. Adds an lscpu dump to the run log for topology visibility.
- _test-perf.yml: passes mpi-run-flags: -bind-to core (Hydra does not bind
  by default), scoped to this workflow only -- no ci-config.env change, so
  no other workflow that calls run-mpas is affected.
- _test-perf.yml / perf-cpu-vs-gpu.yml: new precision input (single/double),
  defaulting to single to match production and reduce halo-exchange message
  size (helps /dev/shm pressure at high rank counts). Replaces the previous
  hardcoded double.
- summarize-perf.py: records precision in the perf summary header.
MPAS host-stages every halo exchange (acc update self/device around the
exchange) unless config_gpu_aware_mpi = .true. is set in &development, so
the GPU CI runs spend most of their time stepping on host<->device copies.

Add a gpu-aware-mpi input (default false) to the run-mpas and
run-perturb-mpas actions. When true it sets config_gpu_aware_mpi in the
namelist (creating &development if missing, idempotent) and the MPI
library's GPU-support environment (MPICH_GPU_SUPPORT_ENABLED=1, or the
OpenMPI UCX/CUDA settings), via two small shared scripts.

The GPU test workflows (_test-gpu ECT members, _test-bfb and _test-perf
GPU legs) get a gpu-aware-mpi workflow input defaulting to true, so GPU
runs use device-resident halos; CPU legs are unchanged. Set it to false to
fall back to host-staged halos, e.g. if a container's MPI lacks CUDA
support (MPI then aborts rather than silently staging).

On Derecho (Cray MPICH) the namelist change alone gives bit-identical
output at 30km on 4 GPUs and 2.2-2.7x faster time stepping.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…les comments and case-sensitive groups'

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The opt-out only existed on the reusable workflows (_test-gpu, _test-bfb,
_test-perf), so a dispatched GPU run always got the new default (true) and
could not select host-staged halos when a container's MPI lacks CUDA
support. Add a boolean gpu_aware_mpi dispatch input (default true) to
perf-cpu-vs-gpu, bfb-decomp-gpu, bfb-io-gpu, bfb-nvhpc-cpu-vs-gpu,
test-gpu-mpich and test-gpu-openmpi and forward it as gpu-aware-mpi.
test-cross-repo has its GPU job commented out and is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The check-gpu-aware-mpi workflow showed that the CI OpenMPI GPU container
(OpenMPI 5.0.9 --with-cuda: accelerator:cuda + btl:smcuda) has no ucx pml/osc
component, so forcing --mca pml ucx / OMPI_MCA_pml=ucx aborts MPI_Init
("Framework: pml, Component: ucx not found"). That would have broken every
OpenMPI GPU job now that GPU-aware halos are the default. OpenMPI is CUDA-aware
on a node by default in that image (the default environment passes a device
buffer exchange), so set nothing for it.

For MPICH (4.3.2, ch4:ucx, --with-cuda) set MPIR_CVAR_ENABLE_GPU=1, the stock
MPICH variable, in addition to the Cray MPICH one; both passed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ci: use GPU-aware MPI halos on GPU test runs (opt-out input)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
@cenamiller

Copy link
Copy Markdown
Author

Opened against the wrong repository by mistake (meant for NCAR/MPAS-Model-CI). Closing!

@cenamiller cenamiller closed this Dec 3, 2026
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