# Error using SDE solver SKenCarp

**URL:** <https://discourse.julialang.org/t/error-using-sde-solver-skencarp/140046>\
**Category:** General Usage\
**Tags:** ode, sde, differentialequation\
**Created:** [October 16, 2026, 4:47am UTC](https://discourse.julialang.org/t/error-using-sde-solver-skencarp/140046 "2026-10-16T04:47:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliansgottfried](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliansgottfried/32/224700_2.png) [@juliansgottfried](https://discourse.julialang.org/u/juliansgottfried)\
**Post date:** [October 16, 2026, 4:47am UTC](https://discourse.julialang.org/t/error-using-sde-solver-skencarp/140046/1 "2026-10-16T04:47:21Z")

</div>

Hi! I’m getting a very confusing bug while attempting to solve a stiff SDE using SKenCarp. I’ve included a minimal example below. ImplicitEM, an alternative solver, works just fine, but SKenCarp appears to do something funky with the noise\_rate\_prototype matrix. The error message that arises – “DimensionMismatch: all inputs to eachindex must have the same indices” – is the same as in [this GitHub issue,](https://github.com/SciML/OrdinaryDiffEq.jl/issues/2653) but the situation is different. I would appreciate any and all advice – thank you!! See below also for details on the code.

The first argument in SplitSDEProblem is the stiff component of the drift; the second argument is the non-stiff component; the third is the non-stiff diffusion. The fourth argument gives the initial conditions, and the fifth the time span. Finally, noise\_rate\_prototype is a matrix defining the shape and format of the diffusion. In this case, the diffusion should be 2x2 and no terms should be fixed at 0.

```julia-auto
import StochasticDiffEq as SDE
prob = SDE.SplitSDEProblem((du, u, p, t) -> du .= 1.0,
    (du, u, p, t) -> du .= 1.0,
    (du, u, p, t) -> du .= 1.0,
    zeros(2), (0.0, 10.0),
    noise_rate_prototype = ones(2, 2))
sol = SDE.solve(prob, SDE.SKenCarp(autodiff = SDE.AutoFiniteDiff()))
# sol = SDE.solve(prob, SDE.ImplicitEM(autodiff = SDE.AutoFiniteDiff()))

```
