fix: let the despecialization barrier accept unwrapped parameters - #4297
Conversation
ee97c06 to
bf7a100
Compare
`_invoke_parameter_despecialization` required exactly one `DespecializedParameters` argument. A caller that has already unwrapped the parameters re-enters the barrier with them passed concretely, which errored. DAE initialization does exactly this: `BrownFullBasicInit` wraps the residual in a `NonlinearFunction`, whose call unwraps the parameters before forwarding to the outer `AutoDespecialize` function. Any `DAEProblem` needing a consistent initialization solve therefore failed once `AutoDespecialize` became the default. Accept zero wrappers and pass the call through, mirroring SciMLBase's own `invoke_with_despecialized_parameters`. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
bf7a100 to
5c27e4e
Compare
|
The requested DiffEqBase source change triggered the full matrix. The completed run produced 268 completed CPU checks (236 success, 28 failure, 3 skipped, 1 cancelled); the remaining GPU jobs were queued/running when the branch was rebased. Every red CPU job is now assigned:
Full triggered CPU/GPU workflow: https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/32391249144 |
|
Final OrdinaryDiffEq follow-ups from the matrix are now published: the Julia 1.10 initdt forward-mode verifier fix is #4327 (QA 92/92; Interface I green with #4261; AD 28,302/28,302 with #4242), and the fixed-step multistep convergence fix is the stacked #4328 (Core 891 pass/40 pre-existing broken; ModelingToolkit and QA green). No CPU failure from the triggered matrix remains unassigned. |
Please ignore this PR until reviewed by @ChrisRackauckas.
What changed and why
Allow the parameter-despecialization barrier to receive zero
DespecializedParameterswrappers and pass that call through unchanged. DAE initialization wraps its residual in aNonlinearFunction, which unwraps parameters before forwarding to the outerAutoDespecializefunction; the barrier therefore re-enters with zero wrappers and previously threw. More than one wrapper remains an error.The branch is rebuilt as one commit on current master while preserving the original author and the required Chris Rackauckas co-author trailer. DiffEqBase is bumped from 7.18.0 to 7.18.1.
Failing before / passing after
With the checked-in regression test present and the source fix reverted, the full DiffEqBase Core group fails:
With the fix restored, the identical full Core command passes:
The public DAE reproducer also reaches a successful solve and satisfies its algebraic constraint:
Local verification
GROUP=Core julia +1.12 --startup-file=no --project=lib/DiffEqBase -e 'using Pkg; Pkg.test()': passed on current master; the discriminating hook is 47/47.GROUP=QA julia +1.12 --startup-file=no --project=lib/DiffEqBase -e 'using Pkg; Pkg.test()': Aqua 9/9; package tests passed.DFBDF,AutoDespecialize, andBrownFullBasicInit:retcode=Success, constraint sum 1.0.--check --diff,typoson all changed files, andgit diff --check: passed.The complete Downstream/Downstream2, GPU, and prerelease-Julia groups were not run locally. The public DAE reproducer covers the observed behavior, while the full Core and QA groups cover the changed DiffEqBase package.