Skip to content

Commit 6146ac7

Browse files
logan-ncclaude
andcommitted
FFS - EXPERIMENT - abstol tested thoroughly on both integrators: do not ship
Git archaeology: abstol was implemented for this exact purpose in Jan 2026 (issue #122 option 1, with a scale-aware atol) but was NEVER merged -- it lives only on a claude/issue-122 branch. Issue #122 records the maintainer's verdict that users should not be given an abstol, with runtime rising and et going to garbage at large values. Re-tested on current code with the observable that was missing then. On the riccati integrator, abstol cuts steps 51% while runtime moves only 7% and Delta' -- which feeds the tearing calculations -- is wrong by 254% at abstol 1e-2, while et[1] moves only 5e-5 relative and would have passed an et-only check. On the forward integrator et[1] is identical to 10 digits and core steps fall 40%, but wall time is flat within noise. Retracts the 'free ~11%' from section 18, which was measured on step count alone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent fc3d228 commit 6146ac7

1 file changed

Lines changed: 53 additions & 4 deletions

File tree

handoff/issue376/RESULTS.md

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,13 +790,62 @@ Shrinking ε lowers the curve; only making ε *smooth in ψ* can change its slop
790790

791791
### Actionable
792792

793-
1. **Free ~11%**: give the EL solves an explicit `abstol` (`EulerLagrange.jl:766`;
794-
`Riccati.jl:1080,1443,1455,1515,1525`). et[1] identical to 9 digits at every mpsi tested. Its own
795-
small PR with a harness run; a *vector* abstol scaled per harmonic (the `abstol_vec` idiom at
796-
`DirectEquilibriumArcLength.jl:115`) would be the more surgical version.
793+
1. ~~Free ~11% from an explicit `abstol`~~**retracted, see §19.** That figure was measured on
794+
*step count only*. Wall time does not follow, and on the Riccati path an `abstol` destroys Δ′.
797795
2. **The scaling** needs correlated surface construction — continuation from surface to surface so
798796
the per-surface error is smooth rather than white — or the inversion construction. Not attempted.
799797

798+
## 19. abstol: tested thoroughly, and it must not ship
799+
800+
**Prior art (found in the history, not in `develop`).** `abstol` was implemented for exactly this
801+
purpose in Jan 2026 — `377d85132 DCON - IMPROVEMENT - Add absolute tolerance to ODE solver to reduce
802+
deep core steps`, issue #122 option (1), with a scale-aware `compute_atol_scale!` sampling solution
803+
magnitudes at half-integer q. It was **never merged**: it lives only on
804+
`origin/claude/issue-122-20260103-1833`. Issue #122 (still open) records the verdict — the maintainer
805+
benchmarked it and concluded *"the user shouldn't be given an `abstol`. Not enough gain in the safe
806+
range to warrant the possibility of being in the bad range."* Their table shows runtime *rising*
807+
with looser atol (150 → 274 → 1547 → 36800 s) and et going to garbage (−775) at 1e6.
808+
809+
So there was no removal to explain: it was tried, measured, and rejected. This section re-tests it on
810+
the current code with the observable that was missing then — **Δ′**.
811+
812+
Setup: DIII-D stripped deck, mpsi=512, route (a) applied. `integrator = "riccati"` (which is what
813+
unlocks `SingularSurfaces/Delta_prime_matrix`) vs `integrator = "forward"`. Δ′ deviations are
814+
relative to that integrator's own no-abstol run.
815+
816+
**Riccati chunks — Δ′ is destroyed, and et[1] hides it completely:**
817+
818+
| abstol | steps | run (s) | et[1] | Δ'diag rel |
819+
|---|---|---|---|---|
820+
| none (default 1e-6) | 1384 | 17.7 | 0.7841145216 | ref |
821+
| 1e-4 | 907 | 17.0 | 0.7840998277 | **4.9e-03** |
822+
| 1e-2 | 679 | 16.4 | 0.7840701367 | **2.54 (254%)** |
823+
| 1 | 535 | 16.6 | 0.7845740708 | **4.68 (468%)** |
824+
825+
Steps fall 51% and **runtime barely moves (−7%)**, while Δ′ — which feeds the tearing calculations —
826+
is wrong by 254% at abstol 1e-2. et[1] moves only 5e-5 relative, so **an et-only acceptance check
827+
would have passed this**. That is the trap the Δ′ test was for.
828+
829+
**Forward integration — safe, but worthless:**
830+
831+
| abstol | steps | core | run (s) | et[1] |
832+
|---|---|---|---|---|
833+
| none (default 1e-6) | 2768 | 1066 | 12.8 | 0.7815877685 |
834+
| 1e-4 | 2575 | 887 | 14.0 | 0.7815877684 |
835+
| 1e-2 | 2468 | 771 | 12.4 | 0.7815877685 |
836+
| 1 | 2282 | 642 | 13.3 | 0.7815877685 |
837+
838+
et[1] identical to 10 digits and core steps down 40%, but **wall time is flat within noise
839+
(12.4–14.0 s)**. Consistent with §6's step-independent floor in that phase: the steps being removed
840+
are cheap ones, so removing them buys nothing.
841+
842+
**Conclusion: no PR.** Riccati is unsafe (Δ′), forward is safe but gains nothing. This independently
843+
reproduces the issue #122 verdict and adds the mechanism it was missing. Route (a)'s step reduction
844+
was different in kind — it *was* confirmed by wall clock (harness runtime 202 → 178 s).
845+
846+
**Corollary for future work**: step count is not a proxy for cost here, and et[1] is not a proxy for
847+
correctness. Any deep-core optimisation must be judged on wall time **and** Δ′.
848+
800849
## Implications / ranked follow-ups
801850

802851
1. **Use the two-pass auto grid** (`mpsi=0`, `psi_accuracy`) — already the example default; it

0 commit comments

Comments
 (0)