Document matched Krylov safeguard results and limitations

This commit is contained in:
2026-09-16 15:46:09 -04:00
parent b3a752b16b
commit 2eab110bef

View File

@@ -1,12 +1,17 @@
# Krylov information retention and correction reuse
# Krylov correction safeguard: observed outcome
Baseline: `80cc3d8`. This branch evaluates two distinct effects without adding
public options or changing physical specifications, normalization, preconditioner,
linear tolerances, or nonlinear acceptance.
Retain the true-residual initial-guess safeguard as a limited inner-solver
robustness improvement. The matched n=1 solution is unchanged, and the capped
n=1.5 run uses fewer linear iterations and avoids its control's late linear
failure. It does not resolve the n=1.5 nonlinear plateau or establish full
physical validation.
The first control changes the existing FGMRES restart setting from 40 to 160.
Frozen solves in the audit established linear benefits; live Newton runs must
establish whether the resulting corrections remain useful and physically accurate.
Tested guard revision: `1911a26a9a283eed7e53b03fc3481ee894e61bfb`.
Matched control revision: `9bd4af699650e2a6bbe795c618e6ef3fbcb48e12`.
The underlying numerical snapshot is `80cc3d8`; the safeguard implementation is
`ed75830`. Both live comparisons use restart 160, omit the central constraint,
allow eight Newton attempts and 200 linear iterations, and require a true linear
residual/RHS <=0.03. Newton stopping uses atol=0 and rtol=1e-8.
The production candidate safeguards a supplied linear initial guess using its
true residual under the current operator. It retains the guess when
@@ -14,24 +19,92 @@ true residual under the current operator. It retains the guess when
extra operator action, included in reported counts and solve time. Zero guesses
do not incur an extra action. This is neither Krylov basis recycling nor a
guarantee of fewer iterations: a smaller initial residual can still excite a
harder set of modes. The candidate must earn its cost in matched live runs.
harder set of modes.
The retained `(1-alpha)p` heuristic from damped Newton remains intact, as does
the existing backend API. The safeguard only declines a guess that increases
the current true defect. It also handles a nonfinite operator action on an
otherwise finite guess by choosing the finite zero guess, collectively across
the communicator. Existing input checks still reject nonfinite supplied vectors.
There is no public API or policy-option change, and no change to physical
specifications, normalization, preconditioner, tolerances or nonlinear acceptance.
The reported initial residual belongs to the effective guess after safeguarding;
it does not expose the raw residual of a discarded guess.
Required comparisons:
## Matched live evidence
- Same no-phase n=1.5 seed at restart 160 with baseline and candidate; record
each initial linear residual relative to its RHS, accepted step lengths,
true defects, total time and physical endpoint diagnostics.
- n=1 controls with full steps, where the Newton heuristic already produces
zero guesses; their physical trajectory should remain unchanged.
- Existing beneficial-warm-start test plus the new adverse-guess regression.
At n=1, J=0.05, both runs converge in seven full steps and 292 linear iterations
to F=3.38036278e-11. Saved state, initial/final physical tables, layout, block
residuals and trial histories are byte-identical. Every non-time Newton history
field also matches. All eight q14/q18 energy/force virials with P(h) and P(rho)
pass 1e-5; the largest is 3.73465327e-7. Full steps leave zero guesses, so this
is a regression control, not evidence that the safeguard accelerates cold solves.
Do not promote this change merely because the small regression passes. A live
improvement, unchanged validation, and sensible overhead are required. Virial
success means both measured definitions satisfy 1e-5 where pressure is defined;
interior EOS/Bernoulli consistency and algebraic convergence remain separate.
At n=1.5, J=0, initial physical tables and the first two numerical histories
match exactly, including block records through the third attempt's before-state.
The first reset then changes the effective initial defect/RHS from the control's
1.50970280 to 1, and reduces linear iterations from 71 to 65. Both accept alpha=1/64
after four trials. Resulting F is 1.75410130e-4 guarded versus 1.75953185e-4 control.
Later trajectories differ; their discarded raw guesses cannot be inferred from
the effective initial-residual reports.
| Capped n=1.5 outcome | Control | Guard |
|---|---:|---:|
| Accepted Newton steps | 7 | 8 |
| Termination | Eighth linear solve fails | Newton iteration cap |
| Final F | 1.75134755e-4 | 1.74946086e-4 |
| Last accepted alpha | 1/2048 | 1/8192 |
| Total linear iterations | 672 | 561 |
| First seven attempts' linear iterations | 472 | 467 |
| Sum of linear solve times | 303.52 s | 242.92 s |
| Sum of Newton-attempt times | 487.15 s | 447.25 s |
| Process time, including diagnostics | 550.36 s | 508.16 s |
The guard passes every linear gate within this cap; the last true residual/RHS is
0.02995827. Most of the total iteration reduction comes from avoiding the last
200-iteration failure. The seventh guarded solve costs 94 iterations versus 80
in the control, so improvements are not uniform. These are different later
linear systems and single timings, not a same-matrix or reproducible speedup
measurement. The inactive n=1 control itself varied by approximately 5% in time.
Both n=1.5 endpoints remain unconverged and have similar unresolved local errors.
Guarded q18 P(h) energy/force virial errors are 2.24342463e-6 / 2.35159576e-6;
changes from control are +9.04e-9 / +2.02e-8. The q14/q18 difference is 1.84e-9.
Full P(rho) virials remain undefined from sampled DG density negativity. The
negative-density mass fraction changes only from 2.89327559e-5 to 2.89305795e-5;
no negative enthalpy is sampled. Peak/RMS EOS and Bernoulli errors improve slightly.
Mass error increases from 3.50011e-6 to 3.52971e-6. Center-of-mass displacement
worsens from 1.67437e-6 to 4.57477e-6 of the unit reference radius and remains an
explicit follow-up metric. Sampled signs and extrema are not pointwise bounds.
The standalone solver-and-virial checker passes n=1 and fails n=1.5, preserving
strict stopping and pressure-validity distinctions. P(h) virial success alone
does not validate the interior. Severe damping first occurs with a cold guess
on the second n=1.5 attempt, so adverse warm starts cannot be the entire cause.
## Regression checks and reproduction
All five unique focused tests pass on one MPI rank: two backend tests with
41 assertions and three Newton integration tests with 356243 assertions
(356284 total). Both backend tests also pass on two MPI ranks, with 41 assertions
on each rank. Coverage includes beneficial-guess retention, restart/reporting,
rank-0-only adverse guesses, finite coefficients whose operator action overflows,
collective fallback, and the existing Newton correction-reuse integration.
The exact filters are `[solver][linear][fgmres][warm-start]` and
`[solver][newton][warm-start],[solver][newton][fgmres]`, with Catch RNG seed 20260916.
Only the backend filter is used in the two-rank check. Test binary SHA-256:
`258f749ce85e14136b8f7a5fe28e3a49f8007c6bfe37fedd81e27119a8be1d23`.
Reproduce guarded live cases with `run_plateau_campaign.py` and
`plateau_krylov_cases.json`; compare the corresponding restart-160 cases in
`plateau_control_cases.json` at the control revision. Mesh SHA-256:
`ce11ae99e21e6c3bbfbee402acd2e191c1da0d8261d2227b4203f73f2f337a74`.
Guard executable SHA-256:
`a16dfd624e74e89a0b6f78d0cd3742e58274b09580f09b3583d3a37fa4004d46`.
Raw runs, exact commands, logs, copied binaries, hashes and full analysis are
retained outside git under the campaign's `controls/`, `guard/`, `guard_checks/`
and `guard_analysis.md`. Recorded CMake caches are identical. Dynamic libraries
are not frozen and inherited thread settings are not captured. Direct frozen
MFEM probes bypass this production safeguard and cannot validate its behavior.