# Differentialequations.jl: SDE ensemble solve fails for vector SDEs?

**URL:** <https://discourse.julialang.org/t/differentialequations-jl-sde-ensemble-solve-fails-for-vector-sdes/57631>\
**Category:** Numerics\
**Tags:** sde\
**Created:** [March 20, 2021, 11:12pm UTC](https://discourse.julialang.org/t/differentialequations-jl-sde-ensemble-solve-fails-for-vector-sdes/57631 "2021-03-20T23:12:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![colm-connaughton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colm-connaughton/32/22519_2.png) [@colm-connaughton](https://discourse.julialang.org/u/colm-connaughton)\
**Post date:** [March 20, 2021, 11:12pm UTC](https://discourse.julialang.org/t/differentialequations-jl-sde-ensemble-solve-fails-for-vector-sdes/57631/1 "2021-03-20T23:12:32Z")

</div>

I’ve been using the examples in the documentation to play around with the SDE solvers in DifferentialEquations.jl and have run into trouble trying to run ensemble simulations with vector-valued SDEs (the scalar case worked fine for me). I tried the Lorenz example in ensemble mode:

> using DifferentialEquations
> 
> function lorenz(du,u,p,t)  
> du[1] = 10.0(u[2]-u[1])  
> du[2] = u[1]\*(28.0-u[3]) - u[2]  
> du[3] = u[1]\*u[2] - (8/3)\*u[3]  
> end
> 
> function σ\_lorenz(du,u,p,t)  
> du[1] = 3.0  
> du[2] = 3.0  
> du[3] = 3.0  
> end
> 
> prob\_sde\_lorenz = SDEProblem(lorenz,σ\_lorenz,[1.0,0.0,0.0],(0.0,1.0))  
> sol = solve(prob\_sde\_lorenz)
> 
> ensembleprob = EnsembleProblem(prob\_sde\_lorenz)  
> sol = solve(ensembleprob,EnsembleThreads(),trajectories=10)

and got the error

` **ERROR:** LoadError: MethodError: no method matching __solve(::EnsembleProblem{SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,SciMLBase.NullParameters,Nothing,SDEFunction{true,typeof(lorenz),typeof(σ_lorenz),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(σ_lorenz),Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},Nothing},typeof(SciMLBase.DEFAULT_PROB_FUNC),typeof(SciMLBase.DEFAULT_OUTPUT_FUNC),typeof(SciMLBase.DEFAULT_REDUCTION),Nothing}, ::EnsembleThreads; trajectories=10)`

I’m pretty sure this used to work in the past. Am I missing something obvious?

Best,

Colm

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [March 21, 2021, 5:05pm UTC](https://discourse.julialang.org/t/differentialequations-jl-sde-ensemble-solve-fails-for-vector-sdes/57631/2 "2021-03-21T17:05:17Z")

</div>

> [@colm-connaughton](#):
>
> sol = solve(ensembleprob,EnsembleThreads(),trajectories=10)

The issue was that default method handling with Ensembles broke when when SciMLBase was split out, but now I just fixed that so if you update now you should be good.

---

<div class="post-metadata">

**Author:** ![colm-connaughton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colm-connaughton/32/22519_2.png) [@colm-connaughton](https://discourse.julialang.org/u/colm-connaughton)\
**Post date:** [March 23, 2021, 2:52pm UTC](https://discourse.julialang.org/t/differentialequations-jl-sde-ensemble-solve-fails-for-vector-sdes/57631/3 "2021-03-23T14:52:35Z")

</div>

Thanks Chris. It’s working again now.
