@@ -56,7 +56,8 @@ ensemble_prob1 = EnsembleProblem(prob1;
56
56
output_func = output_func,
57
57
prob_func = prob_func,
58
58
reduction = reduction,
59
- u_init= Vector {eltype(prob1.u0)} ([0.0 ])
59
+ u_init= Vector {eltype(prob1.u0)} ([0.0 ]),
60
+ safetycopy = false
60
61
)
61
62
62
63
@@ -86,7 +87,8 @@ ensemble_prob2 = EnsembleProblem(prob2;
86
87
output_func = (sol,i) -> (h2 .(sol),false ),
87
88
prob_func = prob_func,
88
89
reduction = reduction,
89
- u_init= Vector {eltype(prob2.u0)} ([0.0 , 0.0 ])
90
+ u_init= Vector {eltype(prob2.u0)} ([0.0 , 0.0 ]),
91
+ safetycopy = false
90
92
)
91
93
92
94
@@ -109,19 +111,19 @@ seeds = rand(UInt, numtraj)
109
111
for i in 1 : 2
110
112
@show i
111
113
112
- err1 = weak_error (probs[i],DRI1NM (),numtraj,Int (1e4 ),ftrue[i],tsave,abstol= 1f0 ,reltol= 1f0 , ensemblealg= EnsembleGPUArray ())
114
+ err1 = weak_error (probs[i],DRI1NM (),numtraj,Int (1e4 ),ftrue[i],tsave,abstol= 1f0 ,reltol= 1f0 , ensemblealg= EnsembleGPUArray (CUDA . CUDABackend () ))
113
115
@show err1
114
- # err2 = weak_error(probs[i],DRI1NM(),numtraj,Int(1e4),ftrue[i],tsave,abstol=0.1f0,reltol=0.1f0, ensemblealg=EnsembleGPUArray())
116
+ # err2 = weak_error(probs[i],DRI1NM(),numtraj,Int(1e4),ftrue[i],tsave,abstol=0.1f0,reltol=0.1f0, ensemblealg=EnsembleGPUArray(CUDA.CUDABackend() ))
115
117
# @show err2
116
- err3 = weak_error (probs[i],DRI1NM (),numtraj,Int (1e4 ),ftrue[i],tsave,abstol= 0.01f0 ,reltol= 0.01f0 , ensemblealg= EnsembleGPUArray ())
118
+ err3 = weak_error (probs[i],DRI1NM (),numtraj,Int (1e4 ),ftrue[i],tsave,abstol= 0.01f0 ,reltol= 0.01f0 , ensemblealg= EnsembleGPUArray (CUDA . CUDABackend () ))
117
119
@show err3
118
120
@test err1 > err3
119
121
println (" " )
120
122
end
121
123
122
124
123
125
#
124
- # sol = @time solve(probs[1],DRI1NM(),EnsembleGPUArray(),
126
+ # sol = @time solve(probs[1],DRI1NM(),EnsembleGPUArray(CUDA.CUDABackend() ),
125
127
# dt=0.001f0,adaptive=false,abstol=0.1f0,reltol=0.1f0,
126
128
# trajectories=numtraj,batch_size=Int(1e1),
127
129
# saveat = tsave
0 commit comments