Summary
The pinned ideal-MHD Δ′ diagonal in test/runtests_parallel_integration.jl
(delta_prime_matrix, DIII-D-like STRIDE BVP testset) is a single-point snapshot on a
non-converged grid. For the q=2 surface it is also platform-dependent, which forced a
tolerance widening in #238 as a stopgap. This issue tracks replacing it with a converged Δ′ pin.
Observed platform spread (identical grid, inputs, and mode range)
| platform |
real(dpm[1,1]) (q=2) |
| linux x86_64, julia 1.11 |
6.1438 |
| linux x86_64, julia 1.x |
6.6867 |
| macOS aarch64 |
7.7036 |
~25% end to end, and ~9% between two julia versions on the same OS. q=3 and q=4 are
reproducible across the same platforms.
Stopgap applied in #238
The q=2 pin was re-centered on the midpoint of the observed spread (6.9237) and its tolerance
widened from rtol=1e-1 to rtol=1.5e-1 to span it. q=3 and q=4 keep rtol=1e-1. This is an
explicit, deliberate loosening of an acceptance bound and should be reverted once a converged
pin exists — it is currently sitting at ~75% of its own budget, so a new platform could break it again.
Root cause
q=2 is the surface with the known Δ′ plateau problem. Per the psi_accuracy scan recorded in
docs/src/developer_notes.md ("Open problem: pinning grid-sensitive Δ′ robustly"), on the
two-pass auto grid dpm[3,3] (q=4) plateaus to ~1% over the four tightest grids, dpm[2,2] is
marginal, and dpm[1,1] (q=2) never settles — still moving ~7% between the two tightest grids
(2e-3 → 3.125e-5, a 64x range). Because q=2 sits on the steepest part of the refinement curve,
small platform differences in knot placement translate into large Δ′ differences.
Proposed fix
Pin q=2 Δ′ where it actually converges rather than where the production grid happens to land:
- On a fixed ldp grid the q=2 Δ′ converges to ≈8.91 at mpsi ≥ 1024 (γ(2/1) ≈ 214.5 Hz,
γ/Δ′ ≈ 24.1 constant), whereas the auto grid at its default sits ~28% low. See the
docs/development grid notes and the psi_accuracy scan table in developer_notes.md.
- Either (a) run the pinned case on a fixed ldp grid at sufficient mpsi, accepting the CI cost, or
(b) implement the plateau criterion described in developer_notes.md — scan psi_accuracy and
the truncation controls and pin the stationary value — so the reference is a property of the
physics rather than of the discretization.
Option (b) is the more general fix and would also make the harness-tracked Δ′ meaningful across
grid-generator changes; option (a) is cheaper but adds a large-mpsi run to CI.
Acceptance criteria
Summary
The pinned ideal-MHD Δ′ diagonal in
test/runtests_parallel_integration.jl(
delta_prime_matrix, DIII-D-like STRIDE BVP testset) is a single-point snapshot on anon-converged grid. For the q=2 surface it is also platform-dependent, which forced a
tolerance widening in #238 as a stopgap. This issue tracks replacing it with a converged Δ′ pin.
Observed platform spread (identical grid, inputs, and mode range)
real(dpm[1,1])(q=2)~25% end to end, and ~9% between two julia versions on the same OS. q=3 and q=4 are
reproducible across the same platforms.
Stopgap applied in #238
The q=2 pin was re-centered on the midpoint of the observed spread (6.9237) and its tolerance
widened from
rtol=1e-1tortol=1.5e-1to span it. q=3 and q=4 keeprtol=1e-1. This is anexplicit, deliberate loosening of an acceptance bound and should be reverted once a converged
pin exists — it is currently sitting at ~75% of its own budget, so a new platform could break it again.
Root cause
q=2 is the surface with the known Δ′ plateau problem. Per the
psi_accuracyscan recorded indocs/src/developer_notes.md("Open problem: pinning grid-sensitive Δ′ robustly"), on thetwo-pass auto grid
dpm[3,3](q=4) plateaus to ~1% over the four tightest grids,dpm[2,2]ismarginal, and
dpm[1,1](q=2) never settles — still moving ~7% between the two tightest grids(2e-3 → 3.125e-5, a 64x range). Because q=2 sits on the steepest part of the refinement curve,
small platform differences in knot placement translate into large Δ′ differences.
Proposed fix
Pin q=2 Δ′ where it actually converges rather than where the production grid happens to land:
γ/Δ′ ≈ 24.1 constant), whereas the auto grid at its default sits ~28% low. See the
docs/developmentgrid notes and thepsi_accuracyscan table indeveloper_notes.md.(b) implement the plateau criterion described in
developer_notes.md— scanpsi_accuracyandthe truncation controls and pin the stationary value — so the reference is a property of the
physics rather than of the discretization.
Option (b) is the more general fix and would also make the harness-tracked Δ′ meaningful across
grid-generator changes; option (a) is cheaper but adds a large-mpsi run to CI.
Acceptance criteria
rtol=1e-1(or tighter)developer_notes.mdopen-problem section updated to reflect the resolution