Commit 32cfe9f
committed
Apply DI strict = Val(false) fix to MIRK (and other sublibs)
Extends the `DifferentiationInterface.prepare_jacobian` strict-mode fix
from FIRK (previous commit) to the remaining collocation sublibs:
* `BoundaryValueDiffEqMIRK/src/mirk.jl` : 12 call sites
* `BoundaryValueDiffEqMIRKN/src/mirkn.jl` : 6 call sites
* `BoundaryValueDiffEqAscher/src/ascher.jl`: 2 call sites
Same root cause as FIRK: preparation is done with a `VectorOfArray`-
wrapping `Base.ReshapedArray` `y`, but execution inside the nonlinear
solve is called with a plain `Vector{Float64}`. Under DI's strict mode
(default `Val(true)`) this trips `PreparationMismatchError`. Passing
`strict = Val(false)` at each call site matches what `Shooting` already
does and what the FIRK commit set up.
Verified locally with `julia +1.11`:
julia +1.11 -e 'using Pkg; Pkg.activate(temp=true);
Pkg.develop.([(path="lib/BoundaryValueDiffEqCore",),
(path="lib/BoundaryValueDiffEqAscher",)]);
using BoundaryValueDiffEqAscher'
# Ascher precompiles cleanly (~8 s)
(same for BoundaryValueDiffEqMIRKN)
# MIRKN precompiles cleanly (~10 s)
MIRK module itself precompiles cleanly once the DI fix is in place
(verified with PrecompileMIRK=false so the separate `@compile_workload`
isn't exercised). Any remaining failures in MIRK's precompile
workload are a separate `VectorOfArray` v4 iteration issue outside
the scope of the DI strict-mode fix.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>1 parent 24a0225 commit 32cfe9f
3 files changed
Lines changed: 57 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
348 | 350 | | |
349 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
350 | 354 | | |
351 | 355 | | |
352 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
597 | 599 | | |
598 | | - | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
599 | 603 | | |
600 | 604 | | |
601 | 605 | | |
| |||
605 | 609 | | |
606 | 610 | | |
607 | 611 | | |
608 | | - | |
| 612 | + | |
| 613 | + | |
609 | 614 | | |
610 | 615 | | |
611 | | - | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
612 | 619 | | |
613 | 620 | | |
614 | 621 | | |
| |||
675 | 682 | | |
676 | 683 | | |
677 | 684 | | |
678 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
679 | 688 | | |
680 | | - | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
681 | 692 | | |
682 | 693 | | |
683 | 694 | | |
| |||
708 | 719 | | |
709 | 720 | | |
710 | 721 | | |
711 | | - | |
| 722 | + | |
| 723 | + | |
712 | 724 | | |
713 | 725 | | |
714 | | - | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
715 | 729 | | |
716 | 730 | | |
717 | 731 | | |
| |||
846 | 860 | | |
847 | 861 | | |
848 | 862 | | |
849 | | - | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
850 | 866 | | |
851 | | - | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
852 | 870 | | |
853 | 871 | | |
854 | 872 | | |
| |||
909 | 927 | | |
910 | 928 | | |
911 | 929 | | |
912 | | - | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
913 | 933 | | |
914 | | - | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
915 | 937 | | |
916 | 938 | | |
917 | 939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
228 | 230 | | |
229 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
| |||
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
244 | | - | |
| 248 | + | |
| 249 | + | |
245 | 250 | | |
246 | 251 | | |
247 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
248 | 255 | | |
249 | 256 | | |
250 | 257 | | |
| |||
314 | 321 | | |
315 | 322 | | |
316 | 323 | | |
317 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
318 | 327 | | |
319 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
320 | 331 | | |
321 | 332 | | |
322 | 333 | | |
| |||
0 commit comments