Skip to content

Commit a475b3b

Browse files
Add SIMD RK methods to NonStiffODE benchmarks
This PR adds the SIMD Runge-Kutta methods (MER5v2, MER6v2, RK6v4) from OrdinaryDiffEqSIMDRK to the existing non-stiff ODE benchmarks for performance comparison. - Updated FitzhughNagumo_wpd.jmd with SIMD methods - Updated LotkaVolterra_wpd.jmd with SIMD methods - Updated RigidBody_wpd.jmd with SIMD methods - Updated linear_wpd.jmd with SIMD methods - Added OrdinaryDiffEqSIMDRK to Project.toml dependencies These methods use SIMD instructions for improved performance on compatible hardware. Based on SciML/SIMDRungeKutta.jl#16 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent be325c9 commit a475b3b

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

benchmarks/NonStiffODE/FitzhughNagumo_wpd.jmd

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ author: Chris Rackauckas
88
The purpose of this is to see how the errors scale on a standard nonlinear problem.
99

1010
```julia
11-
using OrdinaryDiffEq, ParameterizedFunctions, ODEInterface,
11+
using OrdinaryDiffEq, OrdinaryDiffEqCore, ParameterizedFunctions, ODEInterface,
1212
ODEInterfaceDiffEq, LSODA, Sundials, DiffEqDevTools,
13-
StaticArrays
13+
StaticArrays, OrdinaryDiffEqSIMDRK
1414
using Plots;
1515
gr()
1616

@@ -46,7 +46,10 @@ setups = [Dict(:alg=>DP5())
4646
Dict(:alg=>Tsit5())
4747
Dict(:alg=>Vern6())
4848
Dict(:alg=>Tsit5(), :prob_choice => 2)
49-
Dict(:alg=>Vern6(), :prob_choice => 2)]
49+
Dict(:alg=>Vern6(), :prob_choice => 2)
50+
Dict(:alg=>MER5v2(), :prob_choice => 2)
51+
Dict(:alg=>MER6v2(), :prob_choice => 2)
52+
Dict(:alg=>RK6v4(), :prob_choice => 2)]
5053
wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol,
5154
save_everystep = false, numruns = 100, maxiters = 1000)
5255
plot(wp)

benchmarks/NonStiffODE/LotkaVolterra_wpd.jmd

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ author: Chris Rackauckas
88
The purpose of this problem is to test the performance on easy problems. Since it's periodic, the error is naturally low, and so most of the difference will come down to startup times and, when measuring the interpolations, the algorithm choices.
99

1010
```julia
11-
using OrdinaryDiffEq, ParameterizedFunctions, ODEInterfaceDiffEq, LSODA,
12-
Sundials, DiffEqDevTools, StaticArrays
11+
using OrdinaryDiffEq, OrdinaryDiffEqCore, ParameterizedFunctions, ODEInterfaceDiffEq, LSODA,
12+
Sundials, DiffEqDevTools, StaticArrays, OrdinaryDiffEqSIMDRK
1313

1414
f = @ode_def LotkaVolterra begin
1515
dx = a*x - b*x*y
@@ -43,7 +43,10 @@ setups = [Dict(:alg=>DP5())
4343
Dict(:alg=>Tsit5())
4444
Dict(:alg=>Vern6())
4545
Dict(:alg=>Tsit5(), :prob_choice => 2)
46-
Dict(:alg=>Vern6(), :prob_choice => 2)]
46+
Dict(:alg=>Vern6(), :prob_choice => 2)
47+
Dict(:alg=>MER5v2(), :prob_choice => 2)
48+
Dict(:alg=>MER6v2(), :prob_choice => 2)
49+
Dict(:alg=>RK6v4(), :prob_choice => 2)]
4750
wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol,
4851
save_everystep = false, maxiters = 10000, numruns = 100)
4952
plot(wp)

benchmarks/NonStiffODE/Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ LSODA = "7f56f5a3-f504-529b-bc02-0b1fe5e64312"
44
ODEInterface = "54ca160b-1b9f-5127-a996-1867f4bc2a2c"
55
ODEInterfaceDiffEq = "09606e27-ecf5-54fc-bb29-004bd9f985bf"
66
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
7+
OrdinaryDiffEqCore = "bbf590c4-e0c2-4248-924d-a24c5c6facc5"
8+
OrdinaryDiffEqSIMDRK = "dc97f408-0ac8-40da-bfeb-e1efba43c4c9"
79
ParameterizedFunctions = "65888b18-ceab-5e60-b2b9-181511a3b968"
810
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
911
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
@@ -17,6 +19,8 @@ LSODA = "0.7"
1719
ODEInterface = "0.5"
1820
ODEInterfaceDiffEq = "3.10"
1921
OrdinaryDiffEq = "6.19"
22+
OrdinaryDiffEqCore = "1"
23+
OrdinaryDiffEqSIMDRK = "1"
2024
ParameterizedFunctions = "5.3"
2125
Plots = "1.4"
2226
SciMLBenchmarks = "0.1"

benchmarks/NonStiffODE/RigidBody_wpd.jmd

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ author: Chris Rackauckas
44
---
55

66
```julia
7-
using OrdinaryDiffEq, ParameterizedFunctions, ODEInterfaceDiffEq, LSODA,
8-
Sundials, DiffEqDevTools, StaticArrays
7+
using OrdinaryDiffEq, OrdinaryDiffEqCore, ParameterizedFunctions, ODEInterfaceDiffEq, LSODA,
8+
Sundials, DiffEqDevTools, StaticArrays, OrdinaryDiffEqSIMDRK
99

1010
k(t) = 0.25*sin(t)^2
1111

@@ -40,7 +40,10 @@ setups = [Dict(:alg=>DP5())
4040
Dict(:alg=>Tsit5())
4141
Dict(:alg=>Vern6())
4242
Dict(:alg=>Tsit5(), :prob_choice => 2)
43-
Dict(:alg=>Vern6(), :prob_choice => 2)]
43+
Dict(:alg=>Vern6(), :prob_choice => 2)
44+
Dict(:alg=>MER5v2(), :prob_choice => 2)
45+
Dict(:alg=>MER6v2(), :prob_choice => 2)
46+
Dict(:alg=>RK6v4(), :prob_choice => 2)]
4447
wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol,
4548
save_everystep = true, numruns = 100, maxiters = 10000)
4649
plot(wp)

benchmarks/NonStiffODE/linear_wpd.jmd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ rapid development has its advantages.
2323
## Setup
2424

2525
```julia
26-
using OrdinaryDiffEq, Sundials, DiffEqDevTools, Plots, ODEInterfaceDiffEq, LSODA
26+
using OrdinaryDiffEq, OrdinaryDiffEqCore, Sundials, DiffEqDevTools, Plots, ODEInterfaceDiffEq, LSODA, OrdinaryDiffEqSIMDRK
2727
using Random
2828
Random.seed!(123)
2929
gr()
@@ -105,7 +105,10 @@ algorithms:
105105
setups = [Dict(:alg=>DP5())
106106
Dict(:alg=>BS3())
107107
Dict(:alg=>BS5())
108-
Dict(:alg=>Tsit5())]
108+
Dict(:alg=>Tsit5())
109+
Dict(:alg=>MER5v2())
110+
Dict(:alg=>MER6v2())
111+
Dict(:alg=>RK6v4())]
109112
wp = WorkPrecisionSet(prob, abstols, reltols, setups; save_everystep = false, numruns = 100)
110113
plot(wp)
111114
```

0 commit comments

Comments
 (0)