Skip to content

Commit 1f7eb00

Browse files
Fix NonStiffODE under v7 stack: refresh manifest, fix script bugs, IRKGL16 verbose
Root cause: three independent issues stacked on top of each other. 1. The pinned Manifest had `SymbolicUtils v4.26.0`, which throws `Method overwriting is not permitted during Module precompilation` in `apply_optimization_rules`. That kills `ParameterizedFunctions` precompile, which is the first `using` line in `EnrightPryce_wpd.jmd` — so the very first .jmd in the folder crashed at load time on amdci1-1 (CI run 25374549824, job 75199969438) and the cascading "no such directory" errors on the remaining six files were just the runner cleanup tripping over the killed job. 2. `enright_pryce.jl` had two latent bugs that newer `SymbolicUtils` / `ModelingToolkit` now catch: - SF1 equation 2 had `1880 * [y[4] - y[2] * (1 + k)]` (vector literal) instead of `1880 * (y[4] - y[2] * (1 + k))`. The bracket made it a 1-vector, and `SymbolicUtils.AddWorkerBuffer` now throws an unequal-shape error when adding scalar/vector symbolic terms. - The ND eccentric-orbit family declared `@parameters ε` and threaded `[ε => e]` through every `make_ds(...)`, but ε does not appear in the equations themselves (the eccentricity enters only via the initial conditions). MTK now correctly errors: "Expected an `Initial` parameter to exist for variable `ε`, but did not find one". Removed the stray parameter. 3. `IRKGL16` (IRKGaussLegendre v1) treats `verbose` as a Bool, but the v7 stack passes a `DEVerbosity` struct. Every `WorkPrecisionSet` chunk that included `IRKGL16(...)` raised `TypeError: non-boolean ... DEVerbosity ... used in boolean context`. Added `verbose = SciMLLogging.None()` to those chunks in LotkaVolterra/Pleiades/RigidBody/ThreeBody. 4. `OrdinaryDiffEqSIMDRK` (MER5v2/MER6v2/RK6v4) recurses to a StackOverflow on `NaNMath.sqrt(::VectorizationBase.Vec{2,Float64})` when the RHS calls `sqrt` — which is exactly the ND Kepler family. Split out a `setups_nd` without SIMD-RK for the ND section of `EnrightPryce_wpd.jmd`. NA/NB/NC don't hit `sqrt` (or skip the one problem that does), so SIMD-RK stays in `setups` for them. Also: `EnrightPryce_wpd.jmd` referenced `NC_PROBLEMS[5]`, but `nc5prob` is commented out in `enright_pryce.jl` (TODO: MTK v10 N-body). Dropped the NC5 chunk. Fix: - `Pkg.update()` on `benchmarks/NonStiffODE/` (Project.toml unchanged): SymbolicUtils 4.26.0 -> 4.30.1, plus the usual transitive bumps (ModelingToolkit 11.24 -> 11.26, SciMLBase 3.7 -> 3.13, OrdinaryDiffEq* 2.0 -> 2.x.y, LinearSolve 3.75 -> 3.80, etc.). - Edit `enright_pryce.jl` bracket typo and ε removal. - Edit `EnrightPryce_wpd.jmd` to drop NC5 and use `setups_nd` for ND. - Add `verbose = SciMLLogging.None()` to every IRKGL16-containing WorkPrecisionSet in Lotka/Pleiades/RigidBody/ThreeBody. Local verification (julia 1.11.9, --project=benchmarks/NonStiffODE): - `Pkg.update()` clean; all packages precompile. - `weave_file(..., (:script,))` succeeds for all 7 .jmd files. - EnrightPryce smoke run (numruns=3): NA1/2/4/5, NB1/2/3/5, NC1/2/3/4 pass with full setups (incl. SIMD-RK); ND1-5 pass with setups_nd. - LotkaVolterra full weave (`(:github,)`) re-run with the IRKGL16 verbose patch: the previously-erroring chunk now completes. - Direct IRKGL16 + `verbose=SciMLLogging.None()` WPSet call on LotkaVolterra returns clean. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
1 parent 8a0ea52 commit 1f7eb00

7 files changed

Lines changed: 186 additions & 145 deletions

File tree

