Commit 24a0225
committed
Fix FIRK v7 precompile: DI strict + VectorOfArray iteration
The `BoundaryValueDiffEqFIRK` precompile workload fails against
`OrdinaryDiffEq.jl` v7 / SciMLBase v3 / RecursiveArrayTools v4
in two distinct places. Both are fixed here.
1. `DifferentiationInterface.prepare_jacobian` strict-mode mismatch
in `firk.jl`. Preparation is done with
`y = copy(cache.y₀)` (a `VectorOfArray`-wrapping
`Base.ReshapedArray`), but execution inside the nonlinear solve
is called with a plain `Vector{Float64}`. DI's strict check
rejects this as a `PreparationMismatchError` (x type prep vs
exec). Match `BoundaryValueDiffEqShooting`, which already passes
`strict = Val(false)` to every `DI.prepare_jacobian` call.
2. `recursive_unflatten!(::AbstractVectorOfArray, ::AbstractVector)`
in `BoundaryValueDiffEqCore/src/utils.jl` iterates `for yᵢ in y`.
With RecursiveArrayTools v4, a 2D `VectorOfArray{T,2,...}` is an
`AbstractArray` with scalar linear-indexing iteration — so `yᵢ`
is a `Float64`, not the inner timestep vector, and the body
`copyto!(yᵢ, x[range])` dispatches to
`copyto!(::Float64, ::SubArray)` (no such method). Iterate
`y.u` instead, which is the vector-of-vectors backing store.
This is the counterpart to the other `sol`/`sol.u` migrations
that landed in the SciMLBase v3 compat commit.
Verified locally:
```
julia +1.11 -e 'using Pkg; Pkg.activate(temp=true);
Pkg.develop(path=".../BoundaryValueDiffEqFIRK");
Pkg.develop(path=".../BoundaryValueDiffEqCore");
using BoundaryValueDiffEqFIRK'
# ✓ BoundaryValueDiffEqFIRK precompiles (115 s)
julia +1.12 (same)
# ✓ BoundaryValueDiffEqFIRK precompiles (200 s)
```
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>1 parent fb3a3d5 commit 24a0225
2 files changed
Lines changed: 61 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
705 | | - | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
706 | 708 | | |
707 | | - | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
708 | 712 | | |
709 | 713 | | |
710 | 714 | | |
| |||
715 | 719 | | |
716 | 720 | | |
717 | 721 | | |
718 | | - | |
| 722 | + | |
| 723 | + | |
719 | 724 | | |
720 | 725 | | |
721 | | - | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
722 | 729 | | |
723 | 730 | | |
724 | 731 | | |
| |||
784 | 791 | | |
785 | 792 | | |
786 | 793 | | |
787 | | - | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
788 | 797 | | |
789 | | - | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
790 | 801 | | |
791 | 802 | | |
792 | 803 | | |
| |||
821 | 832 | | |
822 | 833 | | |
823 | 834 | | |
824 | | - | |
| 835 | + | |
| 836 | + | |
825 | 837 | | |
826 | 838 | | |
827 | | - | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
828 | 842 | | |
829 | 843 | | |
830 | 844 | | |
| |||
908 | 922 | | |
909 | 923 | | |
910 | 924 | | |
911 | | - | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
912 | 928 | | |
913 | | - | |
| 929 | + | |
914 | 930 | | |
915 | 931 | | |
916 | 932 | | |
| |||
988 | 1004 | | |
989 | 1005 | | |
990 | 1006 | | |
991 | | - | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
992 | 1010 | | |
993 | | - | |
| 1011 | + | |
994 | 1012 | | |
995 | 1013 | | |
996 | 1014 | | |
| |||
1038 | 1056 | | |
1039 | 1057 | | |
1040 | 1058 | | |
1041 | | - | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1042 | 1062 | | |
1043 | | - | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1044 | 1066 | | |
1045 | 1067 | | |
1046 | 1068 | | |
| |||
1051 | 1073 | | |
1052 | 1074 | | |
1053 | 1075 | | |
1054 | | - | |
| 1076 | + | |
| 1077 | + | |
1055 | 1078 | | |
1056 | 1079 | | |
1057 | | - | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
1058 | 1083 | | |
1059 | 1084 | | |
1060 | 1085 | | |
| |||
1117 | 1142 | | |
1118 | 1143 | | |
1119 | 1144 | | |
1120 | | - | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
1121 | 1148 | | |
1122 | | - | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
1123 | 1152 | | |
1124 | 1153 | | |
1125 | 1154 | | |
| |||
1150 | 1179 | | |
1151 | 1180 | | |
1152 | 1181 | | |
1153 | | - | |
| 1182 | + | |
| 1183 | + | |
1154 | 1184 | | |
1155 | 1185 | | |
1156 | | - | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
1157 | 1189 | | |
1158 | 1190 | | |
1159 | 1191 | | |
| |||
1234 | 1266 | | |
1235 | 1267 | | |
1236 | 1268 | | |
1237 | | - | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
1238 | 1272 | | |
1239 | | - | |
| 1273 | + | |
1240 | 1274 | | |
1241 | 1275 | | |
1242 | 1276 | | |
| |||
1302 | 1336 | | |
1303 | 1337 | | |
1304 | 1338 | | |
1305 | | - | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
1306 | 1342 | | |
1307 | | - | |
| 1343 | + | |
1308 | 1344 | | |
1309 | 1345 | | |
1310 | 1346 | | |
| |||
0 commit comments