Scope
Benchmark-gated performance change, split out of the #22 hardening chain (grilled 2026-07-04): parallelize the FNL local ghost-update kernel properly.
Current state
update_ghost_local_gpu_dev (src/lib/fnl/adam_fnl_field_kernels.F90) runs !$acc parallel loop gang-vector over v (≈ nv ≈ 9 threads TOTAL) with the full flag-1/4/8 map walk (mf over all ghost-map rows, e.g. ~9348 seam rows + same-level rows on the pulse case) executed seq per thread. This schedule pre-dates #22 and was deliberately preserved in #22 F3 for golden bit-identity (-Minfo verified unchanged).
The change
Flip to !$acc parallel loop independent collapse(2) over (v, mf) — the loops are perfectly nested.
Preconditions and safety argument (write into the directive comment)
Acceptance
-Minfo shows the collapsed gang-vector schedule, zero argument temps.
- Full dual-backend firewall bit-on-baseline: FNL goldens 4/4 (digest + byte-exact residuals), both seam checks at their pinned values, np2 lockstep digests.
- Benchmark on a real GPU node (leonardo/iac varsets) at production block counts: land only on a measured ghost-update win. Never WSL timings (house rule). Until a cluster session is scheduled, this issue sits parked — the work is fully specified above.
Scope
Benchmark-gated performance change, split out of the #22 hardening chain (grilled 2026-07-04): parallelize the FNL local ghost-update kernel properly.
Current state
update_ghost_local_gpu_dev(src/lib/fnl/adam_fnl_field_kernels.F90) runs!$acc parallel loopgang-vector overv(≈ nv ≈ 9 threads TOTAL) with the full flag-1/4/8 map walk (mfover all ghost-map rows, e.g. ~9348 seam rows + same-level rows on the pulse case) executedseqper thread. This schedule pre-dates #22 and was deliberately preserved in #22 F3 for golden bit-identity (-Minfoverified unchanged).The change
Flip to
!$acc parallel loop independent collapse(2)over(v, mf)— the loops are perfectly nested.Preconditions and safety argument (write into the directive comment)
dedupe_last_writer(FNL intra-realm AMR: seam ghost-fill port (L0 enablement + L1 tricubic fill) — #21 successor #22 F1): ghost-cell recv targets are unique post-dedupe (explicit last-writer-wins; zero duplicates today, prints if it ever fires). If duplicates ever reappear,collapse(2)becomes a write race — the dedupe invariant is load-bearing for any parallel schedule here and the tripwire is the dedupe print.(v, mf)iteration is independent with within-iteration sums only ⇒ bit-identity expected, verified not assumed.Acceptance
-Minfoshows the collapsed gang-vector schedule, zero argument temps.