benchmarks/NonStiffODE/EnrightPryce_wpd.jmd

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,23 +157,27 @@ wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_eve
157157
plot(wp; title="NC4")
158158
```
159159

160-
### NC5
160+
## Non-Stiff ND Problems
161+
162+
The ND suite uses `sqrt` in the RHS, which triggers a `StackOverflowError` via
163+
`NaNMath.sqrt(::VectorizationBase.Vec)` when combined with the SIMD-RK stack.
164+
Use the non-SIMD subset of `setups` for these problems.
161165

162166
```julia
163-
prob = NC_PROBLEMS[5]
164-
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
165-
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
166-
plot(wp; title="NC5")
167+
setups_nd = [
168+
Dict(:alg=>Tsit5()),
169+
Dict(:alg=>Vern6()),
170+
Dict(:alg=>Vern7()),
171+
Dict(:alg=>Vern9())
172+
]
167173
```
168174

169-
## Non-Stiff ND Problems
170-
171175
### ND1
172176

173177
```julia
174178
prob = ND_PROBLEMS[1]
175179
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
176-
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
180+
wp = WorkPrecisionSet(prob, abstols, reltols, setups_nd; appxsol=test_sol, save_everystep=false, numruns=100)
177181
plot(wp; title="ND1")
178182
```
179183

@@ -182,7 +186,7 @@ plot(wp; title="ND1")
182186
```julia
183187
prob = ND_PROBLEMS[2]
184188
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
185-
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
189+
wp = WorkPrecisionSet(prob, abstols, reltols, setups_nd; appxsol=test_sol, save_everystep=false, numruns=100)
186190
plot(wp; title="ND2")
187191
```
188192

@@ -191,7 +195,7 @@ plot(wp; title="ND2")
191195
```julia
192196
prob = ND_PROBLEMS[3]
193197
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
194-
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
198+
wp = WorkPrecisionSet(prob, abstols, reltols, setups_nd; appxsol=test_sol, save_everystep=false, numruns=100)
195199
plot(wp; title="ND3")
196200
```
197201

@@ -200,7 +204,7 @@ plot(wp; title="ND3")
200204
```julia
201205
prob = ND_PROBLEMS[4]
202206
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
203-
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
207+
wp = WorkPrecisionSet(prob, abstols, reltols, setups_nd; appxsol=test_sol, save_everystep=false, numruns=100)
204208
plot(wp; title="ND4")
205209
```
206210

@@ -209,7 +213,7 @@ plot(wp; title="ND4")
209213
```julia
210214
prob = ND_PROBLEMS[5]
211215
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
212-
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
216+
wp = WorkPrecisionSet(prob, abstols, reltols, setups_nd; appxsol=test_sol, save_everystep=false, numruns=100)
213217
plot(wp; title="ND5")
214218
```
215219

benchmarks/NonStiffODE/LotkaVolterra_wpd.jmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ setups = [Dict(:alg=>DP5())
5252
Dict(:alg=>MER6v2(), :prob_choice => 2)
5353
Dict(:alg=>RK6v4(), :prob_choice => 2)]
5454
wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol,
55-
save_everystep = false, maxiters = 10000, numruns = 100)
55+
save_everystep = false, verbose = SciMLLogging.None(), maxiters = 10000, numruns = 100)
5656
plot(wp)
5757
```
5858

@@ -73,7 +73,7 @@ setups = [Dict(:alg=>DP5())
7373
Dict(:alg=>Vern6(), :prob_choice => 2)]
7474
wp = WorkPrecisionSet(
7575
probs, abstols, reltols, setups; appxsol = test_sol, maxiters = 10000,
76-
error_estimate = :L2, dense_errors = true, numruns = 100)
76+
error_estimate = :L2, dense_errors = true, verbose = SciMLLogging.None(), numruns = 100)
7777
plot(wp)
7878
```
7979

@@ -96,7 +96,7 @@ setups = [Dict(:alg=>DP8())
9696
Dict(:alg=>Vern8(), :prob_choice => 2)
9797
Dict(:alg=>Vern9(), :prob_choice => 2)]
9898
wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol,
99-
save_everystep = false, maxiters = 1000, numruns = 100)
99+
save_everystep = false, verbose = SciMLLogging.None(), maxiters = 1000, numruns = 100)
100100
plot(wp)
101101
```
102102

@@ -117,7 +117,7 @@ setups = [Dict(:alg=>odex())
117117
Dict(:alg=>lsoda())
118118
Dict(:alg=>ARKODE(Sundials.Explicit(), order = 6))]
119119
wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol,
120-
save_everystep = false, maxiters = 1000, numruns = 100)
120+
save_everystep = false, verbose = SciMLLogging.None(), maxiters = 1000, numruns = 100)
121121
plot(wp)
122122
```
123123

@@ -137,7 +137,7 @@ setups = [Dict(:alg=>DP8())
137137
Dict(:alg=>Vern8(), :prob_choice => 2)
138138
Dict(:alg=>Vern9(), :prob_choice => 2)]
139139
wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, dense = true,
140-
maxiters = 1000, error_estimate = :L2, numruns = 100)
140+
maxiters = 1000, error_estimate = :L2, verbose = SciMLLogging.None(), numruns = 100)
141141
plot(wp)
142142
```
143143

0 commit comments

Comments
 (0)