Add mass matrix support for FIRK and MIRK - #536
Conversation
Add mass matrix handling for FIRK and MIRK collocation paths, including algebraic constraint application and DAE adaptivity guards. Add focused FIRK and MIRK DAE tests for simple index-1 problems and Ascher-Spiteri coverage. Co-Authored-By: Sebastian Micluța-Câmpeanu <sebastian.mc95@proton.me> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Benchmark Results (Julia v1.11)Time benchmarks
Memory benchmarks
|
Raise FIRK/MIRK SciMLBase lower bounds for downgrade testing. Use out-of-place AD residuals for in-place boundary Jacobians and align FIRK in-place AD cache allocation with the AD backend actually used. Keep BVP default nonlinear solver internals off ForwardDiff residual paths and make single-shooting ForwardDiff Jacobians Dual-safe. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed Local validation run before push:
Notes:
|
Route in-place FIRK Mooncake residual AD through ForwardDiff for the boundary-condition paths as well as collocation/full residual paths. This avoids the Julia pre-release Mooncake rule-generation failure while preserving sparse wrapper structure. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed follow-up CI error was a Julia 1.13-rc1 Mooncake rule-generation failure while differentiating Local verification after the patch:
|
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed CI failures addressed:
Local validation:
I also tried the broader FIRK |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed Root cause from CI job https://github.com/SciML/BoundaryValueDiffEq.jl/actions/runs/28982590591/job/86004564806:
Local validation after the edit:
Continuing to monitor the refreshed CI run. |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed Additional local check while waiting: TMPDIR="$PWD/.tmp" timeout 3600 ~/.juliaup/bin/julia +1 --project=lib/BoundaryValueDiffEqFIRK -e 'import Pkg; Pkg.instantiate(); include("lib/BoundaryValueDiffEqFIRK/test/expanded/dae_tests.jl")'Observed:
|
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed Local validation run: TMPDIR="$PWD/.tmp" BOUNDARYVALUEDIFFEQ_TEST_GROUP=EXPANDED_DAE timeout 3600 ~/.juliaup/bin/julia +1 --project=lib/BoundaryValueDiffEqFIRK -e 'import Pkg; Pkg.instantiate(); Pkg.test(; coverage=false)'Observed TMPDIR="$PWD/.tmp" BOUNDARYVALUEDIFFEQ_TEST_GROUP=NESTED_DAE timeout 3600 ~/.juliaup/bin/julia +1 --project=lib/BoundaryValueDiffEqFIRK -e 'import Pkg; Pkg.instantiate(); Pkg.test(; coverage=false)'Observed Also ran Runic in-place followed by Runic |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed Observed CI issue this targets: the previous Local validation on the final formatted tree:
|
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed Observed on the previous head: Changes:
Local validation on the final formatted tree:
|
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed Local verification on Julia 1:
Watching the new CI run now. |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed Reason: after Local verification on Julia 1 after the split:
Watching the refreshed CI now. |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
CI follow-up after
Local verification on Julia TMPDIR="$PWD/.tmp" BOUNDARYVALUEDIFFEQ_TEST_GROUP=AD_TWOPOINT_MOONCAKE timeout 3600 ~/.juliaup/bin/julia +1 --project=lib/BoundaryValueDiffEqMIRK -e 'import Pkg; Pkg.instantiate(); Pkg.test(; coverage=false)'Result: Also ran: Both passed; temporary manifests, |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed This targets the runner-kill pattern from sublibrary run Local verification on this commit:
The separate |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed Why: sublibrary run Local verification on
The earlier Ascher Core Julia 1 failure was checked separately on clean |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed Change: the three ForwardDiff-only MIRK AD split groups now run in the main MIRK test environment instead of activating Local verification run on this branch:
Watching CI for the new head now. |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Pushed Observed on Sublibrary CI run
The ForwardDiff shards from the previous commit are now green in CI. Change in this commit: set Local verification with
Watching CI for the new head now. |
|
Update on The previously failing MIRK AD jobs are now green in Sublibrary CI run
No sublibrary failures are currently reported. The run is still in progress because six unrelated long-running tail jobs remain: FIRK I am not making further code changes from the tail jobs unless GitHub reports a concrete failure. |
This PR should be ignored until reviewed by @ChrisRackauckas.
Continues and rebases the mass matrix support from #521 onto current
masterwithout pushing to the contributor branch.What changed:
Local validation run on Julia
+1:timeout 3600 ~/.juliaup/bin/julia +1 --project=lib/BoundaryValueDiffEqMIRK -e 'import Pkg; Pkg.instantiate(); include("lib/BoundaryValueDiffEqMIRK/test/Core/dae_tests.jl")'Simple index-1 DAE: 30 passedAscher & Spiteri example problem 1: 8 passedMesh adaptivity is not supported for DAEs: 2 passedtimeout 3600 ~/.juliaup/bin/julia +1 --project=lib/BoundaryValueDiffEqFIRK -e 'import Pkg; Pkg.instantiate(); include("lib/BoundaryValueDiffEqFIRK/test/expanded/dae_tests.jl")'Simple index-1 DAE: 24 passedAscher & Spiteri example problem 1: 4 passedMesh adaptivity is not supported for DAEs: 2 passedtimeout 3600 ~/.juliaup/bin/julia +1 --project=lib/BoundaryValueDiffEqFIRK -e 'import Pkg; Pkg.instantiate(); include("lib/BoundaryValueDiffEqFIRK/test/nested/dae_tests.jl")'Simple index-1 DAE: 18 passedMesh adaptivity is not supported for DAEs: 2 passedtimeout 3600 ~/.juliaup/bin/julia +1 --project=.runic_env -m Runic --check --diff .passed with no diff;.runic_envwas removed after the check.