Commit 56ffb52
Newton-Krylov integrators default to Hegedüs warm start (require LinearSolve 5.1) (#3991)
* Default Newton-Krylov integrators to Hegedus warm starting
Resolves a Krylov linear solver left at the new LinearSolve.WarmStart.Auto
default to WarmStart.Hegedus on the Newton nonlinear-solver path, so implicit
integrators using KrylovJL_GMRES()/KrylovJL_FGMRES() reuse the previous solution
(Hegedus-scaled) across the correlated linear solves of a Newton iteration.
Rosenbrock/W-method integrators never call the resolver, so their Auto solver
stays a cold start -- warm starting is unsafe there (no outer Newton iteration
absorbs the within-tolerance stage-solve perturbation, which can trigger
step-rejection feedback loops). Explicit WarmStart.None/Previous/Hegedus are
always respected.
The resolver is guarded on isdefined(LinearSolve, :WarmStart), so it is a no-op
on LinearSolve < 5.1 and this compiles unchanged there. Bumps the LinearSolve
compat of the two touched sublibraries to allow 5; umbrella-wide activation
additionally requires the OrdinaryDiffEq LinearSolve 5 compat migration across
the remaining sublibraries.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Make downgrade compat floors consistent in the two touched sublibraries
Two stale minimum-version declarations were mutually unsatisfiable, which is
what the Downgrade Sublibraries CI hits:
- LinearSolve floor 3.75.0 was inconsistent with the NonlinearSolveBase 2.34.1
floor, which itself requires LinearSolve >= 4.3.0. Raised to 4.3.0.
- OrdinaryDiffEqNonlinearSolve declared SciMLOperators >= 1.24.3 while its path
dependency OrdinaryDiffEqDifferentiation requires >= 1.24.4. Raised to 1.24.4.
Neither drops any actually-installable configuration. The warm-start resolver
remains guarded on isdefined(LinearSolve, :WarmStart), so it still no-ops on
LinearSolve 4.x and activates on 5.1+.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Require LinearSolve 5.1 across the monorepo and drop the WarmStart guard
Makes the Newton-Krylov Hegedus warm-start default unconditionally live instead
of silently dormant:
- OrdinaryDiffEqNonlinearSolve and OrdinaryDiffEqDifferentiation require
LinearSolve = "5.1" (where WarmStart exists), and default_krylov_warm_start
drops its isdefined(LinearSolve, :WarmStart) guard.
- Every other monorepo sublibrary that declared a LinearSolve compat is moved to
"5.1" as well. These all depend (transitively) on NonlinearSolve/Differentiation,
so they can never resolve with LinearSolve < 5.1 anyway; keeping a 3/4 lower
bound would be dead metadata and would re-break the Downgrade CI (which floors
deps to their minimum). Test sub-environments updated to match.
- Minor version bumps for each sublibrary whose compat changed.
Verified: fresh resolution pins LinearSolve 5.1.0; resolver unit test passes
(7/7); FBDF and Rodas5P solve with a default KrylovJL_GMRES(); the resolver maps
Auto -> Hegedus with the guard removed.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent bc534d7 commit 56ffb52
18 files changed
Lines changed: 79 additions & 28 deletions
File tree
- lib
- DelayDiffEq
- OrdinaryDiffEqAMF
- OrdinaryDiffEqBDF
- OrdinaryDiffEqDefault
- OrdinaryDiffEqDifferentiation
- src
- test
- sparse
- OrdinaryDiffEqExponentialRK
- OrdinaryDiffEqExtrapolation
- OrdinaryDiffEqFIRK
- OrdinaryDiffEqNonlinearSolve
- src
- test/modelingtoolkit
- OrdinaryDiffEqRosenbrockTableaus
- OrdinaryDiffEqRosenbrock
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
55 | 78 | | |
56 | 79 | | |
57 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments