Skip to content

Commit 0fcedee

Browse files
authored
Merge branch 'master' into feature/non-newtonian-viscosity
2 parents 22f3508 + 141ff01 commit 0fcedee

5 files changed

Lines changed: 50 additions & 24 deletions

File tree

.github/workflows/common/build.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,23 @@ fi
2525
# source code is built here on the compute node.
2626
# Phoenix: always start fresh to avoid SIGILL from stale binaries compiled
2727
# on a different microarchitecture.
28+
# Frontier: wipe only compiled Fortran staging/install slugs; preserve dep
29+
# dirs (silo, hdf5, lapack, fftw, hipfort) which were built on the login node
30+
# and cannot be re-fetched from a compute node (no internet).
2831
if [ "$job_cluster" = "phoenix" ]; then
2932
source .github/scripts/clean-build.sh
3033
clean_build
34+
elif [ "$job_cluster" = "frontier" ] || [ "$job_cluster" = "frontier_amd" ]; then
35+
for _dir in build/staging/ build/install/; do
36+
if [ -d "$_dir" ]; then
37+
for _sub in "$_dir"*/; do
38+
_name=$(basename "$_sub")
39+
case "$_name" in silo|hdf5|lapack|fftw|hipfort) continue ;; esac
40+
rm -rf "$_sub"
41+
done
42+
fi
43+
done
44+
unset _dir _sub _name
3145
fi
3246

3347
source .github/scripts/retry-build.sh

CMakeLists.txt

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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()
738743
endif()
739744

740745
if (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()
758771
endif()
759772

src/pre_process/m_perturbation.fpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ contains
6363

6464
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
6565
integer :: i, j, k
66-
real(wp) :: rand_real
66+
real(wp) :: rand_real, v_beg
6767

6868
call random_seed()
6969

@@ -72,8 +72,9 @@ contains
7272
do i = 0, m
7373
call random_number(rand_real)
7474
rand_real = rand_real*perturb_flow_mag
75-
q_prim_vf(eqn_idx%mom%end)%sf(i, j, k) = rand_real*q_prim_vf(eqn_idx%mom%beg)%sf(i, j, k)
76-
q_prim_vf(eqn_idx%mom%beg)%sf(i, j, k) = (1._wp + rand_real)*q_prim_vf(eqn_idx%mom%beg)%sf(i, j, k)
75+
v_beg = q_prim_vf(eqn_idx%mom%beg)%sf(i, j, k)
76+
q_prim_vf(eqn_idx%mom%beg)%sf(i, j, k) = (1._wp + rand_real)*v_beg
77+
if (num_vels > 1) q_prim_vf(eqn_idx%mom%end)%sf(i, j, k) = rand_real*v_beg
7778
if (bubbles_euler) then
7879
q_prim_vf(eqn_idx%alf)%sf(i, j, k) = (1._wp + rand_real)*q_prim_vf(eqn_idx%alf)%sf(i, j, k)
7980
end if

src/simulation/m_rhs.fpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,13 +1827,11 @@ contains
18271827
end if
18281828
end if
18291829
1830-
if (cyl_coord) then
1831-
do i = 1, num_dims
1832-
@:DEALLOCATE(tau_re_vf(eqn_idx%cont%end + i)%sf)
1833-
end do
1834-
@:DEALLOCATE(tau_re_vf(eqn_idx%E)%sf)
1835-
@:DEALLOCATE(tau_re_vf)
1836-
end if
1830+
do i = 1, num_dims
1831+
@:DEALLOCATE(tau_Re_vf(eqn_idx%cont%end + i)%sf)
1832+
end do
1833+
@:DEALLOCATE(tau_Re_vf(eqn_idx%E)%sf)
1834+
@:DEALLOCATE(tau_Re_vf)
18371835
end if
18381836
@:DEALLOCATE(dqL_prim_dx_n, dqL_prim_dy_n, dqL_prim_dz_n)
18391837
@:DEALLOCATE(dqR_prim_dx_n, dqR_prim_dy_n, dqR_prim_dz_n)

toolchain/bootstrap/modules.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ if [ "$u_c" '==' 'famd' ]; then
145145
export CRAY_MPICH_LIB="-L${CRAY_MPICH_PREFIX}/lib \
146146
${CRAY_PMI_POST_LINK_OPTS} \
147147
-lmpifort_amd -lmpi_amd -lmpi -lpmi -lpmi2"
148-
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${CRAY_LD_LIBRARY_PATH}"
148+
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${CRAY_LD_LIBRARY_PATH}"
149149
export CMAKE_PREFIX_PATH="${OLCF_AFAR_ROOT}:${CMAKE_PREFIX_PATH}"
150150
export FC="${OLCF_AFAR_ROOT}/bin/amdflang"
151151

0 commit comments

Comments
 (0)