From 07d861fb733821cd68268bf849309eee865eef3d Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Wed, 29 Jul 2026 07:33:58 -0400 Subject: [PATCH 1/2] Stop test_convergence holding every step size's ensemble at once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_convergence retained the full EnsembleSolution for every step size in _solutions and only reduced them to error summaries after the loop, so a Monte-Carlo study's peak was the sum over all step sizes rather than the largest one. The weak-convergence groups run 5e5-1e6 trajectories over 5-8 step sizes, which is what put OOPWeakConvergence and IIPWeakConvergence past a 16 GB runner. Add `retain_solutions` to test_convergence. When false, each step size's ensemble is reduced by calculate_ensemble_errors as soon as it is solved and then stripped to a single representative trajectory, so only one ensemble is alive at a time. The error statistics are computed from the full ensemble either way -- only `sim.solutions[i].u` is shortened -- and the flag defaults to true, so existing callers are unaffected. Measured on the two groups, single run each, JULIA_NUM_THREADS=8: iip_weak peak 25.10 -> 7.93 GiB (3.2x), wall 7:29 -> 6:35 oop_weak peak 22.93 -> 7.30 GiB (3.1x), wall 7:33 -> 7:00 Both now fit the standard self-hosted pool, so drop the high-memory runner label from OOPWeakConvergence and IIPWeakConvergence. That label is carried by no runner in the fleet, so those groups have been sitting queued for 24 h and expiring rather than running at all (see #4030). That the statistics are untouched is checked directly rather than argued: a 20000-trajectory SROCK2 study run both ways gives bitwise identical `𝒪est` and `errors` while the retained object shrinks 489x. test/retain_solutions_tests.jl covers that, the trajectory count actually dropping, and the expected_value path being left alone. Not applied to SROCKC2WeakConvergence: measured with the flag it still peaks at 34.15 GiB, because its cost is a single 3e6-trajectory ensemble rather than retention across step sizes. Nothing here helps that, so its label stays. Note separately that the group fails its assertions when it does run -- 𝒪est[:weak_final] comes out 1.567 and 1.563 against a `< 0.4` band around 2 -- which has gone unseen because the group has never been scheduled. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_013WW2jGeoWZVZu7AiscUNSz --- lib/DiffEqDevTools/src/convergence.jl | 48 +++++++++++-- .../test/retain_solutions_tests.jl | 69 +++++++++++++++++++ lib/DiffEqDevTools/test/runtests.jl | 3 + lib/StochasticDiffEq/test/test_groups.toml | 4 +- .../test/weak_convergence/iip_weak.jl | 36 +++++----- .../test/weak_convergence/oop_weak.jl | 36 +++++----- 6 files changed, 154 insertions(+), 42 deletions(-) create mode 100644 lib/DiffEqDevTools/test/retain_solutions_tests.jl diff --git a/lib/DiffEqDevTools/src/convergence.jl b/lib/DiffEqDevTools/src/convergence.jl index cf2c36f0ee6..7f4b4e35d12 100644 --- a/lib/DiffEqDevTools/src/convergence.jl +++ b/lib/DiffEqDevTools/src/convergence.jl @@ -54,6 +54,26 @@ function ConvergenceSimulation( return (ConvergenceSimulation(solutions, errors, N, auxdata, 𝒪est, convergence_axis)) end +""" + drop_trajectories(sim::EnsembleTestSolution) -> EnsembleTestSolution + +Discard every trajectory but the first, keeping the error statistics computed from the +full ensemble. + +`calculate_ensemble_errors` has already reduced the ensemble to the error dictionaries +that a [`ConvergenceSimulation`](@ref) reads, so for a Monte-Carlo study the retained +trajectories are dead weight — an SROCK ensemble at 3e6 trajectories holds tens of GiB +of them. One trajectory is kept rather than none because the `ConvergenceSimulation` +constructor inspects `solutions[1].u[1]` for its element type. +""" +function drop_trajectories(sim::SciMLBase.EnsembleTestSolution{T, N}) where {T, N} + u = sim.u[1:min(1, length(sim.u))] + return SciMLBase.EnsembleTestSolution{T, N, typeof(u)}( + u, sim.errors, sim.weak_errors, sim.error_means, sim.error_medians, + sim.elapsedTime, sim.converged + ) +end + """ test_convergence(dts, prob, alg[, ensemblealg]; kwargs...) test_convergence(probs, convergence_axis, alg; kwargs...) @@ -66,6 +86,12 @@ is passed to the solver as `dt`. Remaining keyword arguments are forwarded to `s The computed solutions must contain error measurements, usually obtained from an analytic solution. Use [`analyticless_test_convergence`](@ref) when only a numerical reference solution is available. + +Set `retain_solutions = false` for large Monte-Carlo studies. The returned +`ConvergenceSimulation` then holds each step size's error summary but only one +representative trajectory instead of all of them, which bounds the memory by a single +step size's ensemble rather than the whole study. The error statistics are identical +either way; only `sim.solutions[i].u` is shortened. """ function test_convergence( dts::AbstractArray, @@ -77,7 +103,7 @@ function test_convergence( trajectories, save_start = true, save_everystep = true, timeseries_errors = save_everystep, adaptive = false, weak_timeseries_errors = false, weak_dense_errors = false, - expected_value = nothing, kwargs... + expected_value = nothing, retain_solutions = true, kwargs... ) N = length(dts) @@ -87,6 +113,10 @@ function test_convergence( ensemble_prob = EnsembleProblem(prob) end + # Reducing each step size's ensemble as soon as it is solved keeps only one of them + # alive at a time; deferring to the loop below would hold every step size at once. + reduce_eagerly = !retain_solutions && expected_value === nothing + _solutions = Array{Any}(undef, length(dts)) for i in 1:length(dts) sol = solve( @@ -98,20 +128,30 @@ function test_convergence( kwargs... ) @info "dt: $(dts[i]) ($i/$N)" + if reduce_eagerly + sol = drop_trajectories( + SciMLBase.calculate_ensemble_errors( + sol; + weak_timeseries_errors = weak_timeseries_errors, + weak_dense_errors = weak_dense_errors + ) + ) + end _solutions[i] = sol end auxdata = Dict("dts" => dts) if expected_value == nothing - solutions = [ - SciMLBase.calculate_ensemble_errors( + solutions = reduce_eagerly ? _solutions : + [ + SciMLBase.calculate_ensemble_errors( sim; weak_timeseries_errors = weak_timeseries_errors, weak_dense_errors = weak_dense_errors ) for sim in _solutions - ] + ] # Now Calculate Weak Errors additional_errors = Dict() for k in keys(solutions[1].weak_errors) diff --git a/lib/DiffEqDevTools/test/retain_solutions_tests.jl b/lib/DiffEqDevTools/test/retain_solutions_tests.jl new file mode 100644 index 00000000000..4354df7b4bd --- /dev/null +++ b/lib/DiffEqDevTools/test/retain_solutions_tests.jl @@ -0,0 +1,69 @@ +using DiffEqDevTools, StochasticDiffEq, Random, Test + +# `retain_solutions = false` exists so that large Monte-Carlo studies do not hold every +# trajectory of every step size at once. It must change only what is kept, never what is +# measured, so compare the statistics against the retaining path exactly. + +linear_analytic(u0, p, t, W) = @.(u0 * exp(0.63155t + 0.87W)) +f_linear(du, u, p, t) = @.(du = 1.01 * u) +σ_linear(du, u, p, t) = @.(du = 0.87 * u) +prob = SDEProblem( + SDEFunction(f_linear, σ_linear, analytic = linear_analytic), [1 / 2], (0.0, 1.0) +) +dts = 1 .// 2 .^ (7:-1:4) +trajectories = 400 + +function run(retain) + Random.seed!(100) + return test_convergence( + dts, prob, EM(), EnsembleSerial(); save_everystep = false, + trajectories = trajectories, weak_timeseries_errors = false, + retain_solutions = retain + ) +end + +kept = run(true) +dropped = run(false) + +@testset "retain_solutions preserves the statistics" begin + @test keys(kept.𝒪est) == keys(dropped.𝒪est) + for k in keys(kept.𝒪est) + @test kept.𝒪est[k] == dropped.𝒪est[k] + end + @test keys(kept.errors) == keys(dropped.errors) + for k in keys(kept.errors) + @test kept.errors[k] == dropped.errors[k] + end + for i in eachindex(dts) + @test kept.solutions[i].weak_errors == dropped.solutions[i].weak_errors + @test kept.solutions[i].error_means == dropped.solutions[i].error_means + @test kept.solutions[i].errors == dropped.solutions[i].errors + end +end + +@testset "retain_solutions drops the trajectories" begin + for i in eachindex(dts) + @test length(kept.solutions[i].u) == trajectories + @test length(dropped.solutions[i].u) == 1 + end + @test Base.summarysize(dropped) < Base.summarysize(kept) / 10 +end + +@testset "retain_solutions is ignored when expected_value is given" begin + # The expected_value path takes a reducing output_func and never builds an + # EnsembleTestSolution, so there is nothing to drop; it must still run and agree. + ev = 0.5 * exp(1.01) + ensemble_prob = EnsembleProblem(prob; output_func = (sol, ctx) -> (sol.u[end][1], false)) + Random.seed!(100) + a = test_convergence( + dts, ensemble_prob, EM(), EnsembleSerial(); save_everystep = false, + trajectories = trajectories, expected_value = ev, retain_solutions = false + ) + Random.seed!(100) + b = test_convergence( + dts, ensemble_prob, EM(), EnsembleSerial(); save_everystep = false, + trajectories = trajectories, expected_value = ev + ) + @test a.𝒪est[:weak_final] == b.𝒪est[:weak_final] + @test length(a.solutions[1].u) == trajectories +end diff --git a/lib/DiffEqDevTools/test/runtests.jl b/lib/DiffEqDevTools/test/runtests.jl index bf7fed2c821..275f9e63588 100644 --- a/lib/DiffEqDevTools/test/runtests.jl +++ b/lib/DiffEqDevTools/test/runtests.jl @@ -27,6 +27,9 @@ if TEST_GROUP == "Core" || TEST_GROUP == "ALL" @time @testset "Analyticless Convergence Tests" begin include("analyticless_convergence_tests.jl") end + @time @testset "Retain Solutions Tests" begin + include("retain_solutions_tests.jl") + end @time @testset "Analyticless Stochastic WP" begin include("analyticless_stochastic_wp.jl") end diff --git a/lib/StochasticDiffEq/test/test_groups.toml b/lib/StochasticDiffEq/test/test_groups.toml index 8c45b30dd3a..2e61d13460e 100644 --- a/lib/StochasticDiffEq/test/test_groups.toml +++ b/lib/StochasticDiffEq/test/test_groups.toml @@ -32,13 +32,13 @@ local_only = true [OOPWeakConvergence] versions = ["1"] -runner = ["self-hosted", "Linux", "X64", "high-memory"] +runner = ["self-hosted", "Linux", "X64"] timeout = 300 local_only = true [IIPWeakConvergence] versions = ["1"] -runner = ["self-hosted", "Linux", "X64", "high-memory"] +runner = ["self-hosted", "Linux", "X64"] timeout = 300 local_only = true diff --git a/lib/StochasticDiffEq/test/weak_convergence/iip_weak.jl b/lib/StochasticDiffEq/test/weak_convergence/iip_weak.jl index 0ebb1c3b602..fb93badf08e 100644 --- a/lib/StochasticDiffEq/test/weak_convergence/iip_weak.jl +++ b/lib/StochasticDiffEq/test/weak_convergence/iip_weak.jl @@ -20,7 +20,7 @@ prob = prob_sde_linear_iip println("EM") sim = test_convergence( dts, prob, EM(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -28,7 +28,7 @@ sim = test_convergence( println("SimplifiedEM") sim = test_convergence( dts, prob, SimplifiedEM(), save_everystep = false, trajectories = Int(5.0e5), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -36,7 +36,7 @@ sim = test_convergence( println("RKMil") sim = test_convergence( dts, prob, RKMil(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -44,7 +44,7 @@ sim = test_convergence( println("RKMilCommute") sim = test_convergence( dts, prob, RKMilCommute(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -52,7 +52,7 @@ sim = test_convergence( println("RKMilGeneral") sim = test_convergence( dts, prob, RKMilGeneral(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -60,7 +60,7 @@ sim = test_convergence( println("SROCK1") sim = test_convergence( dts, prob, SROCK1(), save_everystep = false, trajectories = Int(4.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -69,7 +69,7 @@ println("SROCK2") dts = 1 .// 2 .^ (8:-1:1) #14->7 good plot sim = test_convergence( dts, prob, SROCK2(), save_everystep = false, trajectories = Int(5.0e5), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @show sim.𝒪est[:weak_final] @test abs(sim.𝒪est[:weak_final] - 2) < 0.5 @@ -80,7 +80,7 @@ println("SROCKEM") sim = test_convergence( dts, prob, SROCKEM(strong_order_1 = false), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -88,7 +88,7 @@ sim = test_convergence( println("SROCKEM") sim = test_convergence( dts, prob, SROCKEM(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -96,7 +96,7 @@ sim = test_convergence( println("SKSROCK") sim = test_convergence( dts, prob, SKSROCK(), save_everystep = false, trajectories = Int(5.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -132,7 +132,7 @@ sim = test_convergence( println("WangLi3SMil_A") sim = test_convergence( dts, prob, WangLi3SMil_A(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -140,7 +140,7 @@ sim = test_convergence( println("WangLi3SMil_B") sim = test_convergence( dts, prob, WangLi3SMil_B(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -148,7 +148,7 @@ sim = test_convergence( println("WangLi3SMil_C") sim = test_convergence( dts, prob, WangLi3SMil_C(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -156,7 +156,7 @@ sim = test_convergence( println("WangLi3SMil_D") sim = test_convergence( dts, prob, WangLi3SMil_D(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -164,7 +164,7 @@ sim = test_convergence( println("WangLi3SMil_E") sim = test_convergence( dts, prob, WangLi3SMil_E(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -172,7 +172,7 @@ sim = test_convergence( println("WangLi3SMil_F") sim = test_convergence( dts, prob, WangLi3SMil_F(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -181,7 +181,7 @@ println("SRI") dts = 1 .// 2 .^ (8:-1:2) sim = test_convergence( dts, prob, SRI(), save_everystep = false, trajectories = Int(2.0e4), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 2) < 0.5 #@test abs(sim.𝒪est[:weak_l2]-2) < 0.3 @@ -189,7 +189,7 @@ sim = test_convergence( println("SRIW1") sim = test_convergence( dts, prob, SRIW1(), save_everystep = false, trajectories = Int(1.0e5), - weak_timeseries_errors = false + weak_timeseries_errors = false, retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 2) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-2) < 0.3 diff --git a/lib/StochasticDiffEq/test/weak_convergence/oop_weak.jl b/lib/StochasticDiffEq/test/weak_convergence/oop_weak.jl index 70baa7f9f9b..932210985f3 100644 --- a/lib/StochasticDiffEq/test/weak_convergence/oop_weak.jl +++ b/lib/StochasticDiffEq/test/weak_convergence/oop_weak.jl @@ -7,45 +7,45 @@ dts = 1 .// 2 .^ (7:-1:3) #14->7 good plot prob = prob_sde_linear println("EM") @time sim = test_convergence( - dts, prob, EM(), save_everystep = false, trajectories = Int(1.0e4) + dts, prob, EM(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SimplifiedEM") @time sim = test_convergence( - dts, prob, SimplifiedEM(), save_everystep = false, trajectories = Int(1.0e6) + dts, prob, SimplifiedEM(), save_everystep = false, trajectories = Int(1.0e6), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.35 println("RKMil") -sim = test_convergence(dts, prob, RKMil(), save_everystep = false, trajectories = Int(1.0e4)) +sim = test_convergence(dts, prob, RKMil(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("RKMilCommute") sim = test_convergence( - dts, prob, RKMilCommute(), save_everystep = false, trajectories = Int(1.0e4) + dts, prob, RKMilCommute(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("RKMilGeneral") sim = test_convergence( - dts, prob, RKMilGeneral(), save_everystep = false, trajectories = Int(1.0e4) + dts, prob, RKMilGeneral(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SROCK1") -sim = test_convergence(dts, prob, SROCK1(), save_everystep = false, trajectories = Int(1.0e4)) +sim = test_convergence(dts, prob, SROCK1(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SROCK2") dts = 1 .// 2 .^ (8:-1:1) #14->7 good plot -sim = test_convergence(dts, prob, SROCK2(), save_everystep = false, trajectories = Int(7.0e5)) +sim = test_convergence(dts, prob, SROCK2(), save_everystep = false, trajectories = Int(7.0e5), retain_solutions = false) @test abs(sim.𝒪est[:weak_final] - 2) < 0.5 #@test abs(sim.𝒪est[:weak_l2]-2) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-2) < 0.3 @@ -53,21 +53,21 @@ dts = 1 .// 2 .^ (7:-1:2) #14->7 good plot println("SROCKEM") sim = test_convergence( dts, prob, SROCKEM(strong_order_1 = false), - save_everystep = false, trajectories = Int(1.0e4) + save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SROCKEM") sim = test_convergence( - dts, prob, SROCKEM(), save_everystep = false, trajectories = Int(1.0e4) + dts, prob, SROCKEM(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SKSROCK") sim = test_convergence( - dts, prob, SKSROCK(), save_everystep = false, trajectories = Int(1.0e4) + dts, prob, SKSROCK(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -103,53 +103,53 @@ sim = test_convergence( println("WangLi3SMil_A") dts = 1 .// 2 .^ (7:-1:3) sim = test_convergence( - dts, prob, WangLi3SMil_A(), save_everystep = false, trajectories = Int(1.0e4) + dts, prob, WangLi3SMil_A(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("WangLi3SMil_B") sim = test_convergence( - dts, prob, WangLi3SMil_B(), save_everystep = false, trajectories = Int(1.0e4) + dts, prob, WangLi3SMil_B(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("WangLi3SMil_C") sim = test_convergence( - dts, prob, WangLi3SMil_C(), save_everystep = false, trajectories = Int(1.0e4) + dts, prob, WangLi3SMil_C(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("WangLi3SMil_D") sim = test_convergence( - dts, prob, WangLi3SMil_D(), save_everystep = false, trajectories = Int(1.0e4) + dts, prob, WangLi3SMil_D(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("WangLi3SMil_E") sim = test_convergence( - dts, prob, WangLi3SMil_E(), save_everystep = false, trajectories = Int(1.0e4) + dts, prob, WangLi3SMil_E(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("WangLi3SMil_F") sim = test_convergence( - dts, prob, WangLi3SMil_F(), save_everystep = false, trajectories = Int(1.0e4) + dts, prob, WangLi3SMil_F(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SRI") -sim = test_convergence(dts, prob, SRI(), save_everystep = false, trajectories = Int(2.0e5)) +sim = test_convergence(dts, prob, SRI(), save_everystep = false, trajectories = Int(2.0e5), retain_solutions = false) @test abs(sim.𝒪est[:weak_final] - 2) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-2) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-2) < 0.3 println("SRIW1") -sim = test_convergence(dts, prob, SRIW1(), save_everystep = false, trajectories = Int(1.0e5)) +sim = test_convergence(dts, prob, SRIW1(), save_everystep = false, trajectories = Int(1.0e5), retain_solutions = false) @test abs(sim.𝒪est[:weak_final] - 2) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-2) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-2) < 0.3 From ea026046ba55ac46303dca9c777cd5d9f70f1265 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Wed, 29 Jul 2026 07:50:45 -0400 Subject: [PATCH 2/2] Summarise the Monte-Carlo test_convergence ensembles by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BREAKING: DiffEqDevTools 3.1.5 -> 4.0.0. test_convergence kept the full EnsembleSolution for every step size in _solutions and only reduced them to error summaries after the loop, so a Monte-Carlo study's peak was the sum over all step sizes rather than the largest one. At 5e5-1e6 trajectories over 5-8 step sizes that is tens of GiB of solutions retained only to compute a mean, and it is what put OOPWeakConvergence and IIPWeakConvergence past a 16 GB runner. Reduce each step size's ensemble as soon as it is solved and strip it to one representative trajectory, so only one ensemble is alive at a time. This is now the default; `retain_solutions = true` restores the old behaviour for callers that want the paths themselves. Measured on the two groups, JULIA_NUM_THREADS=8: iip_weak peak 25.10 -> 7.93 GiB (3.2x), wall 7:29 -> 6:35 oop_weak peak 22.93 -> 7.30 GiB (3.1x), wall 7:33 -> 7:00 Both now fit the standard self-hosted pool, so drop the high-memory runner label from those two groups. No runner in the fleet carries that label, so they have been queueing for 24 h and expiring rather than running (#4030). Why this is breaking: `ConvergenceSimulation.solutions` is documented, and the docs said it "Holds all the PdeSolutions" — which is exactly the promise being changed. `Base.getindex(sim, i, I...)` forwards into it, so `sim[i][j]` for j > 1 now errors on the Monte-Carlo method. The field documentation is updated to match. Only the Monte-Carlo method changes; the ODE/DAE methods of test_convergence do not take the keyword and are untouched. The one place in this repo that indexes ensemble trajectories, PL1WM.jl:234 and :274, goes through the expected_value path, which builds no EnsembleTestSolution and so never reduces. That the statistics are unchanged is checked rather than argued: a 20000-trajectory SROCK2 study run both ways gives bitwise identical `𝒪est` and `errors` while the retained object shrinks 489x. test/retain_solutions_tests.jl covers that, pins the new default, checks the trajectory count actually drops, and checks the expected_value path is left alone — 39 assertions. Not applied to SROCKC2WeakConvergence: measured, it still peaks at 34.15 GiB, because its cost is a single 3e6-trajectory ensemble rather than retention across step sizes. Its label stays. Separately, that group fails its assertions when it runs — 𝒪est[:weak_final] of 1.567 and 1.563 against a < 0.4 band around 2 — which has gone unseen because it has never been scheduled. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_013WW2jGeoWZVZu7AiscUNSz --- docs/Project.toml | 2 +- docs/src/devtools/alg_dev/convergence.md | 5 ++- lib/DelayDiffEq/Project.toml | 2 +- lib/DiffEqDevTools/Project.toml | 2 +- lib/DiffEqDevTools/src/convergence.jl | 19 ++++++---- lib/DiffEqDevTools/test/qa/Project.toml | 2 +- .../test/retain_solutions_tests.jl | 24 +++++++++++-- .../Project.toml | 2 +- .../test/threaded/Project.toml | 2 +- lib/OrdinaryDiffEqBDF/Project.toml | 2 +- lib/OrdinaryDiffEqCore/Project.toml | 2 +- lib/OrdinaryDiffEqDefault/Project.toml | 2 +- .../Project.toml | 2 +- lib/OrdinaryDiffEqExplicitRK/Project.toml | 2 +- .../Project.toml | 2 +- lib/OrdinaryDiffEqExponentialRK/Project.toml | 2 +- lib/OrdinaryDiffEqExtrapolation/Project.toml | 2 +- lib/OrdinaryDiffEqFIRK/Project.toml | 2 +- lib/OrdinaryDiffEqFeagin/Project.toml | 2 +- lib/OrdinaryDiffEqFunctionMap/Project.toml | 2 +- lib/OrdinaryDiffEqHighOrderRK/Project.toml | 2 +- lib/OrdinaryDiffEqIMEXMultistep/Project.toml | 2 +- .../Project.toml | 2 +- lib/OrdinaryDiffEqLinear/Project.toml | 2 +- lib/OrdinaryDiffEqLowOrderRK/Project.toml | 2 +- lib/OrdinaryDiffEqLowStorageRK/Project.toml | 2 +- lib/OrdinaryDiffEqMultirate/Project.toml | 2 +- lib/OrdinaryDiffEqNewmark/Project.toml | 2 +- lib/OrdinaryDiffEqNonlinearSolve/Project.toml | 2 +- .../test/modelingtoolkit/Project.toml | 2 +- lib/OrdinaryDiffEqNordsieck/Project.toml | 2 +- lib/OrdinaryDiffEqPDIRK/Project.toml | 2 +- lib/OrdinaryDiffEqPRK/Project.toml | 2 +- lib/OrdinaryDiffEqQPRK/Project.toml | 2 +- lib/OrdinaryDiffEqRKN/Project.toml | 2 +- lib/OrdinaryDiffEqRosenbrock/Project.toml | 2 +- .../Project.toml | 2 +- lib/OrdinaryDiffEqSDIRK/Project.toml | 2 +- lib/OrdinaryDiffEqSIMDRK/Project.toml | 2 +- lib/OrdinaryDiffEqSSPRK/Project.toml | 2 +- lib/OrdinaryDiffEqStabilizedIRK/Project.toml | 2 +- lib/OrdinaryDiffEqStabilizedRK/Project.toml | 2 +- lib/OrdinaryDiffEqSymplecticRK/Project.toml | 2 +- lib/OrdinaryDiffEqTaylorSeries/Project.toml | 2 +- lib/OrdinaryDiffEqTsit5/Project.toml | 2 +- lib/OrdinaryDiffEqVerner/Project.toml | 2 +- .../test/weak_convergence/iip_weak.jl | 36 +++++++++---------- .../test/weak_convergence/oop_weak.jl | 36 +++++++++---------- lib/StochasticDiffEqROCK/Project.toml | 2 +- lib/StochasticDiffEqWeak/Project.toml | 2 +- test/modelingtoolkit/Project.toml | 2 +- 51 files changed, 120 insertions(+), 92 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index cc48b94f3c9..d2277b0aa91 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -80,7 +80,7 @@ StochasticDiffEqLevyArea = {path = "../lib/StochasticDiffEqLevyArea"} [compat] DiffEqBase = "7.6.1" -DiffEqDevTools = "3, 4.0" +DiffEqDevTools = "4" Documenter = "0.27, 1" GlobalDiffEq = "1.2.1" ImplicitDiscreteSolve = "2" diff --git a/docs/src/devtools/alg_dev/convergence.md b/docs/src/devtools/alg_dev/convergence.md index 4c88cdaef64..7d8e9a334ec 100644 --- a/docs/src/devtools/alg_dev/convergence.md +++ b/docs/src/devtools/alg_dev/convergence.md @@ -20,7 +20,10 @@ A type which holds the data from a convergence simulation. ### Fields - - `solutions::Array{<:DESolution}`: Holds all the PdeSolutions. + - `solutions::Array{<:DESolution}`: Holds the solutions. For the Monte-Carlo method of + `test_convergence` this holds one representative trajectory per convergence-axis + point rather than every trajectory, since the error statistics have already been + computed from the full ensemble; pass `retain_solutions = true` to keep them all. - `errors`: Dictionary of the error calculations. Can contain: diff --git a/lib/DelayDiffEq/Project.toml b/lib/DelayDiffEq/Project.toml index 76fbcd00553..eb12aafb1a2 100644 --- a/lib/DelayDiffEq/Project.toml +++ b/lib/DelayDiffEq/Project.toml @@ -64,7 +64,7 @@ DDEProblemLibrary = "0.1" BinaryHeaps = "1" DiffEqBase = "7" DiffEqCallbacks = "4.17.0" -DiffEqDevTools = "3" +DiffEqDevTools = "4" DiffEqNoiseProcess = "5.30.0" FastBroadcast = "1.3" FiniteDiff = "2.27" diff --git a/lib/DiffEqDevTools/Project.toml b/lib/DiffEqDevTools/Project.toml index 7b28e0e397b..3365771efb1 100644 --- a/lib/DiffEqDevTools/Project.toml +++ b/lib/DiffEqDevTools/Project.toml @@ -1,7 +1,7 @@ name = "DiffEqDevTools" uuid = "f3b72e0c-5b89-59e1-b016-84e28bfd966d" authors = ["Chris Rackauckas "] -version = "3.1.5" +version = "4.0.0" [deps] CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" diff --git a/lib/DiffEqDevTools/src/convergence.jl b/lib/DiffEqDevTools/src/convergence.jl index 7f4b4e35d12..91ffe9e60a5 100644 --- a/lib/DiffEqDevTools/src/convergence.jl +++ b/lib/DiffEqDevTools/src/convergence.jl @@ -87,11 +87,18 @@ The computed solutions must contain error measurements, usually obtained from an analytic solution. Use [`analyticless_test_convergence`](@ref) when only a numerical reference solution is available. -Set `retain_solutions = false` for large Monte-Carlo studies. The returned -`ConvergenceSimulation` then holds each step size's error summary but only one -representative trajectory instead of all of them, which bounds the memory by a single -step size's ensemble rather than the whole study. The error statistics are identical -either way; only `sim.solutions[i].u` is shortened. +`retain_solutions` controls whether the trajectories survive in the returned +`ConvergenceSimulation`. It defaults to `false`: each step size's ensemble is reduced to +its error summary as soon as it is solved and then stripped to one representative +trajectory, so the memory is bounded by a single step size's ensemble rather than by the +whole study. A Monte-Carlo study at 5e5 trajectories over 8 step sizes is otherwise +tens of GiB of solutions kept only to compute a mean. + +The error statistics are computed from the full ensemble either way, so `errors`, +`weak_errors`, `error_means` and `𝒪est` are unaffected — the difference is only that +`sim.solutions[i].u` holds one trajectory rather than `trajectories` of them. Pass +`retain_solutions = true` when the trajectories themselves are the point, for instance +to compare two algorithms path by path. """ function test_convergence( dts::AbstractArray, @@ -103,7 +110,7 @@ function test_convergence( trajectories, save_start = true, save_everystep = true, timeseries_errors = save_everystep, adaptive = false, weak_timeseries_errors = false, weak_dense_errors = false, - expected_value = nothing, retain_solutions = true, kwargs... + expected_value = nothing, retain_solutions = false, kwargs... ) N = length(dts) diff --git a/lib/DiffEqDevTools/test/qa/Project.toml b/lib/DiffEqDevTools/test/qa/Project.toml index b85b4cfa2a8..9d031fa36d1 100644 --- a/lib/DiffEqDevTools/test/qa/Project.toml +++ b/lib/DiffEqDevTools/test/qa/Project.toml @@ -6,6 +6,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] Aqua = "0.8.11" -DiffEqDevTools = "3" +DiffEqDevTools = "4" SciMLTesting = "2.1" julia = "1.10" diff --git a/lib/DiffEqDevTools/test/retain_solutions_tests.jl b/lib/DiffEqDevTools/test/retain_solutions_tests.jl index 4354df7b4bd..fd8d6d607a0 100644 --- a/lib/DiffEqDevTools/test/retain_solutions_tests.jl +++ b/lib/DiffEqDevTools/test/retain_solutions_tests.jl @@ -1,8 +1,9 @@ using DiffEqDevTools, StochasticDiffEq, Random, Test -# `retain_solutions = false` exists so that large Monte-Carlo studies do not hold every -# trajectory of every step size at once. It must change only what is kept, never what is -# measured, so compare the statistics against the retaining path exactly. +# The Monte-Carlo `test_convergence` summarises by default so that large studies do not +# hold every trajectory of every step size at once. That must change only what is kept, +# never what is measured, so compare the statistics against `retain_solutions = true` +# exactly. It also pins the default, which is the breaking half of the change. linear_analytic(u0, p, t, W) = @.(u0 * exp(0.63155t + 0.87W)) f_linear(du, u, p, t) = @.(du = 1.01 * u) @@ -24,6 +25,13 @@ end kept = run(true) dropped = run(false) +defaulted = let + Random.seed!(100) + test_convergence( + dts, prob, EM(), EnsembleSerial(); save_everystep = false, + trajectories = trajectories, weak_timeseries_errors = false + ) +end @testset "retain_solutions preserves the statistics" begin @test keys(kept.𝒪est) == keys(dropped.𝒪est) @@ -41,6 +49,16 @@ dropped = run(false) end end +@testset "summarising is the default" begin + for i in eachindex(dts) + @test length(defaulted.solutions[i].u) == 1 + @test defaulted.solutions[i].errors == kept.solutions[i].errors + end + for k in keys(kept.𝒪est) + @test defaulted.𝒪est[k] == kept.𝒪est[k] + end +end + @testset "retain_solutions drops the trajectories" begin for i in eachindex(dts) @test length(kept.solutions[i].u) == trajectories diff --git a/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml b/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml index c25b36eabbb..d52c9896484 100644 --- a/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml +++ b/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml @@ -34,7 +34,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" SciMLBase = "3.39" OrdinaryDiffEqCore = "4" diff --git a/lib/OrdinaryDiffEqAdamsBashforthMoulton/test/threaded/Project.toml b/lib/OrdinaryDiffEqAdamsBashforthMoulton/test/threaded/Project.toml index 69f13b77495..8df128c90e6 100644 --- a/lib/OrdinaryDiffEqAdamsBashforthMoulton/test/threaded/Project.toml +++ b/lib/OrdinaryDiffEqAdamsBashforthMoulton/test/threaded/Project.toml @@ -11,7 +11,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" OrdinaryDiffEqCore = {path = "../../../OrdinaryDiffEqCore"} [compat] -DiffEqDevTools = "3" +DiffEqDevTools = "4" FastBroadcast = "1.3" ODEProblemLibrary = "1" OrdinaryDiffEqAdamsBashforthMoulton = "2" diff --git a/lib/OrdinaryDiffEqBDF/Project.toml b/lib/OrdinaryDiffEqBDF/Project.toml index 9a7624e55c0..3d5b697ca3b 100644 --- a/lib/OrdinaryDiffEqBDF/Project.toml +++ b/lib/OrdinaryDiffEqBDF/Project.toml @@ -53,7 +53,7 @@ ForwardDiff = "1.3.3" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" DifferentiationInterface = "0.7.18" MuladdMacro = "0.2.4" LinearSolve = "5.1" diff --git a/lib/OrdinaryDiffEqCore/Project.toml b/lib/OrdinaryDiffEqCore/Project.toml index dcb66850952..24699a41cdc 100644 --- a/lib/OrdinaryDiffEqCore/Project.toml +++ b/lib/OrdinaryDiffEqCore/Project.toml @@ -58,7 +58,7 @@ ArrayInterface = "7.28" BinaryHeaps = "1" CommonSolve = "0.2.6" DiffEqBase = "7.8" -DiffEqDevTools = "3" +DiffEqDevTools = "4" DifferentiationInterface = "0.7.18" DocStringExtensions = "0.9.5" EnumX = "1.0.4" diff --git a/lib/OrdinaryDiffEqDefault/Project.toml b/lib/OrdinaryDiffEqDefault/Project.toml index 673f20da40c..3826563ad4a 100644 --- a/lib/OrdinaryDiffEqDefault/Project.toml +++ b/lib/OrdinaryDiffEqDefault/Project.toml @@ -47,7 +47,7 @@ Pkg = "1" OrdinaryDiffEqTsit5 = "2" Test = "<0.0.1, 1" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" OrdinaryDiffEqBDF = "2" OrdinaryDiffEqVerner = "2" LinearSolve = "5.1" diff --git a/lib/OrdinaryDiffEqDifferentiation/Project.toml b/lib/OrdinaryDiffEqDifferentiation/Project.toml index a75211cea4e..766a4a4fcb3 100644 --- a/lib/OrdinaryDiffEqDifferentiation/Project.toml +++ b/lib/OrdinaryDiffEqDifferentiation/Project.toml @@ -17,7 +17,7 @@ ForwardDiff = "1.3.3" FunctionWrappersWrappers = "1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" Test = "<0.0.1, 1" FiniteDiff = "2.27" DifferentiationInterface = "0.7.18" diff --git a/lib/OrdinaryDiffEqExplicitRK/Project.toml b/lib/OrdinaryDiffEqExplicitRK/Project.toml index 0907240cbf4..a9ee3590625 100644 --- a/lib/OrdinaryDiffEqExplicitRK/Project.toml +++ b/lib/OrdinaryDiffEqExplicitRK/Project.toml @@ -32,7 +32,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" LinearAlgebra = "1.10" TruncatedStacktraces = "1.4" diff --git a/lib/OrdinaryDiffEqExplicitTableaus/Project.toml b/lib/OrdinaryDiffEqExplicitTableaus/Project.toml index 64fb10cb15e..6cd5ba4612b 100644 --- a/lib/OrdinaryDiffEqExplicitTableaus/Project.toml +++ b/lib/OrdinaryDiffEqExplicitTableaus/Project.toml @@ -27,7 +27,7 @@ OrdinaryDiffEqLowOrderRK = {path = "../OrdinaryDiffEqLowOrderRK"} [compat] SciMLTesting = "2.1" DiffEqBase = "7" -DiffEqDevTools = "3" +DiffEqDevTools = "4" ODEProblemLibrary = "1" OrdinaryDiffEq = "7" OrdinaryDiffEqExplicitRK = "2" diff --git a/lib/OrdinaryDiffEqExponentialRK/Project.toml b/lib/OrdinaryDiffEqExponentialRK/Project.toml index 3c366379d2f..599e355e083 100644 --- a/lib/OrdinaryDiffEqExponentialRK/Project.toml +++ b/lib/OrdinaryDiffEqExponentialRK/Project.toml @@ -45,7 +45,7 @@ OrdinaryDiffEqTsit5 = "2" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" OrdinaryDiffEqVerner = "2" LinearSolve = "5.1" diff --git a/lib/OrdinaryDiffEqExtrapolation/Project.toml b/lib/OrdinaryDiffEqExtrapolation/Project.toml index 4da69f21882..610d4533eab 100644 --- a/lib/OrdinaryDiffEqExtrapolation/Project.toml +++ b/lib/OrdinaryDiffEqExtrapolation/Project.toml @@ -38,7 +38,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" LinearSolve = "5.1" OrdinaryDiffEqDifferentiation = "3" diff --git a/lib/OrdinaryDiffEqFIRK/Project.toml b/lib/OrdinaryDiffEqFIRK/Project.toml index cd97ae70051..70072297b12 100644 --- a/lib/OrdinaryDiffEqFIRK/Project.toml +++ b/lib/OrdinaryDiffEqFIRK/Project.toml @@ -41,7 +41,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" FastGaussQuadrature = "1.2" MuladdMacro = "0.2.4" LinearSolve = "5.1" diff --git a/lib/OrdinaryDiffEqFeagin/Project.toml b/lib/OrdinaryDiffEqFeagin/Project.toml index 5731139ac5d..0ae9ddf73ab 100644 --- a/lib/OrdinaryDiffEqFeagin/Project.toml +++ b/lib/OrdinaryDiffEqFeagin/Project.toml @@ -31,7 +31,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" SciMLBase = "3.39" OrdinaryDiffEqCore = "4" diff --git a/lib/OrdinaryDiffEqFunctionMap/Project.toml b/lib/OrdinaryDiffEqFunctionMap/Project.toml index 1d51399c236..e0022ea00ba 100644 --- a/lib/OrdinaryDiffEqFunctionMap/Project.toml +++ b/lib/OrdinaryDiffEqFunctionMap/Project.toml @@ -34,7 +34,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" SciMLBase = "3.39" ODEProblemLibrary = "1" diff --git a/lib/OrdinaryDiffEqHighOrderRK/Project.toml b/lib/OrdinaryDiffEqHighOrderRK/Project.toml index 509f740b9c3..fbe4e9ce5f5 100644 --- a/lib/OrdinaryDiffEqHighOrderRK/Project.toml +++ b/lib/OrdinaryDiffEqHighOrderRK/Project.toml @@ -31,7 +31,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" SciMLBase = "3.39" OrdinaryDiffEqCore = "4.10" diff --git a/lib/OrdinaryDiffEqIMEXMultistep/Project.toml b/lib/OrdinaryDiffEqIMEXMultistep/Project.toml index b70dd8fdf8b..a2eee95eb32 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/Project.toml +++ b/lib/OrdinaryDiffEqIMEXMultistep/Project.toml @@ -31,7 +31,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" OrdinaryDiffEqDifferentiation = "3" SciMLBase = "3.39" OrdinaryDiffEqCore = "4" diff --git a/lib/OrdinaryDiffEqImplicitTableaus/Project.toml b/lib/OrdinaryDiffEqImplicitTableaus/Project.toml index c72338c14ca..9a3ae4f1df1 100644 --- a/lib/OrdinaryDiffEqImplicitTableaus/Project.toml +++ b/lib/OrdinaryDiffEqImplicitTableaus/Project.toml @@ -21,7 +21,7 @@ path = "../DiffEqDevTools" [compat] SciMLTesting = "2.1" DiffEqBase = "7" -DiffEqDevTools = "3" +DiffEqDevTools = "4" Pkg = "1" Test = "<0.0.1, 1" julia = "1.10" diff --git a/lib/OrdinaryDiffEqLinear/Project.toml b/lib/OrdinaryDiffEqLinear/Project.toml index fd6ebd3bd0a..635855b0ad6 100644 --- a/lib/OrdinaryDiffEqLinear/Project.toml +++ b/lib/OrdinaryDiffEqLinear/Project.toml @@ -35,7 +35,7 @@ Pkg = "1" OrdinaryDiffEqTsit5 = "2" Test = "<0.0.1, 1" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" OrdinaryDiffEqVerner = "2" ExponentialUtilities = "1.33" LinearAlgebra = "1.10" diff --git a/lib/OrdinaryDiffEqLowOrderRK/Project.toml b/lib/OrdinaryDiffEqLowOrderRK/Project.toml index 019b2e5b431..f716442ab0e 100644 --- a/lib/OrdinaryDiffEqLowOrderRK/Project.toml +++ b/lib/OrdinaryDiffEqLowOrderRK/Project.toml @@ -32,7 +32,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" LinearAlgebra = "1.10" SciMLBase = "3.39" diff --git a/lib/OrdinaryDiffEqLowStorageRK/Project.toml b/lib/OrdinaryDiffEqLowStorageRK/Project.toml index 2d9b44fed2c..017f0da1ff7 100644 --- a/lib/OrdinaryDiffEqLowStorageRK/Project.toml +++ b/lib/OrdinaryDiffEqLowStorageRK/Project.toml @@ -39,7 +39,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" StructArrays = "0.6, 0.7" MuladdMacro = "0.2.4" PrecompileTools = "1.2.1, 1.3" diff --git a/lib/OrdinaryDiffEqMultirate/Project.toml b/lib/OrdinaryDiffEqMultirate/Project.toml index 1d17598c3a4..43410077705 100644 --- a/lib/OrdinaryDiffEqMultirate/Project.toml +++ b/lib/OrdinaryDiffEqMultirate/Project.toml @@ -22,7 +22,7 @@ SciMLTesting = "2.1" ADTypes = "1.22.0" Aqua = "0.8.11" DiffEqBase = "7" -DiffEqDevTools = "3" +DiffEqDevTools = "4" FastBroadcast = "1.3" JET = "0.9, 0.11" MuladdMacro = "0.2.4" diff --git a/lib/OrdinaryDiffEqNewmark/Project.toml b/lib/OrdinaryDiffEqNewmark/Project.toml index 7bcb9b6f134..8db1f075000 100644 --- a/lib/OrdinaryDiffEqNewmark/Project.toml +++ b/lib/OrdinaryDiffEqNewmark/Project.toml @@ -29,7 +29,7 @@ SciMLTesting = "2.1" ADTypes = "1.22.0" ConcreteStructs = "0.2.3" DiffEqBase = "7" -DiffEqDevTools = "3" +DiffEqDevTools = "4" FastBroadcast = "1.3" JET = "0.9, 0.11" LinearAlgebra = "<0.0.1, 1" diff --git a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml index 9d7a7d0aaab..9ff15954198 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml +++ b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml @@ -56,7 +56,7 @@ ForwardDiff = "1.3.3" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" LinearSolve = "5.2" LineSearches = "7.5.1" diff --git a/lib/OrdinaryDiffEqNonlinearSolve/test/modelingtoolkit/Project.toml b/lib/OrdinaryDiffEqNonlinearSolve/test/modelingtoolkit/Project.toml index 3bbb38c91ae..dacf8bfdaa2 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/test/modelingtoolkit/Project.toml +++ b/lib/OrdinaryDiffEqNonlinearSolve/test/modelingtoolkit/Project.toml @@ -21,7 +21,7 @@ OrdinaryDiffEqRosenbrock = {path = "../../../OrdinaryDiffEqRosenbrock"} OrdinaryDiffEqSDIRK = {path = "../../../OrdinaryDiffEqSDIRK"} [compat] -DiffEqDevTools = "3" +DiffEqDevTools = "4" ImplicitDiscreteSolve = "2" IncompleteLU = "0.2" LinearSolve = "5.1" diff --git a/lib/OrdinaryDiffEqNordsieck/Project.toml b/lib/OrdinaryDiffEqNordsieck/Project.toml index 2cfb3d2e014..7398885b19d 100644 --- a/lib/OrdinaryDiffEqNordsieck/Project.toml +++ b/lib/OrdinaryDiffEqNordsieck/Project.toml @@ -34,7 +34,7 @@ OrdinaryDiffEqTsit5 = "2" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" LinearAlgebra = "1.10" SciMLBase = "3.39" diff --git a/lib/OrdinaryDiffEqPDIRK/Project.toml b/lib/OrdinaryDiffEqPDIRK/Project.toml index 9d0902a5faa..95c48bc05c8 100644 --- a/lib/OrdinaryDiffEqPDIRK/Project.toml +++ b/lib/OrdinaryDiffEqPDIRK/Project.toml @@ -31,7 +31,7 @@ DiffEqDevTools = {path = "../DiffEqDevTools"} SciMLTesting = "2.1" ADTypes = "1.22.0" DiffEqBase = "7" -DiffEqDevTools = "3" +DiffEqDevTools = "4" FastBroadcast = "1.3" MuladdMacro = "0.2.4" ODEProblemLibrary = "1" diff --git a/lib/OrdinaryDiffEqPRK/Project.toml b/lib/OrdinaryDiffEqPRK/Project.toml index 4d48fe86bba..c654897255d 100644 --- a/lib/OrdinaryDiffEqPRK/Project.toml +++ b/lib/OrdinaryDiffEqPRK/Project.toml @@ -29,7 +29,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" SciMLBase = "3.39" OrdinaryDiffEqCore = "4" diff --git a/lib/OrdinaryDiffEqQPRK/Project.toml b/lib/OrdinaryDiffEqQPRK/Project.toml index 4f02a198efb..86a69c67284 100644 --- a/lib/OrdinaryDiffEqQPRK/Project.toml +++ b/lib/OrdinaryDiffEqQPRK/Project.toml @@ -31,7 +31,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" SciMLBase = "3.39" OrdinaryDiffEqCore = "4.10" diff --git a/lib/OrdinaryDiffEqRKN/Project.toml b/lib/OrdinaryDiffEqRKN/Project.toml index fc49225ce57..43d537c00fa 100644 --- a/lib/OrdinaryDiffEqRKN/Project.toml +++ b/lib/OrdinaryDiffEqRKN/Project.toml @@ -32,7 +32,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" SciMLBase = "3.39" OrdinaryDiffEqCore = "4" diff --git a/lib/OrdinaryDiffEqRosenbrock/Project.toml b/lib/OrdinaryDiffEqRosenbrock/Project.toml index f24d061a50e..95a72837cdc 100644 --- a/lib/OrdinaryDiffEqRosenbrock/Project.toml +++ b/lib/OrdinaryDiffEqRosenbrock/Project.toml @@ -37,7 +37,7 @@ SciMLTesting = "2.1" ADTypes = "1.22.0" ArrayInterface = "7.28" DiffEqBase = "7" -DiffEqDevTools = "3" +DiffEqDevTools = "4" DifferentiationInterface = "0.7.18" Enzyme = "0.13.180" FastBroadcast = "1.3" diff --git a/lib/OrdinaryDiffEqRosenbrockTableaus/Project.toml b/lib/OrdinaryDiffEqRosenbrockTableaus/Project.toml index dccecca5ef3..7627f8359d3 100644 --- a/lib/OrdinaryDiffEqRosenbrockTableaus/Project.toml +++ b/lib/OrdinaryDiffEqRosenbrockTableaus/Project.toml @@ -18,7 +18,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] SciMLTesting = "2.1" ADTypes = "1.22.0" -DiffEqDevTools = "3" +DiffEqDevTools = "4" Enzyme = "0.13.180" LinearAlgebra = "1.10" LinearSolve = "5.1" diff --git a/lib/OrdinaryDiffEqSDIRK/Project.toml b/lib/OrdinaryDiffEqSDIRK/Project.toml index a5bfe7d2dfd..e368ca26182 100644 --- a/lib/OrdinaryDiffEqSDIRK/Project.toml +++ b/lib/OrdinaryDiffEqSDIRK/Project.toml @@ -43,7 +43,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" DifferentiationInterface = "0.7.18" MuladdMacro = "0.2.4" LinearAlgebra = "1.10" diff --git a/lib/OrdinaryDiffEqSIMDRK/Project.toml b/lib/OrdinaryDiffEqSIMDRK/Project.toml index 8e0c0b965a4..0c7d6b37ec7 100644 --- a/lib/OrdinaryDiffEqSIMDRK/Project.toml +++ b/lib/OrdinaryDiffEqSIMDRK/Project.toml @@ -23,7 +23,7 @@ SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" SciMLTesting = "2.1" Pkg = "1" Test = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" FastBroadcast = "1.3" MuladdMacro = "0.2.4" OrdinaryDiffEqCore = "4" diff --git a/lib/OrdinaryDiffEqSSPRK/Project.toml b/lib/OrdinaryDiffEqSSPRK/Project.toml index 13723cc156d..721cffa9da6 100644 --- a/lib/OrdinaryDiffEqSSPRK/Project.toml +++ b/lib/OrdinaryDiffEqSSPRK/Project.toml @@ -36,7 +36,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" StructArrays = "0.6, 0.7" MuladdMacro = "0.2.4" PrecompileTools = "1.2.1, 1.3" diff --git a/lib/OrdinaryDiffEqStabilizedIRK/Project.toml b/lib/OrdinaryDiffEqStabilizedIRK/Project.toml index e577a88958d..916221c4f67 100644 --- a/lib/OrdinaryDiffEqStabilizedIRK/Project.toml +++ b/lib/OrdinaryDiffEqStabilizedIRK/Project.toml @@ -34,7 +34,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "3" SciMLBase = "3.39" diff --git a/lib/OrdinaryDiffEqStabilizedRK/Project.toml b/lib/OrdinaryDiffEqStabilizedRK/Project.toml index 4953f4eb49c..b7736166a44 100644 --- a/lib/OrdinaryDiffEqStabilizedRK/Project.toml +++ b/lib/OrdinaryDiffEqStabilizedRK/Project.toml @@ -32,7 +32,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" LinearAlgebra = "1.10" SciMLBase = "3.39" diff --git a/lib/OrdinaryDiffEqSymplecticRK/Project.toml b/lib/OrdinaryDiffEqSymplecticRK/Project.toml index 5d6227f37b4..2c7ef2cc9be 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/Project.toml +++ b/lib/OrdinaryDiffEqSymplecticRK/Project.toml @@ -36,7 +36,7 @@ OrdinaryDiffEqTsit5 = "2" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" MuladdMacro = "0.2.4" LinearAlgebra = "1.10" OrdinaryDiffEqRKN = "2" diff --git a/lib/OrdinaryDiffEqTaylorSeries/Project.toml b/lib/OrdinaryDiffEqTaylorSeries/Project.toml index 426e8d7b305..26ab4909880 100644 --- a/lib/OrdinaryDiffEqTaylorSeries/Project.toml +++ b/lib/OrdinaryDiffEqTaylorSeries/Project.toml @@ -38,7 +38,7 @@ DiffEqDevTools = {path = "../DiffEqDevTools"} [compat] SciMLTesting = "2.1" DiffEqBase = "7" -DiffEqDevTools = "3" +DiffEqDevTools = "4" FastBroadcast = "1.3" FunctionWrappers = "1.1.3" LinearAlgebra = "1.10" diff --git a/lib/OrdinaryDiffEqTsit5/Project.toml b/lib/OrdinaryDiffEqTsit5/Project.toml index 15fb302ac6e..69d0bf18f3b 100644 --- a/lib/OrdinaryDiffEqTsit5/Project.toml +++ b/lib/OrdinaryDiffEqTsit5/Project.toml @@ -26,7 +26,7 @@ OrdinaryDiffEqCore = {path = "../OrdinaryDiffEqCore"} SciMLTesting = "2.1" CommonSolve = "0.2.6" DiffEqBase = "7" -DiffEqDevTools = "3" +DiffEqDevTools = "4" FastBroadcast = "1.3" LinearAlgebra = "1.10" MuladdMacro = "0.2.4" diff --git a/lib/OrdinaryDiffEqVerner/Project.toml b/lib/OrdinaryDiffEqVerner/Project.toml index 4a5605fc71c..db4be85f891 100644 --- a/lib/OrdinaryDiffEqVerner/Project.toml +++ b/lib/OrdinaryDiffEqVerner/Project.toml @@ -37,7 +37,7 @@ Pkg = "1" Test = "<0.0.1, 1" FastBroadcast = "1.3" Random = "<0.0.1, 1" -DiffEqDevTools = "3" +DiffEqDevTools = "4" OrdinaryDiffEqExplicitRK = "2" OrdinaryDiffEqExplicitTableaus = "2" MuladdMacro = "0.2.4" diff --git a/lib/StochasticDiffEq/test/weak_convergence/iip_weak.jl b/lib/StochasticDiffEq/test/weak_convergence/iip_weak.jl index fb93badf08e..0ebb1c3b602 100644 --- a/lib/StochasticDiffEq/test/weak_convergence/iip_weak.jl +++ b/lib/StochasticDiffEq/test/weak_convergence/iip_weak.jl @@ -20,7 +20,7 @@ prob = prob_sde_linear_iip println("EM") sim = test_convergence( dts, prob, EM(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -28,7 +28,7 @@ sim = test_convergence( println("SimplifiedEM") sim = test_convergence( dts, prob, SimplifiedEM(), save_everystep = false, trajectories = Int(5.0e5), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -36,7 +36,7 @@ sim = test_convergence( println("RKMil") sim = test_convergence( dts, prob, RKMil(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -44,7 +44,7 @@ sim = test_convergence( println("RKMilCommute") sim = test_convergence( dts, prob, RKMilCommute(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -52,7 +52,7 @@ sim = test_convergence( println("RKMilGeneral") sim = test_convergence( dts, prob, RKMilGeneral(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -60,7 +60,7 @@ sim = test_convergence( println("SROCK1") sim = test_convergence( dts, prob, SROCK1(), save_everystep = false, trajectories = Int(4.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -69,7 +69,7 @@ println("SROCK2") dts = 1 .// 2 .^ (8:-1:1) #14->7 good plot sim = test_convergence( dts, prob, SROCK2(), save_everystep = false, trajectories = Int(5.0e5), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @show sim.𝒪est[:weak_final] @test abs(sim.𝒪est[:weak_final] - 2) < 0.5 @@ -80,7 +80,7 @@ println("SROCKEM") sim = test_convergence( dts, prob, SROCKEM(strong_order_1 = false), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -88,7 +88,7 @@ sim = test_convergence( println("SROCKEM") sim = test_convergence( dts, prob, SROCKEM(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -96,7 +96,7 @@ sim = test_convergence( println("SKSROCK") sim = test_convergence( dts, prob, SKSROCK(), save_everystep = false, trajectories = Int(5.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -132,7 +132,7 @@ sim = test_convergence( println("WangLi3SMil_A") sim = test_convergence( dts, prob, WangLi3SMil_A(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -140,7 +140,7 @@ sim = test_convergence( println("WangLi3SMil_B") sim = test_convergence( dts, prob, WangLi3SMil_B(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -148,7 +148,7 @@ sim = test_convergence( println("WangLi3SMil_C") sim = test_convergence( dts, prob, WangLi3SMil_C(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -156,7 +156,7 @@ sim = test_convergence( println("WangLi3SMil_D") sim = test_convergence( dts, prob, WangLi3SMil_D(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -164,7 +164,7 @@ sim = test_convergence( println("WangLi3SMil_E") sim = test_convergence( dts, prob, WangLi3SMil_E(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -172,7 +172,7 @@ sim = test_convergence( println("WangLi3SMil_F") sim = test_convergence( dts, prob, WangLi3SMil_F(), save_everystep = false, trajectories = Int(1.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -181,7 +181,7 @@ println("SRI") dts = 1 .// 2 .^ (8:-1:2) sim = test_convergence( dts, prob, SRI(), save_everystep = false, trajectories = Int(2.0e4), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 2) < 0.5 #@test abs(sim.𝒪est[:weak_l2]-2) < 0.3 @@ -189,7 +189,7 @@ sim = test_convergence( println("SRIW1") sim = test_convergence( dts, prob, SRIW1(), save_everystep = false, trajectories = Int(1.0e5), - weak_timeseries_errors = false, retain_solutions = false + weak_timeseries_errors = false ) @test abs(sim.𝒪est[:weak_final] - 2) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-2) < 0.3 diff --git a/lib/StochasticDiffEq/test/weak_convergence/oop_weak.jl b/lib/StochasticDiffEq/test/weak_convergence/oop_weak.jl index 932210985f3..70baa7f9f9b 100644 --- a/lib/StochasticDiffEq/test/weak_convergence/oop_weak.jl +++ b/lib/StochasticDiffEq/test/weak_convergence/oop_weak.jl @@ -7,45 +7,45 @@ dts = 1 .// 2 .^ (7:-1:3) #14->7 good plot prob = prob_sde_linear println("EM") @time sim = test_convergence( - dts, prob, EM(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + dts, prob, EM(), save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SimplifiedEM") @time sim = test_convergence( - dts, prob, SimplifiedEM(), save_everystep = false, trajectories = Int(1.0e6), retain_solutions = false + dts, prob, SimplifiedEM(), save_everystep = false, trajectories = Int(1.0e6) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.35 println("RKMil") -sim = test_convergence(dts, prob, RKMil(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false) +sim = test_convergence(dts, prob, RKMil(), save_everystep = false, trajectories = Int(1.0e4)) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("RKMilCommute") sim = test_convergence( - dts, prob, RKMilCommute(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + dts, prob, RKMilCommute(), save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("RKMilGeneral") sim = test_convergence( - dts, prob, RKMilGeneral(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + dts, prob, RKMilGeneral(), save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SROCK1") -sim = test_convergence(dts, prob, SROCK1(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false) +sim = test_convergence(dts, prob, SROCK1(), save_everystep = false, trajectories = Int(1.0e4)) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SROCK2") dts = 1 .// 2 .^ (8:-1:1) #14->7 good plot -sim = test_convergence(dts, prob, SROCK2(), save_everystep = false, trajectories = Int(7.0e5), retain_solutions = false) +sim = test_convergence(dts, prob, SROCK2(), save_everystep = false, trajectories = Int(7.0e5)) @test abs(sim.𝒪est[:weak_final] - 2) < 0.5 #@test abs(sim.𝒪est[:weak_l2]-2) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-2) < 0.3 @@ -53,21 +53,21 @@ dts = 1 .// 2 .^ (7:-1:2) #14->7 good plot println("SROCKEM") sim = test_convergence( dts, prob, SROCKEM(strong_order_1 = false), - save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SROCKEM") sim = test_convergence( - dts, prob, SROCKEM(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + dts, prob, SROCKEM(), save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SKSROCK") sim = test_convergence( - dts, prob, SKSROCK(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + dts, prob, SKSROCK(), save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 @@ -103,53 +103,53 @@ sim = test_convergence( println("WangLi3SMil_A") dts = 1 .// 2 .^ (7:-1:3) sim = test_convergence( - dts, prob, WangLi3SMil_A(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + dts, prob, WangLi3SMil_A(), save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("WangLi3SMil_B") sim = test_convergence( - dts, prob, WangLi3SMil_B(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + dts, prob, WangLi3SMil_B(), save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("WangLi3SMil_C") sim = test_convergence( - dts, prob, WangLi3SMil_C(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + dts, prob, WangLi3SMil_C(), save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("WangLi3SMil_D") sim = test_convergence( - dts, prob, WangLi3SMil_D(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + dts, prob, WangLi3SMil_D(), save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("WangLi3SMil_E") sim = test_convergence( - dts, prob, WangLi3SMil_E(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + dts, prob, WangLi3SMil_E(), save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("WangLi3SMil_F") sim = test_convergence( - dts, prob, WangLi3SMil_F(), save_everystep = false, trajectories = Int(1.0e4), retain_solutions = false + dts, prob, WangLi3SMil_F(), save_everystep = false, trajectories = Int(1.0e4) ) @test abs(sim.𝒪est[:weak_final] - 1) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-1) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3 println("SRI") -sim = test_convergence(dts, prob, SRI(), save_everystep = false, trajectories = Int(2.0e5), retain_solutions = false) +sim = test_convergence(dts, prob, SRI(), save_everystep = false, trajectories = Int(2.0e5)) @test abs(sim.𝒪est[:weak_final] - 2) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-2) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-2) < 0.3 println("SRIW1") -sim = test_convergence(dts, prob, SRIW1(), save_everystep = false, trajectories = Int(1.0e5), retain_solutions = false) +sim = test_convergence(dts, prob, SRIW1(), save_everystep = false, trajectories = Int(1.0e5)) @test abs(sim.𝒪est[:weak_final] - 2) < 0.45 #@test abs(sim.𝒪est[:weak_l2]-2) < 0.3 #@test abs(sim.𝒪est[:weak_l∞]-2) < 0.3 diff --git a/lib/StochasticDiffEqROCK/Project.toml b/lib/StochasticDiffEqROCK/Project.toml index 80014364b7f..8c6bdf6f1c6 100644 --- a/lib/StochasticDiffEqROCK/Project.toml +++ b/lib/StochasticDiffEqROCK/Project.toml @@ -39,7 +39,7 @@ Reexport = "1.2.2" SciMLBase = "3.39" StaticArrays = "1.9.18" StochasticDiffEqCore = "2" -DiffEqDevTools = "3" +DiffEqDevTools = "4" Random = "1" SDEProblemLibrary = "0.1, 1" Test = "<0.0.1, 1" diff --git a/lib/StochasticDiffEqWeak/Project.toml b/lib/StochasticDiffEqWeak/Project.toml index 04bd60c3a9d..983b6dee7f0 100644 --- a/lib/StochasticDiffEqWeak/Project.toml +++ b/lib/StochasticDiffEqWeak/Project.toml @@ -49,7 +49,7 @@ Reexport = "1.2.2" SciMLBase = "3.39" StaticArrays = "1.9.18" StochasticDiffEqCore = "2" -DiffEqDevTools = "3" +DiffEqDevTools = "4" Random = "1" Statistics = "1.10.0" Test = "<0.0.1, 1" diff --git a/test/modelingtoolkit/Project.toml b/test/modelingtoolkit/Project.toml index e24064707ec..fbed18de3f9 100644 --- a/test/modelingtoolkit/Project.toml +++ b/test/modelingtoolkit/Project.toml @@ -9,7 +9,7 @@ OrdinaryDiffEqSDIRK = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] -DiffEqDevTools = "3" +DiffEqDevTools = "4" ModelingToolkit = "10.10, 11" NonlinearSolve = "4.10" OrdinaryDiffEqBDF = "2"