Fix Rosenbrock convergence-order test flakiness (Rodas6P dts + Rodas5P+Krylov tol)#3528
Merged
ChrisRackauckas merged 2 commits intoSciML:masterfrom Apr 23, 2026
Conversation
Four convergence assertions in lib/OrdinaryDiffEqRosenbrock/test/ode_rosenbrock_tests.jl (lines 212/222 for Rodas6P, 270/283 for Rodas5P+Krylov) were failing because of issues in the test setup, not regressions in the solver code. 1. Rodas6P (L212/L222): with dts = (1/2).^(6:-1:3), the smallest step (1/64) brings error on the tiny prob_ode_linear/2Dlinear problem down to Float64 roundoff (~1e-15), corrupting the log-log slope. Measured L2 was ~5.4-5.5; the test expected ~6. Widening to dts = (1/2).^(5:-1:2) (smallest = 1/32) stays above roundoff and gives L2 ≈ 6.07 as expected. Reproduced the same 5.44/5.51 slope on released OrdinaryDiffEqRosenbrock v1.26.0, confirming this is not a regression from the tableau sublibrary refactor (SciML#3509/SciML#3511) or the controller-cache refactor (SciML#3422) — the test has been flaky since Gerd Steinebach changed the expected order from 5 to 6 in 10be42a, right after landing Rodas6P. 2. Rodas5P + KrylovJL / KrylovJL_GMRES (L270/L283): LinearSolve now enforces the requested reltol/abstol on Krylov iterations, so the default-tolerance inner solve clips outer-method accuracy to ~2.8 order. Passing reltol=1e-14, abstol=1e-14 (same pattern as the Rodas3+Krylov test at L319, fixed in 6fe7343) restores L2 ≈ 5.004. testTol is unchanged at 0.2. No solver code was modified. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
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.
Summary
Four
@testassertions inlib/OrdinaryDiffEqRosenbrock/test/ode_rosenbrock_tests.jlhave been failing on #3521 (and #3520 before it):Rodas6Ponprob_ode_linear/prob_ode_2Dlinear, measuredL2 ≈ 5.44/5.51vs expected≈ 6 ± 0.2.Rodas5PwithKrylovJL()/KrylovJL_GMRES()linsolve, measuredL2 ≈ 2.83vs expected≈ 5 ± 0.2.Both are test-setup issues, not solver regressions. Confirmed by reproducing the same 5.44/5.51 slope on the released OrdinaryDiffEqRosenbrock v1.26.0 — so this is not a regression from the tableau-sublibrary refactor (#3509/#3511) or the controller-cache refactor (#3422). The Rodas6P test has been flaky ever since Gerd Steinebach flipped the expected order from 5 to 6 in 10be42a, one day after landing Rodas6P.
Root causes
dts = (1/2).^(6:-1:3), the smallest step (1/64) drives the error on these tiny linear problems to Float64 roundoff (~1e-15), corrupting the log-log slope. Widening todts = (1/2).^(5:-1:2)(smallest1/32) stays above roundoff and yieldsL2 ≈ 6.07on both problems — comfortably withinatol = 0.2.reltol/abstol, so the default-tolerance inner Krylov solve clips the outer Rosenbrock order to~2.83. Passingreltol = 1e-14, abstol = 1e-14— the same fix applied at L319 forRodas3in 6fe7343 — restoresL2 ≈ 5.004.Verified locally on Julia 1.12.6
testTol = 0.2is unchanged. No solver code modified.Test plan
test (OrdinaryDiffEqRosenbrock, 1)passes on Julia 1.12.6 (Core group).L212,L222,L270,L283) now report the new measured orders shown above.🤖 Generated with Claude Code