DiffEqGPU.jl
DiffEqGPU.jl copied to clipboard
Iteration doesn't work in RHS function
Full MWE
using OrdinaryDiffEq
using DifferentialEquations.EnsembleAnalysis
using DiffEqGPU
using CuArrays
Base.@propagate_inbounds function lotka_volterra2(du,u,p,t)
x,y = u
du[1] = p[1]*x - p[2]*x*y
du[2] = -p[3]*y + p[4]*x*y
return nothing
end
u0 = [1.0,1.0]
tspan = (0.0,10.0)
p = [1.0,1.0,1.0,1.0]
prob = ODEProblem(lotka_volterra2,u0,tspan,p)
ensemble_problem = EnsembleProblem(prob)
ensemble_solution = solve(ensemble_problem,Tsit5(),EnsembleGPUArray(),trajectories = 10)
@vchuravy is this handled in KernelAbstractions.jl?
The above example works on [email protected] and [email protected]