Preserve nonlinear verbosity when resizing caches#3971
Preserve nonlinear verbosity when resizing caches#3971ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Validation scratchpad:
Boundary evidence:
The independent |
|
Two-hour CI checkpoint: The source-fix coverage is green across every substantive CPU lane:
The failures are independently classified rather than attributed to this one-line propagation fix:
At the checkpoint GitHub reports 148 successful, 18 failed, and three skipped checks. The only unfinished check is |
High-memory queue reread — 2026-07-21 01:07 EDTThe sole unfinished #3971 check, StochasticDiffEq NoncommutativeConvergence, remains queued.
This is runner-capacity waiting, not a test result. The PR remains unchanged at |
Important
Please ignore this draft until it has been reviewed by @ChrisRackauckas.
Summary
ImplicitEulerintegrator configured with detailed nonlinear verbosityOrdinaryDiffEqNonlinearSolvefrom 2.3.0 to 2.3.1Root cause
The first inner NonlinearSolve cache is initialized with
integrator.opts.verbose.nonlinear_verbosity. When an integrator resize changes the nonlinear problem size,initialize!rebuilt that cache without passing the verbosity setting, so NonlinearSolve fell back to its default.Besides silently changing the requested logging behavior, the rebuilt cache can have a different concrete verbosity type from the cache field created during the original initialization. With
SciMLLogging.Detailed(), the resize path then fails while assigning the rebuilt cache.This patch passes the integrator's configured nonlinear verbosity through the rebuild, matching the original initialization path.
The source-introduction boundary is
32dec6cafeb4104bb69438f578a9043c4f7bd11f(#3799), which introduced bothBase.resize!(::NonlinearSolveCache, ...)and its keyword-less cache rebuild. Its parent,4259e46ca875a7c9f297271aebbd5590ec648d46, has no specialized resize method, so this is not a conventional passing-parent/first-failing behavioral bisect: the resize capability and omitted propagation entered together. Commit030f9eb84later moved the already-defective rebuild intoinitialize!; it did not introduce the omission.Validation
GROUP=InterfaceIIIPkg.test()run reported 141 passes and one error inDEVerbosity Tests, at the post-resizestep!. Restoring the fix produced 142/142 passing DEVerbosity assertions; the full InterfaceIII group also passed (12/12 derivative utilities, 14/14 stats, 24/24 no-index, 5/5 events/DAE, and 52 passed plus four pre-existing broken unit tests).LinearSolve 3.87.0,NonlinearSolve 4.21.0,NonlinearSolveBase 2.33.0,SciMLLogging 2.0.3) and confirmed exact in-tree source paths. At32dec6caf, Detailed verbosity was present before resize and the rebuilt default-verbosity cache caused the expected typed-field conversion error. At its parent, the same probe stopped at the expected missingresize!(::NonlinearSolveCache, ...)method.NonlinearSolveBase 2.34.1,SciMLLogging 1.10.1), all 11 focused sparse/resize assertions passed (3/3, 4/4, and 4/4).git diff --check, and TOML parsing passed after the rebase.Scope and coordination
The natural downgrade graph on unmodified master independently selects
NonlinearSolveBase 2.33.0and fails the existing sparse operator-Jacobian test insafe_similar. That compatibility-floor issue is addressed by #3917 and is intentionally not folded into this source fix.This PR takes the
OrdinaryDiffEqNonlinearSolve2.3.1 patch version. #3917 and #3927 currently touch the same version line and will need to rebase and use the next available patch version.Process
The failure was reproduced against clean source, reduced to the resize rebuild, traced to its source-introduction boundary, verified red/green with a deterministic regression, checked against the exact reconciled downgrade graph, then rebased onto current
masterand revalidated before publication.