Skip to content

Commit 8d5ed6a

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
Fix Multirate FastBroadcast compat and BDF convergence-test KeyError (#3386)
Two independent master test failures: * OrdinaryDiffEqMultirate pins FastBroadcast = "0.3", but OrdinaryDiffEqCore requires FastBroadcast = "1.3", so Pkg.Resolve fails immediately. Bump the Multirate compat to "1.3" and bump the package version to 1.0.1. * The QNDF1 + AutoEnzyme + KrylovJL convergence test added by #3373 passes `reltol = 1.0e-14, abstol = 1.0e-14`. BDF-1's local error floor exceeds double-precision near those tolerances, so Newton hits ConvergenceFailure on every dt except the finest. Failed solutions have an empty `sol.errors` dict, which then makes DiffEqDevTools.ConvergenceSimulation crash with `KeyError: key :l∞ not found` while iterating keys of the first (successful) solution. Drop the tight-tolerance override for this BDF case; the tightening from #3373 was only needed to avoid LinearSolve's residual-tolerance coupling starving Rosenbrock convergence, which is not a problem here. Locally verified: QNDF1 + KrylovJL reports final/l2/l∞ order ≈ 1.0–1.17 on both prob_ode_linear and prob_ode_2Dlinear (testTol = 0.2). Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 27c848d commit 8d5ed6a

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

lib/OrdinaryDiffEqBDF/test/bdf_convergence_tests.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ end
6767
@test sim.𝒪est[:l2] 1 atol = testTol
6868
@test sim.𝒪est[:l∞] 1 atol = testTol
6969

70+
# Note: tight reltol/abstol (1e-14) is unusable for BDF-1 because the
71+
# method's local error floor exceeds machine precision, causing Newton
72+
# ConvergenceFailure on all but the finest dt. Leave reltol/abstol at the
73+
# defaults; without the LinearSolve residual-tolerance coupling described in
74+
# #3373, QNDF1's observed order already lands near 1 on prob_ode_2Dlinear.
7075
sim = test_convergence(
7176
dts,
7277
prob,
@@ -76,8 +81,7 @@ end
7681
function_annotation = Enzyme.Const
7782
),
7883
linsolve = LinearSolve.KrylovJL()
79-
),
80-
reltol = 1.0e-14, abstol = 1.0e-14
84+
)
8185
)
8286
@test sim.𝒪est[:final] 1 atol = testTol
8387
@test sim.𝒪est[:l2] 1 atol = testTol

lib/OrdinaryDiffEqMultirate/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "OrdinaryDiffEqMultirate"
22
uuid = "d4b830b4-ac80-426b-8507-16693d424963"
33
authors = ["singhharsh1708 <hs1663531@gmail.com>"]
4-
version = "1.0.0"
4+
version = "1.0.1"
55

66
[deps]
77
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
@@ -17,7 +17,7 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
1717
Aqua = "0.8.11"
1818
DiffEqBase = "6.194"
1919
DiffEqDevTools = "2.44.4"
20-
FastBroadcast = "0.3"
20+
FastBroadcast = "1.3"
2121
JET = "0.9, 0.11"
2222
MuladdMacro = "0.2"
2323
OrdinaryDiffEqCore = "3"

0 commit comments

Comments
 (0)