Skip to content

Frontier module set silently pins CCE 19, and hipfort drifts from the loaded ROCm #1684

Description

@sbryngelson

Frontier's module set silently pins CCE 19, and hipfort drifts from the loaded ROCm

Two independent defects in the Frontier toolchain configuration. Both are live on master
today, and together they are why MFC still builds with cce/19.0.0 — the one CCE version
carrying the IPA store-dropping bug that broke every multi-rank GPU test in #1679.

1. rocprofiler-compute silently reverts the compiler

toolchain/modules:54

f-gpu python craype-accel-amd-gfx90a rocprofiler-compute/3.0.0

rocprofiler-compute triggers a MODULEPATH change that re-resolves PrgEnv. It only ships a
build for the ROCm it was made against, and with any other ROCm the entire module load
falls back to the system default cce/18.0.1 — with no error, and no indication that the
cpe/... you asked for was dropped:

module line resulting compiler
cpe/26.03 rocm/7.2.0 … craype-accel-amd-gfx90a cce/21.0.0
the same + rocprofiler-compute/3.0.0 cce/18.0.1
the same + rocprofiler-compute/3.1.0 cce/18.0.1
cpe/25.09 rocm/6.4.2 … + either rocprofiler cce/18.0.1
current cpe/25.03 rocm/6.3.1 … + rocprofiler-compute/3.0.0 cce/19.0.0 (works — only because 3.0.0 was built against 6.3.1)

So the current pin is the single combination that happens to work, and any ROCm bump
silently changes the compiler out from under the build rather than failing.

MFC only needs this module for the optional --rcu profiling flag
(toolchain/mfc/run/run.py:39). It should not be in the default GPU module set; load it
on demand when profiling is requested.

2. hipfort is pinned to a literal ROCm tag

toolchain/dependencies/CMakeLists.txt:148

ExternalProject_Add(hipfort
    GIT_REPOSITORY "https://github.com/ROCmSoftwarePlatform/hipfort"
    GIT_TAG        rocm-6.3.1

The tag is independent of the loaded rocm/X module, so bumping ROCm builds hipfort's
Fortran bindings for a different ROCm than the runtime. MFC consumes those bindings
directly (m_fftw.fpp, m_time_steppers.fpp: hipMalloc, hipMallocManaged,
hipDeviceSynchronize, hipfort_hipfft), and the failure mode is versioned-symbol link
errors rather than anything legible, e.g.

libcrayacc_amdgpu.so: undefined reference to `hipStreamSynchronize@hip_4.2'
libmpi_gtl_hsa.so:    undefined reference to `hsa_init@ROCR_1'

Deriving it from ROCM_PATH keeps the two together and fails loudly when no matching tag
exists, instead of silently building mismatched bindings:

set(MFC_HIPFORT_TAG "rocm-6.3.1")
if (DEFINED ENV{ROCM_PATH})
    string(REGEX MATCH "rocm-[0-9]+\\.[0-9]+\\.[0-9]+" MFC_ROCM_TAG "$ENV{ROCM_PATH}")
    if (MFC_ROCM_TAG)
        set(MFC_HIPFORT_TAG "${MFC_ROCM_TAG}")
    endif()
endif()

3. Minor: cpe/26.03 alone does not give the newest CCE

cpe/26.03 selects cce/21.0.0; the newest on Frontier is cce/21.0.2. If the intent is
"newest", the CCE version needs pinning explicitly alongside the CPE.

Why this matters beyond tidiness

.github/workflows/test.yml:333 already records that "cpe/25.03 introduced an IPA SIGSEGV
in CCE 19.0.0"
, and makes every Frontier lane continue-on-error. So MFC knows this
toolchain is bad, has made its CI non-blocking because of it, and the module set is what
keeps it there. The consequence is real: in #1679 all 11 multi-rank tests NaN'd on Frontier
CCE GPU and that would not have blocked the merge.

Working set on Frontier (module resolution and dependency build verified; a full MFC
build + regression run on both offload backends is in progress and I will follow up with
the result):

f-all cpe/26.03 cce/21.0.2 rocm/7.2.0
f-all cray-fftw cray-hdf5 python cmake
f-gpu python craype-accel-amd-gfx90a

with hipfort resolving to rocm-7.2.0. (ROCm 7.13.0 exists but hipfort has no tag past
rocm-7.2.4, and rocm-7.2.07.2.4 are all the same hipfort commit, so 7.2.0 is the
newest usefully-paired choice.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions