# \[Resolved\] ERROR: SciMLSensitivity

**URL:** <https://discourse.julialang.org/t/resolved-error-scimlsensitivity/129531>\
**Category:** Machine Learning\
**Tags:** question\
**Created:** [June 1, 2025, 4:08pm UTC](https://discourse.julialang.org/t/resolved-error-scimlsensitivity/129531 "2025-06-01T16:08:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![aquarelleX332](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aquarellex332/32/21048_2.png) [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Post date:** [June 1, 2025, 4:08pm UTC](https://discourse.julialang.org/t/resolved-error-scimlsensitivity/129531/1 "2025-06-01T16:08:58Z")

</div>

Hello all,

I am dealing with a code including CRNN in the case of 2 consecutives chemical reactions. The code can be found [here](https://github.com/aquarelleX332/Sandbox/blob/main/CRNN_2_reac_consec_v2.jl).

Amongst other packages I am using:  
SciMLSensitivity v7.84.0  
Zygote v0.7.7

The error is:  
ERROR: SciMLSensitivity.AdjointSensitivityParameterCompatibilityError()

```julia
Stacktrace:
  [1] _concrete_solve_adjoint(::ODEProblem{…}, ::Tsit5{…}, ::InterpolatingAdjoint{…}, ::Vector{…}, ::ChemicalReactionNN, ::SciMLBase.ChainRulesOriginator; save_start::Bool, save_end::Bool, saveat::StepRangeLen{…}, save_idxs::Nothing, initializealg_default::SciMLBase.OverrideInit{…}, kwargs::@Kwargs{})
    @ SciMLSensitivity ~/.julia/packages/SciMLSensitivity/KLsRs/src/concrete_solve.jl:381
  [2] _solve_adjoint(prob::ODEProblem{…}, sensealg::InterpolatingAdjoint{…}, u0::Vector{…}, p::ChemicalReactionNN, originator::SciMLBase.ChainRulesOriginator, args::Tsit5{…}; merge_callbacks::Bool, kwargs::@Kwargs{…})
    @ DiffEqBase ~/.julia/packages/DiffEqBase/5hvMq/src/solve.jl:1685
  [3] rrule(::typeof(DiffEqBase.solve_up), prob::ODEProblem{…}, sensealg::InterpolatingAdjoint{…}, u0::Vector{…}, p::ChemicalReactionNN, args::Tsit5{…}; kwargs::@Kwargs{…})
    @ DiffEqBaseChainRulesCoreExt ~/.julia/packages/DiffEqBase/5hvMq/ext/DiffEqBaseChainRulesCoreExt.jl:26
  [4] kwcall(::@NamedTuple{…}, ::typeof(ChainRulesCore.rrule), ::Zygote.ZygoteRuleConfig{…}, ::Function, ::ODEProblem{…}, ::InterpolatingAdjoint{…}, ::Vector{…}, ::ChemicalReactionNN, ::Tsit5{…})
    @ ChainRulesCore ~/.julia/packages/ChainRulesCore/U6wNx/src/rules.jl:144
  [5] chain_rrule_kw
    @ ~/.julia/packages/Zygote/wfLOG/src/compiler/chainrules.jl:246 [inlined]
  [6] macro expansion
    @ ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:0 [inlined]
  [7] _pullback(::Zygote.Context{…}, ::typeof(Core.kwcall), ::@NamedTuple{…}, ::typeof(DiffEqBase.solve_up), ::ODEProblem{…}, ::InterpolatingAdjoint{…}, ::Vector{…}, ::ChemicalReactionNN, ::Tsit5{…})
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:81
  [8] _apply(::Function, ::Vararg{Any})
    @ Core ./boot.jl:838
  [9] adjoint
    @ ~/.julia/packages/Zygote/wfLOG/src/lib/lib.jl:199 [inlined]
 [10] _pullback
    @ ~/.julia/packages/ZygoteRules/CkVIK/src/adjoint.jl:67 [inlined]
 [11] #solve#43
    @ ~/.julia/packages/DiffEqBase/5hvMq/src/solve.jl:1089 [inlined]
 [12] _pullback(::Zygote.Context{…}, ::DiffEqBase.var"##solve#43", ::InterpolatingAdjoint{…}, ::Nothing, ::Nothing, ::Val{…}, ::@Kwargs{…}, ::typeof(solve), ::ODEProblem{…}, ::Tsit5{…})
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:0
 [13] _apply(::Function, ::Vararg{Any})
    @ Core ./boot.jl:838
 [14] adjoint
    @ ~/.julia/packages/Zygote/wfLOG/src/lib/lib.jl:199 [inlined]
 [15] _pullback
    @ ~/.julia/packages/ZygoteRules/CkVIK/src/adjoint.jl:67 [inlined]
 [16] solve
    @ ~/.julia/packages/DiffEqBase/5hvMq/src/solve.jl:1079 [inlined]
 [17] _pullback(::Zygote.Context{…}, ::typeof(Core.kwcall), ::@NamedTuple{…}, ::typeof(solve), ::ODEProblem{…}, ::Tsit5{…})
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:0
 [18] simulate_differentiable
    @ ~/CRNN/CRNN_2_reac_consec_v2.jl:68 [inlined]
 [19] _pullback(::Zygote.Context{…}, ::typeof(simulate_differentiable), ::ChemicalReactionNN, ::Vector{…}, ::Tuple{…}, ::StepRangeLen{…})
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:0
 [20] #35
    @ ~/CRNN/CRNN_2_reac_consec_v2.jl:98 [inlined]
 [21] _pullback(ctx::Zygote.Context{…}, f::var"#35#36"{…}, args::ChemicalReactionNN)
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:0
 [22] pullback(f::Function, cx::Zygote.Context{false}, args::ChemicalReactionNN)
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface.jl:96
 [23] pullback
    @ ~/.julia/packages/Zygote/wfLOG/src/compiler/interface.jl:94 [inlined]
 [24] withgradient(f::Function, args::ChemicalReactionNN)
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface.jl:211
 [25] #withgradient#5
    @ ~/.julia/packages/Flux/3711C/src/gradient.jl:182 [inlined]
 [26] withgradient
    @ ~/.julia/packages/Flux/3711C/src/gradient.jl:169 [inlined]
 [27] train_crnn(crnn::ChemicalReactionNN, c_init::Vector{Float32}, target::Matrix{Float32}, epochs::Int64, lr::Float32)
    @ Main ~/CRNN/CRNN_2_reac_consec_v2.jl:97
 [28] train_crnn
    @ ~/CRNN/CRNN_2_reac_consec_v2.jl:86 [inlined]
 [29] main()
    @ Main ~/CRNN/CRNN_2_reac_consec_v2.jl:157
 [30] top-level scope
    @ ~/CRNN/CRNN_2_reac_consec_v2.jl:189

```

How could I eliminate this error? Many thanks in advance.

---

<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:** [June 1, 2025, 7:36pm UTC](https://discourse.julialang.org/t/resolved-error-scimlsensitivity/129531/2 "2025-06-01T19:36:13Z")

</div>

> [@aquarelleX332](#):
>
> ERROR: SciMLSensitivity.AdjointSensitivityParameterCompatibilityError()

Can you post the rest of the error? It should be helpful.

---

<div class="post-metadata">

**Author:** ![aquarelleX332](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aquarellex332/32/21048_2.png) [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Post date:** [June 1, 2025, 7:39pm UTC](https://discourse.julialang.org/t/resolved-error-scimlsensitivity/129531/3 "2025-06-01T19:39:50Z")

</div>

Here is the rest of informations:

```julia
julia> show(err)
1-element ExceptionStack:
LoadError: Adjoint sensitivity analysis functionality requires being able to solve
a differential equation defined by the parameter struct `p`. Thus while
DifferentialEquations.jl can support any parameter struct type, usage
with adjoint sensitivity analysis requires that `p` could be a valid
type for being the initial condition `u0` of an array. This means that
many simple types, such as `Tuple`s and `NamedTuple`s, will work as
parameters in normal contexts but will fail during adjoint differentiation.
To work around this issue for complicated cases like nested structs, look
into defining `p` using `AbstractArray` libraries such as RecursiveArrayTools.jl
or ComponentArrays.jl so that `p` is an `AbstractArray` with a concrete element type.

Stacktrace:
  [1] _concrete_solve_adjoint(::ODEProblem{Vector{Float32}, Tuple{Float32, Float32}, true, ChemicalReactionNN, ODEFunction{true, SciMLBase.AutoSpecialize, FunctionWrappersWrappers.FunctionWrappersWrapper{Tuple{FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{Float32}, Vector{Float32}, ChemicalReactionNN, Float32}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float32}, Float32, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float32}, Float32, 1}}, ChemicalReactionNN, Float32}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float32}, Float32, 1}}, Vector{Float32}, ChemicalReactionNN, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float32}, Float32, 1}}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float32}, Float32, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float32}, Float32, 1}}, ChemicalReactionNN, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float32}, Float32, 1}}}}, false}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, ::Tsit5{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False}, ::InterpolatingAdjoint{0, true, Val{:central}, ReverseDiffVJP{true}}, ::Vector{Float32}, ::ChemicalReactionNN, ::SciMLBase.ChainRulesOriginator; save_start::Bool, save_end::Bool, saveat::StepRangeLen{Float32, Float64, Float64, Int64}, save_idxs::Nothing, initializealg_default::SciMLBase.OverrideInit{Float64, Float64, Nothing}, kwargs::@Kwargs{})
    @ SciMLSensitivity ~/.julia/packages/SciMLSensitivity/KLsRs/src/concrete_solve.jl:381
  [2] _solve_adjoint(prob::ODEProblem{Vector{Float32}, Tuple{Float32, Float32}, true, ChemicalReactionNN, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(crnn_ode!), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, sensealg::InterpolatingAdjoint{0, true, Val{:central}, ReverseDiffVJP{true}}, u0::Vector{Float32}, p::ChemicalReactionNN, originator::SciMLBase.ChainRulesOriginator, args::Tsit5{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False}; merge_callbacks::Bool, kwargs::@Kwargs{saveat::StepRangeLen{Float32, Float64, Float64, Int64}})
    @ DiffEqBase ~/.julia/packages/DiffEqBase/5hvMq/src/solve.jl:1685
  [3] rrule(::typeof(DiffEqBase.solve_up), prob::ODEProblem{Vector{Float32}, Tuple{Float32, Float32}, true, ChemicalReactionNN, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(crnn_ode!), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, sensealg::InterpolatingAdjoint{0, true, Val{:central}, ReverseDiffVJP{true}}, u0::Vector{Float32}, p::ChemicalReactionNN, args::Tsit5{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False}; kwargs::@Kwargs{saveat::StepRangeLen{Float32, Float64, Float64, Int64}})
    @ DiffEqBaseChainRulesCoreExt ~/.julia/packages/DiffEqBase/5hvMq/ext/DiffEqBaseChainRulesCoreExt.jl:26
  [4] kwcall(::@NamedTuple{saveat::StepRangeLen{Float32, Float64, Float64, Int64}}, ::typeof(ChainRulesCore.rrule), ::Zygote.ZygoteRuleConfig{Zygote.Context{false}}, ::Function, ::ODEProblem{Vector{Float32}, Tuple{Float32, Float32}, true, ChemicalReactionNN, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(crnn_ode!), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, ::InterpolatingAdjoint{0, true, Val{:central}, ReverseDiffVJP{true}}, ::Vector{Float32}, ::ChemicalReactionNN, ::Tsit5{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False})
    @ ChainRulesCore ~/.julia/packages/ChainRulesCore/U6wNx/src/rules.jl:144
  [5] chain_rrule_kw
    @ ~/.julia/packages/Zygote/wfLOG/src/compiler/chainrules.jl:246 [inlined]
  [6] macro expansion
    @ ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:0 [inlined]
  [7] _pullback(::Zygote.Context{false}, ::typeof(Core.kwcall), ::@NamedTuple{saveat::StepRangeLen{Float32, Float64, Float64, Int64}}, ::typeof(DiffEqBase.solve_up), ::ODEProblem{Vector{Float32}, Tuple{Float32, Float32}, true, ChemicalReactionNN, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(crnn_ode!), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, ::InterpolatingAdjoint{0, true, Val{:central}, ReverseDiffVJP{true}}, ::Vector{Float32}, ::ChemicalReactionNN, ::Tsit5{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False})
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:81
  [8] _apply(::Function, ::Vararg{Any})
    @ Core ./boot.jl:838
  [9] adjoint
    @ ~/.julia/packages/Zygote/wfLOG/src/lib/lib.jl:199 [inlined]
 [10] _pullback
    @ ~/.julia/packages/ZygoteRules/CkVIK/src/adjoint.jl:67 [inlined]
 [11] #solve#43
    @ ~/.julia/packages/DiffEqBase/5hvMq/src/solve.jl:1089 [inlined]
 [12] _pullback(::Zygote.Context{false}, ::DiffEqBase.var"##solve#43", ::InterpolatingAdjoint{0, true, Val{:central}, ReverseDiffVJP{true}}, ::Nothing, ::Nothing, ::Val{true}, ::@Kwargs{saveat::StepRangeLen{Float32, Float64, Float64, Int64}}, ::typeof(solve), ::ODEProblem{Vector{Float32}, Tuple{Float32, Float32}, true, ChemicalReactionNN, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(crnn_ode!), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, ::Tsit5{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False})
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:0
 [13] _apply(::Function, ::Vararg{Any})
    @ Core ./boot.jl:838
 [14] adjoint
    @ ~/.julia/packages/Zygote/wfLOG/src/lib/lib.jl:199 [inlined]
 [15] _pullback
    @ ~/.julia/packages/ZygoteRules/CkVIK/src/adjoint.jl:67 [inlined]
 [16] solve
    @ ~/.julia/packages/DiffEqBase/5hvMq/src/solve.jl:1079 [inlined]
 [17] _pullback(::Zygote.Context{false}, ::typeof(Core.kwcall), ::@NamedTuple{saveat::StepRangeLen{Float32, Float64, Float64, Int64}, sensealg::InterpolatingAdjoint{0, true, Val{:central}, ReverseDiffVJP{true}}}, ::typeof(solve), ::ODEProblem{Vector{Float32}, Tuple{Float32, Float32}, true, ChemicalReactionNN, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(crnn_ode!), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, ::Tsit5{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False})
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:0
 [18] simulate_differentiable
    @ ~/CRNN/CRNN_2_reac_consec_v2.jl:68 [inlined]
 [19] _pullback(::Zygote.Context{false}, ::typeof(simulate_differentiable), ::ChemicalReactionNN, ::Vector{Float32}, ::Tuple{Float32, Float32}, ::StepRangeLen{Float32, Float64, Float64, Int64})
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:0
 [20] #35
    @ ~/CRNN/CRNN_2_reac_consec_v2.jl:98 [inlined]
 [21] _pullback(ctx::Zygote.Context{false}, f::var"#35#36"{Vector{Float32}, Matrix{Float32}, StepRangeLen{Float32, Float64, Float64, Int64}, Tuple{Float32, Float32}}, args::ChemicalReactionNN)
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface2.jl:0
 [22] pullback(f::Function, cx::Zygote.Context{false}, args::ChemicalReactionNN)
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface.jl:96
 [23] pullback
    @ ~/.julia/packages/Zygote/wfLOG/src/compiler/interface.jl:94 [inlined]
 [24] withgradient(f::Function, args::ChemicalReactionNN)
    @ Zygote ~/.julia/packages/Zygote/wfLOG/src/compiler/interface.jl:211
 [25] #withgradient#5
    @ ~/.julia/packages/Flux/3711C/src/gradient.jl:182 [inlined]
 [26] withgradient
    @ ~/.julia/packages/Flux/3711C/src/gradient.jl:169 [inlined]
 [27] train_crnn(crnn::ChemicalReactionNN, c_init::Vector{Float32}, target::Matrix{Float32}, epochs::Int64, lr::Float32)
    @ Main ~/CRNN/CRNN_2_reac_consec_v2.jl:97
 [28] train_crnn
    @ ~/CRNN/CRNN_2_reac_consec_v2.jl:86 [inlined]
 [29] main()
    @ Main ~/CRNN/CRNN_2_reac_consec_v2.jl:157
 [30] top-level scope
    @ ~/CRNN/CRNN_2_reac_consec_v2.jl:189
 [31] eval
    @ ./boot.jl:385 [inlined]
 [32] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2146
 [33] include_string(m::Module, txt::String, fname::String)
    @ Base ./loading.jl:2156
 [34] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Base ./essentials.jl:892
 [35] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base ./essentials.jl:889
 [36] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/packages/VSCodeServer/src/eval.jl:271
 [37] (::VSCodeServer.var"#69#74"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/packages/VSCodeServer/src/eval.jl:181
 [38] withpath(f::VSCodeServer.var"#69#74"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/packages/VSCodeServer/src/repl.jl:276
 [39] (::VSCodeServer.var"#68#73"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/packages/VSCodeServer/src/eval.jl:179
 [40] hideprompt(f::VSCodeServer.var"#68#73"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/packages/VSCodeServer/src/repl.jl:38
 [41] (::VSCodeServer.var"#67#72"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/packages/VSCodeServer/src/eval.jl:150
 [42] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:515
 [43] with_logger
    @ ./logging.jl:627 [inlined]
 [44] (::VSCodeServer.var"#66#71"{VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/packages/VSCodeServer/src/eval.jl:263
 [45] #invokelatest#2
    @ ./essentials.jl:892 [inlined]
 [46] invokelatest(::Any)
    @ Base ./essentials.jl:889
 [47] (::VSCodeServer.var"#64#65")()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.140.2/scripts/packages/VSCodeServer/src/eval.jl:34
in expression starting at /home/aquarelle/CRNN/CRNN_2_reac_consec_v2.jl:189

```

---

<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:** [June 1, 2025, 7:42pm UTC](https://discourse.julialang.org/t/resolved-error-scimlsensitivity/129531/4 "2025-06-01T19:42:35Z")

</div>

And your p is a custom struct that isn’t compatible as the message states. We should update it to mention the SciMLStructures interface though, see

> **[An example implementation of the interface · SciMLStructures.jl](https://docs.sciml.ai/SciMLStructures/stable/example/)**
>
> Documentation for SciMLStructures.jl.

Does this make sense?

---

<div class="post-metadata">

**Author:** ![aquarelleX332](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aquarellex332/32/21048_2.png) [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Post date:** [June 1, 2025, 7:48pm UTC](https://discourse.julialang.org/t/resolved-error-scimlsensitivity/129531/5 "2025-06-01T19:48:29Z")

</div>

Yes. Thank you for your help Chris.  
I’m going to try to change my approach to the problem I’ve set myself.

---

<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:** [June 1, 2025, 11:09pm UTC](https://discourse.julialang.org/t/resolved-error-scimlsensitivity/129531/6 "2025-06-01T23:09:32Z")

</div>

okay let me know if these docs need any updating.

> <https://github.com/SciML/SciMLSensitivity.jl/blob/master/src/sensitivity_interface.jl#L16-L18>

Also, updated the error message to point to the structures interface now.

---

<div class="post-metadata">

**Author:** ![aquarelleX332](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aquarellex332/32/21048_2.png) [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Post date:** [June 2, 2025, 8:19am UTC](https://discourse.julialang.org/t/resolved-error-scimlsensitivity/129531/7 "2025-06-02T08:19:49Z")

</div>

The sensitivity\_interface.jl code looks great.  
It is clever to get the error message pointing to the structures interface.  
Many thanks Chris.

By the way I’ve managed to make an error-free program, although I’ll have to adapt the CRNN parameters for a physically plausible result. Later today, I’ll provide a link to the code.

---

<div class="post-metadata">

**Author:** ![aquarelleX332](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aquarellex332/32/21048_2.png) [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Post date:** [June 3, 2025, 9:00am UTC](https://discourse.julialang.org/t/resolved-error-scimlsensitivity/129531/8 "2025-06-03T09:00:43Z")

</div>

Finally the [code as follows](https://github.com/aquarelleX332/Sandbox/blob/main/CRNN_3_reagents_4reactions.jl) was developped.  
This code is based on the interpolation of basic functions with oscillations. I didn’t succeed with the ODEs.  
Graphics are obtained as follows:

 ![crnn_interpolation_fonctions](https://global.discourse-cdn.com/julialang/original/3X/9/b/9b2b321ebb4f75ef19e94d2691d7aca95aa23366.png)

Not sure if the code is optimized (of course). It is my first CRNN 🙂
