Repository navigation
Compare the remade chain_dae solve at the init tolerance - #5413
piyushraj44 wants to merge 1 commit into
Conversation
The remade problem in model_independent_initialization.jl runs initialization again, starting from sol.u[1]. That point is only converged to the init solve's abstol (1e-6), so when the nonlinear solver takes one more step there, the start moves by up to that much and the end states can differ by more than the default sqrt(eps). That happens once OrdinaryDiffEq's default init solve starts SCC blocks at Newton: for chain_dae(6) with FBDF the init lands 3.3e-7 from the root, the remade init moves it by 3.3e-7, and the end states differ by rel 1.83e-8 (the limit is 1.49e-8). Compare them at rtol = 1e-6 instead.
PR: #5413 Reviewed head: 0c9118d Risk assessment
Review reportVERDICT: MERGE Riskmedium-low (ML5: explained test-tolerance relaxation; explicit Newton initialization reproduces the old failure, and tighter initialization restores agreement). Blocking findingsNone.
Non-blocking findings
What I ran
What I did not verify
AUTHOR_GRADE: {"task":"test","score":4,"difficulty":2,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"Initialization group passed; explicit Newton reproduced the original assertion failure, and tighter initialization removed the discrepancy. The change is a justified test-tolerance adjustment with no production-code change."} Head link: 0c9118d 🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.1-sol |
model_independent_initialization.jlremakes each problem fromsol.u[1]and checksremadesol.u[end] ≈ sol.u[end]at the default √eps. The remade solve runs initialization again, starting fromsol.u[1], and that point is only converged to the init solve's tolerance (abstol = 1e-6). So whenever the nonlinear solver takes one more step there, the start moves by up to that much and the end states can differ by more than √eps, even though both inits are fine.That's what happens with SciML/OrdinaryDiffEq.jl#5010, which makes OrdinaryDiffEq's default init solve start SCC blocks at Newton instead of Broyden. It's a follow-up to SciML/OrdinaryDiffEq.jl#5008. For
chain_daewithFBDF:≈(√eps)rtol = 1e-6Both solver orders land on the same root, inside the requested tolerance. The n=9 case already moves by 2.3e-7 at init today; it just stays under √eps at the end. So this compares the two end states at
rtol = 1e-6, with a comment saying why. The other checks in the testset are unchanged. The new tolerance is looser, so the test passes wherever it passed before.I ran the
Initializationgroup locally on Julia 1.13.4, with this branch and the OrdinaryDiffEq change dev'd: 1015 pass, 12 broken, 0 failures. Without this change, the same setup fails only this check, forchain_dae(6).