Skip to content

Commit e5fb05d

Browse files
Merge pull request #451 from SciML/srockc2
Split out SROCKC2 test
2 parents 927a584 + 11450e7 commit e5fb05d

File tree

5 files changed

+56
-17
lines changed

5 files changed

+56
-17
lines changed

.buildkite/pipeline.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ steps:
88
julia_args: "--threads=auto"
99
agents:
1010
queue: "juliaecosystem"
11-
exclusive: true
1211
env:
1312
GROUP: 'OOPWeakConvergence'
1413
timeout_in_minutes: 240
@@ -24,13 +23,28 @@ steps:
2423
julia_args: "--threads=auto"
2524
agents:
2625
queue: "juliaecosystem"
27-
exclusive: true
2826
env:
2927
GROUP: 'IIPWeakConvergence'
3028
timeout_in_minutes: 240
3129
# Don't run Buildkite if the commit message includes the text [skip tests]
3230
if: build.message !~ /\[skip tests\]/
3331

32+
- label: "SROCKC2WeakConvergence"
33+
plugins:
34+
- JuliaCI/julia#v1:
35+
version: "1"
36+
- JuliaCI/julia-test#v1:
37+
coverage: false
38+
julia_args: "--threads=auto"
39+
agents:
40+
queue: "juliaecosystem"
41+
exclusive: true
42+
env:
43+
GROUP: 'SROCKC2WeakConvergence'
44+
timeout_in_minutes: 240
45+
# Don't run Buildkite if the commit message includes the text [skip tests]
46+
if: build.message !~ /\[skip tests\]/
47+
3448
- label: "WeakConvergence2"
3549
plugins:
3650
- JuliaCI/julia#v1:
@@ -44,7 +58,7 @@ steps:
4458
GROUP: 'WeakConvergence2'
4559
timeout_in_minutes: 240
4660
# Don't run Buildkite if the commit message includes the text [skip tests]
47-
if: build.message !~ /\[skip tests\]/
61+
if: build.message !~ /\[skip tests\]/
4862

4963
- label: "WeakConvergence3"
5064
plugins:
@@ -59,7 +73,7 @@ steps:
5973
GROUP: 'WeakConvergence3'
6074
timeout_in_minutes: 240
6175
# Don't run Buildkite if the commit message includes the text [skip tests]
62-
if: build.message !~ /\[skip tests\]/
76+
if: build.message !~ /\[skip tests\]/
6377

6478
- label: "WeakConvergence4"
6579
plugins:

test/runtests.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ const is_APPVEYOR = Sys.iswindows() && haskey(ENV,"APPVEYOR")
103103
@time @safetestset "IIP Weak Convergence Tests" begin include("weak_convergence/iip_weak.jl") end
104104
end
105105

106+
if !is_APPVEYOR && GROUP == "SROCKC2WeakConvergence"
107+
#activate_gpu_env()
108+
@time @safetestset "SROCKC2 Weak Convergence Tests" begin include("weak_convergence/weak_srockc2.jl") end
109+
end
110+
106111
if !is_APPVEYOR && GROUP == "WeakAdaptiveCPU"
107112
@time @safetestset "CPU Weak adaptive step size Brusselator " begin include("adaptive/sde_weak_brusselator_adaptive.jl") end
108113
@time @safetestset "CPU Weak adaptive" begin include("adaptive/sde_weak_adaptive.jl") end

test/weak_convergence/iip_weak.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,6 @@ sim = test_convergence(dts,prob,SKSROCK(),save_everystep=false,trajectories=Int(
7676
@test abs(sim.𝒪est[:weak_final]-1) < 0.3
7777
#@test abs(sim.𝒪est[:weak_l2]-1) < 0.3
7878
#@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3
79-
println("SROCKC2")
80-
@time sim = test_convergence(dts,prob,SROCKC2(),save_everystep=false,trajectories=Int(5e6),
81-
weak_timeseries_errors=false)
82-
@show sim.𝒪est[:weak_final]
83-
@test abs(sim.𝒪est[:weak_final]-2) < 0.35
84-
#@test abs(sim.𝒪est[:weak_l2]-2) < 0.3
85-
#@test abs(sim.𝒪est[:weak_l∞]-2) < 0.3
8679

8780
#omitting tests for incomplete methods
8881
# sim = test_convergence(dts,prob,TangXiaoSROCK2(version_num=1),save_everystep=false,trajectories=Int(4e4),

test/weak_convergence/oop_weak.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ sim = test_convergence(dts,prob,SKSROCK(),save_everystep=false,trajectories=Int(
5959
@test abs(sim.𝒪est[:weak_final]-1) < 0.3
6060
#@test abs(sim.𝒪est[:weak_l2]-1) < 0.3
6161
#@test abs(sim.𝒪est[:weak_l∞]-1) < 0.3
62-
println("SROCKC2")
63-
@time sim = test_convergence(dts,prob,SROCKC2(),save_everystep=false,trajectories=Int(1e7))
64-
@show sim.𝒪est[:weak_final]
65-
@test abs(sim.𝒪est[:weak_final]-2) < 0.35
66-
#@test abs(sim.𝒪est[:weak_l2]-2) < 0.3
67-
#@test abs(sim.𝒪est[:weak_l∞]-2) < 0.3
6862

6963
#omitting tests for incomplete methods
7064
# sim = test_convergence(dts,prob,TangXiaoSROCK2(version_num=1),save_everystep=false,trajectories=Int(4e4),

test/weak_convergence/weak_srockc2.jl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using StochasticDiffEq, DiffEqDevTools, Test
2+
using Random
3+
using DiffEqProblemLibrary.SDEProblemLibrary: importsdeproblems
4+
importsdeproblems()
5+
using DiffEqProblemLibrary.SDEProblemLibrary: prob_sde_linear
6+
7+
f_linear_iip(du,u,p,t) = @.(du = 1.01*u)
8+
σ_linear_iip(du,u,p,t) = @.(du = 0.87*u)
9+
10+
linear_analytic(u0,p,t,W) = @.(u0*exp(0.63155t+0.87W))
11+
12+
prob_sde_linear_iip = SDEProblem(SDEFunction(f_linear_iip,σ_linear_iip,
13+
analytic=linear_analytic),σ_linear_iip,[1/2],(0.0,1.0))
14+
15+
Random.seed!(100)
16+
dts = 1 .//2 .^(7:-1:3) #14->7 good plot
17+
18+
println("SROCKC2")
19+
@time sim = test_convergence(dts,prob,SROCKC2(),save_everystep=false,trajectories=Int(5e6),
20+
weak_timeseries_errors=false)
21+
@show sim.𝒪est[:weak_final]
22+
@test abs(sim.𝒪est[:weak_final]-2) < 0.35
23+
#@test abs(sim.𝒪est[:weak_l2]-2) < 0.3
24+
#@test abs(sim.𝒪est[:weak_l∞]-2) < 0.3
25+
26+
prob = prob_sde_linear
27+
28+
println("SROCKC2")
29+
@time sim = test_convergence(dts,prob,SROCKC2(),save_everystep=false,trajectories=Int(1e7))
30+
@show sim.𝒪est[:weak_final]
31+
@test abs(sim.𝒪est[:weak_final]-2) < 0.35
32+
#@test abs(sim.𝒪est[:weak_l2]-2) < 0.3
33+
#@test abs(sim.𝒪est[:weak_l∞]-2) < 0.3

0 commit comments

Comments
 (0)