Closed TheStarAlight closed 11 months ago
Can you try by providing an initial dt?
The problem is that by default dt is Float32, which will cause type instability. I could fix that by converting it to the type of prob.tspan
. Meanwhile, do something like this:
solg = solve(ensemble_prob, DiffEqGPU.GPUTsit5(), EnsembleGPUKernel(CUDA.CUDABackend(),0.0), trajectories=size(init,2), adaptive=true, reltol=1e-6, save_everystep=false, dt = 1e-2)
Thank you for your timely reply!
However your example doesn't work :( the same error happens...
But if I remove reltol
from your example and it works! I wonder what happened...😂I really need the reltol
because I need to provide a parameter for accuracy control.
Can you help fix it? My CUDA.jl is v4.4, DiffEqGPU is v2.4. I'll be grateful if you can help☺️
It's mostly the issue of type instability. The default values for these is in Float32. Try to specify the abstol
as well:
solg = solve(ensemble_prob, DiffEqGPU.GPUTsit5(), EnsembleGPUKernel(CUDA.CUDABackend(),0.0), trajectories=size(init,2), adaptive=true, reltol=1e-6, abstol = 1e-3, save_everystep=false, dt = 1e-2)
Your MWE should work with v2.4.1 now.
Thank you! My problem solved, many thanks ☺️!
Hi, I'm using DiffEqGPU for my julia package to perform ensemble simulations (using
EnsembleGPUKernel
andGPUTsit5
), now the non-adaptive methods (adaptive=false
,dt=...
) works well.However, when I try to use adaptive methods (
adaptive=true
,reltol=...
) the error occured...I'm using the code from here.
And here I enclose the code below which can run in REPL:
when running the last line the error happens :( Here's the stack trace:
I wonder if DiffEqGPU really supports adaptive methods? Thank you for your attention and help 😋!