Skip to content

Commit 8ef7565

Browse files
author
Spencer Bryngelson
committed
fix: extend CCE 19.0.0 -Oipa0 workaround to full targets (not per-file)
Per-file set_source_files_properties is insufficient because the IPA pass inlines across all files in the target — any file can become the crash site. Apply -Oipa0 target-wide for pre_process and simulation (Cray, not OpenMP). OpenMP excluded: thermochem requires IPA for !DIR$ INLINEALWAYS device calls.
1 parent 2d1c344 commit 8ef7565

1 file changed

Lines changed: 10 additions & 17 deletions

File tree

CMakeLists.txt

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -734,34 +734,27 @@ if (MFC_PRE_PROCESS)
734734
MPI)
735735
if(CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")
736736
target_compile_options(pre_process PRIVATE -hfp0)
737-
# CCE 19.0.0 IPA workaround: m_mpi_common triggers bring_routine_resident
738-
# SIGSEGV in optcg during ipa_processing. See simulation block below for details.
739-
set_source_files_properties(
740-
"${CMAKE_BINARY_DIR}/fypp/pre_process/m_mpi_common.fpp.f90"
741-
PROPERTIES COMPILE_OPTIONS "-Oipa0"
742-
)
737+
# CCE 19.0.0 IPA ICE: bring_routine_resident SIGSEGV in optcg during
738+
# ipa_processing. The crash is nondeterministic and can hit any file via
739+
# cross-file inlining, so disable IPA for the whole target. Safe for
740+
# pre_process (CPU-only, no thermochem IPA requirements).
741+
target_compile_options(pre_process PRIVATE -Oipa0)
743742
endif()
744743
endif()
745744

746745
if (MFC_SIMULATION)
747746
MFC_SETUP_TARGET(TARGET simulation
748747
SOURCES "${simulation_SRCs}"
749748
MPI FFTW OpenACC OpenMP)
750-
# CCE 19.0.0 IPA workaround: disable interprocedural analysis for files
751-
# that trigger compiler crashes during IPA:
752-
# m_bubbles_EL: castIsValid assertion (InstCombine/foldIntegerTypedPHI)
753-
# m_phase_change, m_mpi_common: bring_routine_resident SIGSEGV
749+
# CCE 19.0.0 IPA ICE: bring_routine_resident SIGSEGV in optcg during
750+
# ipa_processing. The crash is nondeterministic — IPA inlines across all
751+
# files in the target, so any file can become the crash site. Per-file
752+
# -Oipa0 via set_source_files_properties is insufficient.
754753
# Not applied to Cray+OpenMP because thermochem uses !DIR$ INLINEALWAYS,
755754
# which requires IPA to inline device calls. On OpenACC the pyrometheus
756755
# patch emits !$acc routine seq instead (no IPA needed). See PR #1286.
757756
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray" AND NOT MFC_OpenMP)
758-
set_source_files_properties(
759-
"${CMAKE_BINARY_DIR}/fypp/simulation/m_bubbles_EL.fpp.f90"
760-
"${CMAKE_BINARY_DIR}/fypp/simulation/m_phase_change.fpp.f90"
761-
"${CMAKE_BINARY_DIR}/fypp/simulation/m_mpi_common.fpp.f90"
762-
"${CMAKE_BINARY_DIR}/fypp/simulation/m_start_up.fpp.f90"
763-
PROPERTIES COMPILE_OPTIONS "-Oipa0"
764-
)
757+
target_compile_options(simulation PRIVATE -Oipa0)
765758
endif()
766759
endif()
767760

0 commit comments

Comments
 (0)