Skip to content

Commit 8c81242

Browse files
committed
amdflang: opt m_rhs and m_weno into defaultmap(present:allocatable) (ledger 92: their kernels re-mapped every named allocatable's descriptor per launch, ~270 sub-kilobyte copies per batch); audited per array, no arithmetic change
1 parent 516399a commit 8c81242

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/simulation/m_rhs.fpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
!! @brief Contains module m_rhs
44

55
#:include 'case.fpp'
6+
#! AMD OpenMP lane: assert allocatables present on every kernel here (see OMP_DEFAULT_STR).
7+
#! Audited 2026-09-06: every conditionally allocated module array a kernel here names launches
8+
#! only under its allocation's own condition (blkmod/alpha/Kterm: alt_soundspeed;
9+
#! flux_n/flux_gsrc_n/rhs_hat*: dual pass; nc_iface_vel_n: alpha_iface + alt_soundspeed, a subset
10+
#! of use_nc_iface_vel; tau_Re_vf: viscous; qL/qR_*: .not. igr; flux_gsrc_rsx_vf: cyl_coord;
11+
#! dy/y_cc/dz: idir <= num_dims). Without it every launch re-maps the descriptor of each named
12+
#! allocatable (ledger 92: 33 + 26 copies per direction per batch). A kernel naming an
13+
#! UNALLOCATED array aborts. Keep it so.
14+
#:set MFC_OMP_PRESENT_ALLOCATABLE = True
615
#:include 'macros.fpp'
716
817
!> @brief Assemble the right-hand side of the governing equations using finite-volume flux differencing, Riemann solvers, and

src/simulation/m_weno.fpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
!! @file
33
!! @brief Contains module m_weno
44
#:include 'case.fpp'
5+
#! AMD OpenMP lane: assert allocatables present on every kernel here (see OMP_DEFAULT_STR).
6+
#! Audited 2026-09-06: v_rs_weno and the x/y/z coefficient tables exist whenever their kernels
7+
#! launch (weno_order /= 1; the y/z tables under n > 0 / p > 0, and s_weno is called with
8+
#! recon_dir <= num_dims). Without it every launch re-maps the descriptor of each named
9+
#! allocatable (ledger 92: 10 + 13 + 8 copies per direction per batch). A kernel naming an
10+
#! UNALLOCATED array aborts. Keep it so.
11+
#:set MFC_OMP_PRESENT_ALLOCATABLE = True
512
#:include 'macros.fpp'
613

714
!> @brief WENO/WENO-Z/TENO reconstruction with optional monotonicity-preserving bounds and mapped weights

0 commit comments

Comments
 (0)