When I run the following example code from the DiffEqGPU documentation,
using DiffEqGPU, OrdinaryDiffEq, StaticArrays, CUDA
function lorenz(u, p, t)
σ = p[1]
ρ = p[2]
β = p[3]
du1 = σ * (u[2] - u[1])
du2 = u[1] * (ρ - u[3]) - u[2]
du3 = u[1] * u[2] - β * u[3]
return SVector{3}(du1, du2, du3)
end
u0 = @SVector [1.0f0; 0.0f0; 0.0f0]
tspan = (0.0f0, 10.0f0)
p = @SVector [10.0f0, 28.0f0, 8 / 3.0f0]
prob = ODEProblem{false}(lorenz, u0, tspan, p)
prob_func = (prob, i, repeat) -> remake(prob, p = (@SVector rand(Float32, 3)) .* p)
monteprob = EnsembleProblem(prob, prob_func = prob_func, safetycopy = false)
sol = solve(monteprob, GPUTsit5(), EnsembleGPUKernel(CUDA.CUDABackend()),
trajectories = 10_000)
I get the following error:
ERROR: MethodError: no method matching (::var"#497#498")(::ODEProblem{…}, ::EnsembleContext{…})
The function `#497` exists, but no method is defined for this combination of argument types.
Closest candidates are:
(::var"#497#498")(::Any, ::Any, ::Any)
I’ve run the code several times, and the numbers in the “no method matching” error seem to increase incrementally each time (so when I ran it again, it read no method matching (::var"#499#500")(::ODEProblem{…}, ::EnsembleContext{…}) instead of no method matching (::var"#497#498")(::ODEProblem{…}, ::EnsembleContext{…}).)
The other example on the “getting started” page runs just fine. (For context, I’ve included it below)
using OrdinaryDiffEq, CUDA, LinearAlgebra
u0 = cu(rand(1000))
A = cu(randn(1000, 1000))
f(du, u, p, t) = mul!(du, A, u)
prob = ODEProblem(f, u0, (0.0f0, 1.0f0)) # Float32 is better on GPUs!
sol = solve(prob, Tsit5())
I’m running Julia 1.11.1 on a Windows 11 laptop. Here’s the CUDA information:
CUDA toolchain:
- runtime 13.3.0, artifact installation
- driver 610.62.0 for 13.3
- compiler 13.3.33, artifact installation
CUDA libraries:
- cuBLAS: 13.6.0
- cuSPARSE: 12.8.2
- cuSOLVER: 12.2.6
- cuFFT: 12.3.0
- cuRAND: 10.4.3
- CUPTI: 2026.2.1 (API 13.3.1)
- NVML: 13.0.0+610.62
Julia packages:
- CUDACore: 6.2.1
- GPUArrays: 11.5.8
- GPUCompiler: 1.23.0
- KernelAbstractions: 0.9.42
- CUDA_Driver_jll: 13.3.0+1
- CUDA_Compiler_jll: 0.4.4+1
- CUDA_Runtime_jll: 0.23.0+1
- NVPTX_LLVM_Backend_jll: 22.1.7+1
Toolchain:
- Julia: 1.11.1
- LLVM: 16.0.6
1 device:
0: NVIDIA GeForce RTX 3070 Ti Laptop GPU (sm_86, 7.379 GiB / 8.000 GiB available)
compiles to sm_86 / PTX 9.3 (LLVM: sm_86 / PTX 9.0)
What’s causing this error?