Skip to content

Commit e3a6808

Browse files
author
Spencer Bryngelson
committed
fix: per-file -Oipa0 for CCE IPA crashers in OpenMP simulation builds
1 parent 8ef7565 commit e3a6808

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -748,13 +748,25 @@ if (MFC_SIMULATION)
748748
MPI FFTW OpenACC OpenMP)
749749
# CCE 19.0.0 IPA ICE: bring_routine_resident SIGSEGV in optcg during
750750
# 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.
753-
# Not applied to Cray+OpenMP because thermochem uses !DIR$ INLINEALWAYS,
754-
# which requires IPA to inline device calls. On OpenACC the pyrometheus
755-
# patch emits !$acc routine seq instead (no IPA needed). See PR #1286.
756-
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray" AND NOT MFC_OpenMP)
757-
target_compile_options(simulation PRIVATE -Oipa0)
751+
# files in the target, so any file can become the crash site.
752+
# For non-OpenMP builds: disable IPA for the entire target (safe, no IPA
753+
# requirements). For OpenMP builds: thermochem uses !DIR$ INLINEALWAYS
754+
# which requires IPA for device-call inlining, so we cannot disable IPA
755+
# globally. Instead apply -Oipa0 per-file to the known crash sites.
756+
# On OpenACC the pyrometheus patch emits !$acc routine seq (no IPA needed).
757+
# See PR #1286.
758+
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")
759+
if (NOT MFC_OpenMP)
760+
target_compile_options(simulation PRIVATE -Oipa0)
761+
else()
762+
set_source_files_properties(
763+
"${CMAKE_BINARY_DIR}/fypp/simulation/m_bubbles_EL.fpp.f90"
764+
"${CMAKE_BINARY_DIR}/fypp/simulation/m_phase_change.fpp.f90"
765+
"${CMAKE_BINARY_DIR}/fypp/simulation/m_mpi_common.fpp.f90"
766+
"${CMAKE_BINARY_DIR}/fypp/simulation/m_start_up.fpp.f90"
767+
PROPERTIES COMPILE_OPTIONS "-Oipa0"
768+
)
769+
endif()
758770
endif()
759771
endif()
760772

0 commit comments

Comments
 (0)