Repository navigation
Add gnu-mphipcc CIME compiler to the HIP image, and build-test it in CI - #125
Conversation
01f9700 to
52d5f23
Compare
52d5f23 to
56e0552
Compare
|
just one tiny note ... is there a reason we name them differently?
<MAX_MPITASKS_PER_NODE compiler="gnugpu">2</MAX_MPITASKS_PER_NODE>
<MAX_MPITASKS_PER_NODE compiler="gnu-mphipcc">2</MAX_MPITASKS_PER_NODE>why don't we use gnumphipcc or gnu-gpu? i never followed the compiler naming stuff in e3sm, so i may be missing something |
|
tho, tbc, I don't mind if you merge this without explaining the compiler stuff 😆 approved ✅ 🚀 🌕 |
I actually had a convo with Mr C on this. The main rationale is that this is the way E3SM named the compilers on frontier, which is the main machine where we use HIP. More broadly though, I do NOT like the name Ideally, I would like the compiler name to be |
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
3 open issues
What changed in this PR
Adds HIP (ROCm) support to the E3SM container CIME configuration and CI matrix, introducing a dedicated gnu-mphipcc compiler setup and updating documentation/comments accordingly.
Changes:
- Add a new CIME compiler macro file for GNU + hipcc (
gnu-mphipcc) and wire it into machine config. - Extend Dockerfile compiler selection and GitHub Actions matrix to include HIP images/jobs.
- Update README/test script/workflow comments to reflect HIP behavior (build-only in CI).
| File | Description |
|---|---|
| ghci/tests/e3sm-case.sh | Updates header comment to include HIP in build-only CI behavior. |
| ghci/env/cime/e3sm-container_gnu-mphipcc.cmake | Adds new CIME compiler macro for HIP builds (GNU + hipcc, arch selection, flags, linking). |
| ghci/env/cime/config_machines.xml | Registers gnu-mphipcc limits and sets MPICH_CXX=hipcc for that compiler. |
| ghci/env/Dockerfile | Selects gnu-mphipcc compiler variant when building HIP images. |
| ghci/README.md | Documents HIP default compiler and HIP arch override behavior. |
| .github/workflows/e3sm-case.yaml | Adds HIP env to CI matrix; marks HIP as build-only like CUDA. |
Review effort: Lite
The HIP image's CIME machine now lists gnu-mphipcc (GNU Fortran and C, hipcc for C++, the name E3SM's craygnu-mphipcc uses on Frontier) ahead of gnu. Its macro file includes E3SM's own gnu.cmake from E3SM's source tree (CIME copies only the macro files a case names, and follows includes only for those it copies from E3SM, not from ~/.cime), and adds the Kokkos HIP options for MI200 (E3SM_KOKKOS_HIP_ARCH overrides the arch). e3sm-case builds the two CIME cases on the HIP image, build only like CUDA's, since hosted runners have no GPU. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019UTqLci8P681gR1erTA488
56e0552 to
3a17e89
Compare


Stacked on #124 (base is its branch; retarget to
mainonce #124 merges). Gives the HIP image a CIME compiler,gnu-mphipcc, and adds the CI that builds E3SM with it.What changes
gnu-mphipcc: GNU Fortran and C,hipccfor C++, the name E3SM'scraygnu-mphipccuses on Frontier. The HIP image's CIME machine now listsgnu-mphipcc,gnu(the first is the default), and the CPUgnustays available.ghci/env/cime/e3sm-container_gnu-mphipcc.cmake: E3SM has no genericgnu-mphipcc.cmake, so it starts from E3SM'sgnu.cmake, included from E3SM's source tree through${SRCROOT}(asMacros.cmakedoes for its post-process file). CIME copies only the macro files a case names into the case, and follows the includes of the ones it copies from E3SM, not of the ones from~/.cime, so a plain${CMAKE_CURRENT_LIST_DIR}/gnu.cmakeinclude is not found. It then adds the Kokkos HIP options (modelled on Frontier's), for MI200 by default;E3SM_KOKKOS_HIP_ARCHoverrides it, e.g.AMD_GFX942, and the hipcc target follows from it.MPICH_CXX=hipccandBLA_VENDORfor the compiler, and 2 MPI tasks per node as forgnugpu.e3sm-casegets the HIP image (x86_64), build only like CUDA's since hosted runners have no GPU. It builds thewcyclandaqpcases withgnu-mphipcc. The EAMxx standalone tests are skipped, as for CUDA.Checked / not checked
e3sm-caserun failed at CMake configure because of thatgnu.cmakeinclude; fixed above. A localcmakerun of the macro file with only it in~/.cimeandgnu.cmake/universal.cmakeread from an E3SM checkout gives the expectedSCXX,KOKKOS_OPTIONS, flags and arch override.e3sm-caseHIP jobs are for, so expect more iteration. They are not part ofrequired-check, like the rest ofe3sm-case.ghcimachine entry is not touched; making E3SM's CI use the HIP image would be a separate PR in E3SM, with the same compiler name.🤖 Generated with Claude Code
https://claude.ai/code/session_019UTqLci8P681gR1erTA488