From ebd899c821a70e9e7a9cde22ec606d8ca38d3587 Mon Sep 17 00:00:00 2001 From: ErikQQY <2283984853@qq.com> Date: Mon, 22 Jul 2024 15:57:36 +0800 Subject: [PATCH 1/2] Fix benchmarks CI Signed-off-by: ErikQQY <2283984853@qq.com> --- benchmark/simple_pendulum.jl | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/benchmark/simple_pendulum.jl b/benchmark/simple_pendulum.jl index 49eb0ed7..410af602 100644 --- a/benchmark/simple_pendulum.jl +++ b/benchmark/simple_pendulum.jl @@ -57,19 +57,21 @@ function create_simple_pendulum_benchmark() if @isdefined(MultipleShooting) iip_suite["MultipleShooting(100, Tsit5; grid_coarsening = true)"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_iip, $MultipleShooting(100, Tsit5())) + $SimplePendulumBenchmark.prob_iip, + $MultipleShooting(100, Tsit5(), NewtonRaphson())) iip_suite["MultipleShooting(100, Tsit5; grid_coarsening = false)"] = @benchmarkable solve( $SimplePendulumBenchmark.prob_iip, - $MultipleShooting(100, Tsit5(); grid_coarsening = false)) + $MultipleShooting(100, Tsit5(), NewtonRaphson(); grid_coarsening = false)) iip_suite["MultipleShooting(10, Tsit5; grid_coarsening = true)"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_iip, $MultipleShooting(10, Tsit5())) + $SimplePendulumBenchmark.prob_iip, + $MultipleShooting(10, Tsit5(), NewtonRaphson())) iip_suite["MultipleShooting(10, Tsit5; grid_coarsening = false)"] = @benchmarkable solve( $SimplePendulumBenchmark.prob_iip, - $MultipleShooting(10, Tsit5(); grid_coarsening = false)) + $MultipleShooting(10, Tsit5(), NewtonRaphson(); grid_coarsening = false)) end if @isdefined(Shooting) iip_suite["Shooting(Tsit5())"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_iip, $Shooting(Tsit5())) + $SimplePendulumBenchmark.prob_iip, $Shooting(Tsit5(), NewtonRaphson())) end for alg in (MIRK2, MIRK3, MIRK4, MIRK5, MIRK6) if @isdefined(alg) @@ -80,19 +82,21 @@ function create_simple_pendulum_benchmark() if @isdefined(MultipleShooting) oop_suite["MultipleShooting(100, Tsit5; grid_coarsening = true)"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_oop, $MultipleShooting(100, Tsit5())) + $SimplePendulumBenchmark.prob_oop, + $MultipleShooting(100, Tsit5(), NewtonRaphson())) oop_suite["MultipleShooting(100, Tsit5; grid_coarsening = false)"] = @benchmarkable solve( $SimplePendulumBenchmark.prob_oop, - $MultipleShooting(100, Tsit5(); grid_coarsening = false)) + $MultipleShooting(100, Tsit5(), NewtonRaphson(); grid_coarsening = false)) oop_suite["MultipleShooting(10, Tsit5; grid_coarsening = true)"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_oop, $MultipleShooting(10, Tsit5())) + $SimplePendulumBenchmark.prob_oop, + $MultipleShooting(10, Tsit5(), NewtonRaphson())) oop_suite["MultipleShooting(10, Tsit5; grid_coarsening = false)"] = @benchmarkable solve( $SimplePendulumBenchmark.prob_oop, - $MultipleShooting(10, Tsit5(); grid_coarsening = false)) + $MultipleShooting(10, Tsit5(), NewtonRaphson(); grid_coarsening = false)) end if @isdefined(Shooting) oop_suite["Shooting(Tsit5())"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_oop, $Shooting(Tsit5())) + $SimplePendulumBenchmark.prob_oop, $Shooting(Tsit5(), NewtonRaphson())) end for alg in (MIRK2, MIRK3, MIRK4, MIRK5, MIRK6) if @isdefined(alg) From ffd7be2b8bb01fbd27a9b69b057667a5d2498d6a Mon Sep 17 00:00:00 2001 From: ErikQQY <2283984853@qq.com> Date: Mon, 22 Jul 2024 16:47:59 +0800 Subject: [PATCH 2/2] Fix typo Signed-off-by: ErikQQY <2283984853@qq.com> --- benchmark/simple_pendulum.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmark/simple_pendulum.jl b/benchmark/simple_pendulum.jl index 410af602..4fb57048 100644 --- a/benchmark/simple_pendulum.jl +++ b/benchmark/simple_pendulum.jl @@ -30,6 +30,7 @@ function simple_pendulum(u, p, t) end function bc_pendulum(u, p, t) + t0, t1 = tspan return [u((t0 + t1) / 2)[1] + π / 2, u(t1)[1] - π / 2] end