Skip to content

Perf: collapse(2) schedule for update_ghost_local_gpu_dev (benchmark-gated, real-node only) #27

Description

@szaghi

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

  1. -Minfo shows the collapsed gang-vector schedule, zero argument temps.
  2. 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.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions