Skip to content

Commit 10c2de8

Browse files
author
Spencer Bryngelson
committed
fix: make GPU per-file -Oipa0 unconditional; CPU whole-target stays CI-only
1 parent c89fd55 commit 10c2de8

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

CMakeLists.txt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -748,24 +748,26 @@ if (MFC_SIMULATION)
748748
MFC_SETUP_TARGET(TARGET simulation
749749
SOURCES "${simulation_SRCs}"
750750
MPI FFTW OpenACC OpenMP)
751-
# CCE 19.0.0 IPA ICE: bring_routine_resident SIGSEGV in optcg during
752-
# ipa_processing on GitHub Actions runners. Only manifests in CI.
753-
# CPU builds: safe to disable IPA for the entire target (no GPU device-call
754-
# requirements). GPU builds (OpenACC or OpenMP): whole-target -Oipa0 breaks
755-
# cross-file !$acc routine / !DIR$ INLINEALWAYS device registration, causing
756-
# runtime aborts. Apply -Oipa0 per-file to the known crash sites only.
757-
# See PR #1286.
758-
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray" AND DEFINED ENV{GITHUB_ACTIONS})
759-
if (NOT MFC_OpenACC AND NOT MFC_OpenMP)
760-
target_compile_options(simulation PRIVATE -Oipa0)
761-
else()
751+
# CCE 19.0.0 optcg ICE: two distinct crashes triggered by IPA inlining:
752+
# m_bubbles_EL: castIsValid assertion (InstCombine/foldIntegerTypedPHI)
753+
# m_phase_change, m_mpi_common, m_start_up: bring_routine_resident SIGSEGV
754+
# Both crash locally and in CI on GPU builds. Apply -Oipa0 per-file
755+
# unconditionally to the known crash sites (IPA cross-file inlining triggers
756+
# the ICE; per-file disabling prevents it without affecting other files).
757+
# CPU-only builds in CI additionally disable IPA for the whole target
758+
# (safe — no GPU device-call requirements, and the crash is nondeterministic
759+
# so any file can become the crash site). See PR #1286.
760+
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")
761+
if (MFC_OpenACC OR MFC_OpenMP)
762762
set_source_files_properties(
763763
"${CMAKE_BINARY_DIR}/fypp/simulation/m_bubbles_EL.fpp.f90"
764764
"${CMAKE_BINARY_DIR}/fypp/simulation/m_phase_change.fpp.f90"
765765
"${CMAKE_BINARY_DIR}/fypp/simulation/m_mpi_common.fpp.f90"
766766
"${CMAKE_BINARY_DIR}/fypp/simulation/m_start_up.fpp.f90"
767767
PROPERTIES COMPILE_OPTIONS "-Oipa0"
768768
)
769+
elseif (DEFINED ENV{GITHUB_ACTIONS})
770+
target_compile_options(simulation PRIVATE -Oipa0)
769771
endif()
770772
endif()
771773
endif()

0 commit comments

Comments
 (0)