Repository navigation
Workflows: add homme standalone testing on ghci runners - #8952
Merged
Merged
Conversation
bartgol
marked this pull request as ready for review
October 22, 2026 16:58
bartgol
requested review from
jgfouca and
tcclevenger
and
a balanced review from Copilot
October 22, 2026 17:09
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
CUDA option handling, compiler environment propagation, MPI configuration, and test concurrency need correction before these jobs can run reliably.
4 open issues
What changed in this PR
Add standalone HOMME testing to the existing self-hosted ghci infrastructure
for pull requests affecting HOMME and selected dependencies.
Changes:
- Add GNU/OpenMP, Intel/OpenMP, and GNU/CUDA workflow jobs, with manual
baseline generation and CTest log uploads. - Add shared and compiler-specific ghci machine configurations.
- Forward the requested compiler to CTest and prefer compiler-specific
machine files, retaining the generic fallback.
| File | Description |
|---|---|
components/homme/utils/test_homme.py |
Forward the explicit compiler selection to CTest. |
components/homme/cmake/machineFiles/ghci.cmake |
Define shared runner and testing settings. |
components/homme/cmake/machineFiles/ghci-intel.cmake |
Configure Intel, OpenMP, and MKL. |
components/homme/cmake/machineFiles/ghci-gnugpu.cmake |
Configure CUDA and MPI compiler backends. |
components/homme/cmake/machineFiles/ghci-gnu.cmake |
Configure GNU, OpenMP, and OpenBLAS. |
components/homme/cmake/ctest_script.cmake |
Select compiler-specific machine files when available. |
.github/workflows/homme-testing.yml |
Run the test matrix and support baseline generation. |
Review effort: Balanced
tcclevenger
reviewed
Oct 22, 2026
jgfouca
approved these changes
Oct 22, 2026
bartgol
force-pushed
the
claude/tender-albattani-n2zxdo
branch
4 times, most recently
from
October 23, 2026 06:23
9423349 to
43238c6
Compare
Add --machine-file, to use a different file from cmake/machineFiles than the one named like the machine (e.g., if a machine has one file per compiler). test_homme.py now passes the name of the machine file (including the -bfb suffix when --bfb is used) to ctest_script.cmake via MACHINE_FILE, rather than passing MACHINE and letting the cmake script figure out the file name. Also quote EXTRA_CMAKE_OPTIONS: it is a ';'-separated cmake list, which the shell would otherwise split. Nothing changes for callers that do not use the new option. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SaJsK9j78W8TBXGQqGLfDs
The tests need cprnc, but only the 'check' target depended on it. So, if cprnc is compiled from the CIME sources (i.e., it was not found in CPRNC_DIR) and one only builds the 'test-execs' target (as ctest_script.cmake does), the tests fail because cprnc is missing. Make 'test-execs' depend on cprnc too, as 'check' does. If cprnc is a prebuilt binary (found via CPRNC_DIR), cprnc is an imported target, so nothing else gets built. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SaJsK9j78W8TBXGQqGLfDs
Add ghci.cmake, with the settings common to all the ghci images, and one file per image: ghci-gnu, ghci-intel, and ghci-cuda. The files also keep the code deprecated in Kokkos 5 enabled: without it, Kokkos aborts if the vector length of a TeamPolicy is not a power of 2, which Homme's CPU code does not guarantee (BoundaryExchange.cpp uses the number of level packs). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SaJsK9j78W8TBXGQqGLfDs
Run components/homme/utils/test_homme.py on the self-hosted ghci runners (gnu, intel, cuda) whenever files in components/homme are touched. Baselines are generated by running the workflow manually, with the 'bless' input. Only the submodules that Homme needs are checked out. A setup step splits the node (CIME's MAX_MPITASKS_PER_NODE) between ranks per test (4 on cpu, 2 on gpu), threads per rank, and number of tests run at once, since Homme tests do not reserve cpus/gpus. When a job fails, the failed tests and their error messages are printed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SaJsK9j78W8TBXGQqGLfDs
Without a user reducer, CAAS::reduce_globally hands its (device) buffers directly to MPI_Allreduce. If MPI is not device aware (COMPOSE_MPI_ON_HOST, i.e., HOMMEXX_MPI_ON_DEVICE=OFF), that segfaults on GPU builds. Production code always installs a reducer that stages through host memory, so only the unit test hits this: skip the no-reducer variant in that configuration. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SaJsK9j78W8TBXGQqGLfDs
bartgol
force-pushed
the
claude/tender-albattani-n2zxdo
branch
from
October 23, 2026 06:34
43238c6 to
998ffe7
Compare
Contributor
Author
|
CI status for head 998ffe7 (all jobs only fail on the missing baselines, as expected before
Generated by Claude Code |
bartgol
commented
Oct 23, 2026
bartgol
added a commit
that referenced
this pull request
Oct 23, 2026
Add a GitHub workflow that runs the standalone homme tests (gnu, intel, and cuda) on the self-hosted ghci runners whenever files in components/homme are touched. [BFB]
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.


Add a GitHub workflow that runs the standalone homme tests (gnu, intel, and cuda) on the self-hosted ghci runners whenever files in components/homme are touched.
[BFB]
Summary
Add
.github/workflows/homme-testing.yml, which runscomponents/homme/utils/test_homme.pyon the same self-hosted runners used by the eamxx workflows, for PRs touchingcomponents/homme/**(plus the workflow itself,get-cuda-arch,config_machines.xml,externals/ekat, andexternals/scorpio). A manualworkflow_dispatchwithblessgenerates baselines.The PR has 5 commits, one per logical change: (1)
--machine-fileoption fortest_homme.py, (2) buildcprncalong with the test executables, (3) the ghci machine files, (4) the workflow, (5) a fix for a unit test that passes device pointers to MPI (cuda).This is the first of a few stacked PRs. bfb testing (cxx vs f90, without baselines) is left to a follow-up PR stacked on this one.
Workflow
runnerin {gnu, intel, cuda}. The runner label is also the name of the machine file; the CIME compiler for the cuda runner isgnugpu..gitmodulesare rewritten to https for the clone.Set test resourcesstep splits the node, since homme tests do not reserve cpus/gpus: max ranks per test (USE_NUM_PROCS, passed with--cmake-opt: 4 on cpu, 2 on gpu) x threads per rank (2 on cpu, 1 on gpu) x number of concurrent tests (--run-parallel-level) must fit in the node size taken from CIME (MAX_MPITASKS_PER_NODE: 32 cores, or 2 gpus forgnugpu).OMP_NUM_THREADSandOMP_STACKSIZEare set explicitly, and the tests run with an unlimited stack (with few ranks per test, each rank holds a lot of data)..errfiles are uploaded.Machine files (
cmake/machineFiles)ghci.cmake(common settings), plusghci-gnu,ghci-intel, andghci-cuda.Kokkos_ENABLE_DEPRECATED_CODE_5must stay ON: with it OFF, Kokkos 5.1 aborts if the vector length of aTeamPolicyis not a power of 2, and Homme's CPU code uses the number of level packs (e.g., 3 for nlev20) as vector length inBoundaryExchange.cpp.HOMMEXX_MPI_ON_DEVICEis OFF for cuda, since the runners' MPI is not cuda-aware yet.Changes to existing homme files (all opt-in; behavior is unchanged when the new options are not used)
test_homme.py: new--machine-file(pick the machine file by name). It now passes the name of the machine file (including the-bfbsuffix) toctest_script.cmakeviaMACHINE_FILE. TheEXTRA_CMAKE_OPTIONSargument is now shell-quoted (identical for a single option; with 2+ options the unquoted;used to split the shell command).ctest_script.cmake: support for the option above (MACHINE_FILE).test_execs/CMakeLists.txt: thetest-execstarget now depends oncprnc, ascheckalready does. This matters whencprncis compiled from the CIME sources:ctest_script.cmakeonly buildstest-execs, so the tests would otherwise misscprnc. Ifcprncis a prebuilt binary (found viaCPRNC_DIR), it is an imported target and nothing extra gets built.src/share/compose/cedr_caas.cpp: in GPU builds withHOMMEXX_MPI_ON_DEVICE=OFF, the CAAS unit test skips the variant without a user reducer, which hands device buffers directly toMPI_Allreduce(production code always uses a reducer that stages through host memory). This was the likely cause of thecompose_ut_testsegfault on cuda (to be confirmed in CI).Status / notes
intel(all test runs succeed,cprncis built through the new dependency; only the tests that compare against baselines fail, since baselines do not exist yet), andcuda(builds and runs on H100; only the missing baselines fail, pluscompose_ut_test, addressed by commit 5).gnuhas not run yet (the runner is busy with other workflows), and the latest head has not completed in CI.bless, normally on master) into/projects/e3sm/data/baselines/ghci/<compiler>/master/homme.🤖 Generated with Claude Code
https://claude.ai/code/session_01SaJsK9j78W8TBXGQqGLfDs