@@ -734,26 +734,39 @@ 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 ICE: bring_routine_resident SIGSEGV in optcg during
738+ # ipa_processing. Nondeterministic — any file can become the crash site
739+ # via cross-file inlining. Safe to disable IPA for the whole target
740+ # (CPU-only, no GPU device-call requirements). See PR #1286.
741+ target_compile_options (pre_process PRIVATE -Oipa0 )
737742 endif ()
738743endif ()
739744
740745if (MFC_SIMULATION)
741746 MFC_SETUP_TARGET (TARGET simulation
742747 SOURCES "${simulation_SRCs} "
743748 MPI FFTW OpenACC OpenMP )
744- # CCE 19.0.0 IPA workaround: disable interprocedural analysis for files
745- # that trigger compiler crashes during IPA:
746- # m_bubbles_EL: castIsValid assertion (InstCombine/foldIntegerTypedPHI)
747- # m_phase_change: bring_routine_resident SIGSEGV
748- # Not applied to Cray+OpenMP because thermochem uses !DIR$ INLINEALWAYS,
749- # which requires IPA to inline device calls. On OpenACC the pyrometheus
750- # patch emits !$acc routine seq instead (no IPA needed). See PR #1286.
751- if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray" AND NOT MFC_OpenMP)
752- set_source_files_properties (
753- "${CMAKE_BINARY_DIR} /fypp/simulation/m_bubbles_EL.fpp.f90"
754- "${CMAKE_BINARY_DIR} /fypp/simulation/m_phase_change.fpp.f90"
755- PROPERTIES COMPILE_OPTIONS "-Oipa0"
756- )
749+ # CCE 19.0.0 optcg ICE: IPA inlining triggers two distinct crashes:
750+ # m_bubbles_EL: castIsValid assertion (InstCombine/foldIntegerTypedPHI)
751+ # m_phase_change, m_mpi_common, m_start_up: bring_routine_resident SIGSEGV
752+ # GPU builds: apply -Oipa0 per-file to known crash sites. Whole-target
753+ # -Oipa0 is not safe for GPU builds — it breaks cross-file !$acc routine /
754+ # !DIR$ INLINEALWAYS device-call registration, causing runtime aborts.
755+ # CPU builds: disable IPA for the whole target (safe — no GPU requirements,
756+ # and the crash is nondeterministic so any file can become the crash site).
757+ # See PR #1286.
758+ if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray" )
759+ if (MFC_OpenACC OR MFC_OpenMP)
760+ set_source_files_properties (
761+ "${CMAKE_BINARY_DIR} /fypp/simulation/m_bubbles_EL.fpp.f90"
762+ "${CMAKE_BINARY_DIR} /fypp/simulation/m_phase_change.fpp.f90"
763+ "${CMAKE_BINARY_DIR} /fypp/simulation/m_mpi_common.fpp.f90"
764+ "${CMAKE_BINARY_DIR} /fypp/simulation/m_start_up.fpp.f90"
765+ PROPERTIES COMPILE_OPTIONS "-Oipa0"
766+ )
767+ else ()
768+ target_compile_options (simulation PRIVATE -Oipa0 )
769+ endif ()
757770 endif ()
758771endif ()
759772
0 commit comments