Continue markers after numerical recovery failures#490
Closed
krystophny wants to merge 1 commit into
Closed
Conversation
5 tasks
Member
Author
|
Superseded by the adversarially reviewed integration PR #492, which includes this continuation policy and fixes its stale Meiss-coils accounting/runtime regression plus the post-hold retry bug. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Risk tier
Correctness contract
Intended behavior change
Default warning mode no longer terminates a marker when all numerical recovery for one microstep is exhausted. The accepted state is retained for the unresolved interval,
warning_step_skipis counted, and the same marker resumes on the next microstep. SPECTRE still attempts sheet and full-orbit recovery first. Numerical full-orbit failure falls back to the last valid guiding-centre state; physical full-orbit loss remains a loss.The generic trace, wall-check trace, and classifier trace share this policy. SPECTRE RK45 and symplectic traces now also assign completed, physical-loss, and strict numerical exit codes explicitly.
Behavior that must not change
Physical LCFS and wall events still terminate the marker. Successful steps, bounded warning-mode Newton acceptance, recursive half-step recovery, SPECTRE reflection/transmission, sheet recovery, and full-orbit recovery retain their existing order. Warning-off strict mode still rolls back and returns the numerical status.
Coordinate / unit conventions
No coordinate, gauge, timestep-unit, momentum, or field convention changes. A last-resort hold advances only the normalized clock for the unresolved remainder; it does not commit a failed canonical or physical-coordinate state.
Numerical invariants
Tests added
fosuiteGolden-record impact
Existing successful trajectories and physical loss semantics are unchanged. Only markers that previously ended on an exhausted numerical recovery continue.
Failure modes considered
Maximum-iteration and linear-solve exhaustion, coordinate inversion failure, sheet initialization/advance failure, landing failure, teleport/event caps, full-orbit initialization/advance failure, physical full-orbit loss, wall/LCFS loss, and strict warning-off operation.
Manual validation
The history chain was audited: #456 introduced rollback and top-level early return; #457 made solver failures observable; #487 restored bounded warning acceptance; #488 added halved retries but still returned a hard status after exhaustion. This change separates rollback/diagnostics from marker lifetime.
The focused SPECTRE crossing suite completed with zero
CROSS_STOPevents and the end-to-end SPECTRE validation completed all markers. The generic injected-failure test confirms state preservation and clock continuation.Verification
fo test test_sympl_testfield: passfo test test_spectre_sympl_crossing test_spectre_validation: 2/2 passfobefore formatting: all 84 tests pass, static/build/lint passfoafter formatting: 83/84 pass;test_magfie_refcoords_splineswas externally terminated during the 32-way memory-heavy runfo test test_magfie_refcoords_splines: pass in 24.93 sThe formatter mechanically touched pre-existing layout throughout five modified Fortran files; the behavioral diff is substantially smaller than the raw line count.