Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct access of DESolution fields during Zygote differentiation #321

Closed
seadra opened this issue Jun 19, 2020 · 14 comments
Closed

Direct access of DESolution fields during Zygote differentiation #321

seadra opened this issue Jun 19, 2020 · 14 comments

Comments

@seadra
Copy link

seadra commented Jun 19, 2020

solve does work:

using DifferentialEquations, Flux, Optim, DiffEqFlux, DiffEqSensitivity, Plots, OrdinaryDiffEq, Zygote, StaticArrays, LinearAlgebra

A = [0. 1.; 1. 0.; 0 0; 0 0];
B = [1. 0.; 0. 1.; 0 0; 0 0];

utarget = A;
const T = 10.0;

function f(u, p, t)
    return -p[1]*u # just a silly example to demonstrate the issue
end


u0 = [1.0 0.0; 0.0 1.0; 0.0 0.0; 0.0 0.0];

tspan = (0.0, T)
tsteps = 0.0:T/100.0:T

p = [1.7, 1.0, 3.0, 1.0]

prob_ode = ODEProblem(f, u0, tspan, p);
sol_ode = solve(prob_ode, Tsit5());

using Plots
plot(sol_ode)

Trying to use sciml_train fails

function predict_adjoint(p)
  return solve(prob_ode, Tsit5(), p=p)
end

function loss_adjoint(p)
    prediction = predict_adjoint(p)
    usol = last(prediction.u)
    loss = 1.0 - tr(usol*utarget')/2
    return loss
end

DiffEqFlux.sciml_train(loss_adjoint, p, BFGS(initial_stepnorm = 0.0001))

with the error:

MethodError: no method matching size(::NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}})
Closest candidates are:
size(!Matched::BitArray{1}) at bitarray.jl:99
size(!Matched::BitArray{1}, !Matched::Integer) at bitarray.jl:103
size(!Matched::Core.Compiler.StmtRange) at show.jl:1845

Full stacktrace Stacktrace: [1] (::DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon})(::SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}, ::Array{Float64,2}, ::Array{Float64,1}, ::Float64, ::Int64) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/concrete_solve.jl:105 [2] (::DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}})(::OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Nothing,Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(opnorm),CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Tuple{}},Array{Float64,1},Float64,Nothing,OrdinaryDiffEq.DefaultInit}) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/adjoint_common.jl:277 [3] (::DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}})(::OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Nothing,Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(opnorm),CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Tuple{}},Array{Float64,1},Float64,Nothing,OrdinaryDiffEq.DefaultInit}) at /home/user/.julia/packages/DiffEqCallbacks/N6mXi/src/iterative_and_periodic.jl:12 [4] #35 at /home/user/.julia/packages/DiffEqCallbacks/N6mXi/src/iterative_and_periodic.jl:42 [inlined] [5] initialize! at /home/user/.julia/packages/DiffEqBase/LGnTa/src/callbacks.jl:325 [inlined] [6] initialize! at /home/user/.julia/packages/DiffEqBase/LGnTa/src/callbacks.jl:315 [inlined] [7] initialize_callbacks!(::OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Nothing,Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(opnorm),CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Tuple{}},Array{Float64,1},Float64,Nothing,OrdinaryDiffEq.DefaultInit}, ::Bool) at /home/user/.julia/packages/OrdinaryDiffEq/NsugH/src/solve.jl:520 [8] __init(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}}}},DiffEqBase.StandardODEProblem}, ::Tsit5, ::Tuple{}, ::Tuple{}, ::Tuple{}, ::Type{Val{true}}; saveat::Array{Float64,1}, tstops::Array{Float64,1}, d_discontinuities::Tuple{}, save_idxs::Nothing, save_everystep::Bool, save_on::Bool, save_start::Bool, save_end::Bool, callback::CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}, dense::Bool, calck::Bool, dt::Float64, dtmin::Nothing, dtmax::Float64, force_dtmin::Bool, adaptive::Bool, gamma::Rational{Int64}, abstol::Float64, reltol::Float64, qmin::Rational{Int64}, qmax::Int64, qsteady_min::Int64, qsteady_max::Int64, qoldinit::Rational{Int64}, fullnormalize::Bool, failfactor::Int64, beta1::Nothing, beta2::Nothing, maxiters::Int64, internalnorm::typeof(DiffEqBase.ODE_DEFAULT_NORM), internalopnorm::typeof(opnorm), isoutofdomain::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), unstable_check::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), verbose::Bool, timeseries_errors::Bool, dense_errors::Bool, advance_to_tstop::Bool, stop_at_next_tstop::Bool, initialize_save::Bool, progress::Bool, progress_steps::Int64, progress_name::String, progress_message::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), userdata::Nothing, allow_extrapolation::Bool, initialize_integrator::Bool, alias_u0::Bool, alias_du0::Bool, initializealg::OrdinaryDiffEq.DefaultInit, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/user/.julia/packages/OrdinaryDiffEq/NsugH/src/solve.jl:402 [9] #__solve#360 at /home/user/.julia/packages/OrdinaryDiffEq/NsugH/src/solve.jl:4 [inlined] [10] solve_call(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}}}},DiffEqBase.StandardODEProblem}, ::Tsit5; merge_callbacks::Bool, kwargs::Base.Iterators.Pairs{Symbol,Any,NTuple{6,Symbol},NamedTuple{(:save_everystep, :save_start, :saveat, :tstops, :abstol, :reltol),Tuple{Bool,Bool,Array{Float64,1},Array{Float64,1},Float64,Float64}}}) at /home/user/.julia/packages/DiffEqBase/LGnTa/src/solve.jl:96 [11] #solve_up#454 at /home/user/.julia/packages/DiffEqBase/LGnTa/src/solve.jl:122 [inlined] [12] #solve#453 at /home/user/.julia/packages/DiffEqBase/LGnTa/src/solve.jl:106 [inlined] [13] _adjoint_sensitivities(::ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats}, ::InterpolatingAdjoint{0,true,Val{:central},Bool}, ::Tsit5, ::DiffEqSensitivity.var"#df#126"{NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Array{Float64,2},Colon}, ::Array{Float64,1}, ::Nothing; abstol::Float64, reltol::Float64, checkpoints::Array{Float64,1}, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/sensitivity_interface.jl:21 [14] _adjoint_sensitivities(::ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats}, ::InterpolatingAdjoint{0,true,Val{:central},Bool}, ::Tsit5, ::Function, ::Array{Float64,1}, ::Nothing) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/sensitivity_interface.jl:13 (repeats 2 times) [15] adjoint_sensitivities(::ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats}, ::Tsit5, ::Vararg{Any,N} where N; sensealg::InterpolatingAdjoint{0,true,Val{:central},Bool}, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/sensitivity_interface.jl:6 [16] (::DiffEqSensitivity.var"#adjoint_sensitivity_backpass#125"{Tsit5,InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},Array{Float64,1},Tuple{},Colon})(::NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}}) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/concrete_solve.jl:113 [17] #521#back at /home/user/.julia/packages/ZygoteRules/6nssF/src/adjoint.jl:49 [inlined] [18] #175 at /home/user/.julia/packages/Zygote/z3bQd/src/lib/lib.jl:182 [inlined] [19] (::Zygote.var"#347#back#177"{Zygote.var"#175#176"{DiffEqBase.var"#521#back#466"{DiffEqSensitivity.var"#adjoint_sensitivity_backpass#125"{Tsit5,InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},Array{Float64,1},Tuple{},Colon}},Tuple{NTuple{4,Nothing},Tuple{Nothing}}}})(::NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}}) at /home/user/.julia/packages/ZygoteRules/6nssF/src/adjoint.jl:49 [20] #solve#453 at /home/user/.julia/packages/DiffEqBase/LGnTa/src/solve.jl:106 [inlined] [21] (::typeof(∂(#solve#453)))(::NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}}) at /home/user/.julia/packages/Zygote/z3bQd/src/compiler/interface2.jl:0 [22] (::Zygote.var"#175#176"{typeof(∂(#solve#453)),Tuple{NTuple{6,Nothing},Tuple{Nothing}}})(::NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}}) at /home/user/.julia/packages/Zygote/z3bQd/src/lib/lib.jl:182 [23] (::Zygote.var"#347#back#177"{Zygote.var"#175#176"{typeof(∂(#solve#453)),Tuple{NTuple{6,Nothing},Tuple{Nothing}}}})(::NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}}) at /home/user/.julia/packages/ZygoteRules/6nssF/src/adjoint.jl:49 [24] (::typeof(∂(solve##kw)))(::NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}}) at /home/user/.julia/packages/Zygote/z3bQd/src/compiler/interface2.jl:0 [25] predict_adjoint at /home/user/train.jl:28 [inlined] [26] (::typeof(∂(predict_adjoint)))(::NamedTuple{(:u, :u_analytic, :errors, :t, :k, :prob, :alg, :interp, :dense, :tslocation, :destats, :retcode),Tuple{Array{Union{Nothing, Array{Float64,2}},1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}}) at /home/user/.julia/packages/Zygote/z3bQd/src/compiler/interface2.jl:0 [27] loss_adjoint at /home/user/train.jl:32 [inlined] [28] (::Zygote.var"#175#176"{typeof(∂(loss_adjoint)),Tuple{Tuple{Nothing},Int64}})(::Int64) at /home/user/.julia/packages/Zygote/z3bQd/src/lib/lib.jl:182 [29] (::Zygote.var"#347#back#177"{Zygote.var"#175#176"{typeof(∂(loss_adjoint)),Tuple{Tuple{Nothing},Int64}}})(::Int64) at /home/user/.julia/packages/ZygoteRules/6nssF/src/adjoint.jl:49 [30] #43 at /home/user/.julia/packages/DiffEqFlux/61JUC/src/train.jl:176 [inlined] [31] (::typeof(∂(λ)))(::Int64) at /home/user/.julia/packages/Zygote/z3bQd/src/compiler/interface2.jl:0 [32] #37 at /home/user/.julia/packages/Zygote/z3bQd/src/compiler/interface.jl:45 [inlined] [33] (::DiffEqFlux.var"#46#59"{DiffEqFlux.var"#43#56"{typeof(loss_adjoint)}})(::Array{Float64,1}, ::Array{Float64,1}) at /home/user/.julia/packages/DiffEqFlux/61JUC/src/train.jl:199 [34] value_gradient!!(::TwiceDifferentiable{Float64,Array{Float64,1},Array{Float64,2},Array{Float64,1}}, ::Array{Float64,1}) at /home/user/.julia/packages/NLSolversBase/mGaJg/src/interface.jl:82 [35] initial_state(::BFGS{LineSearches.InitialStatic{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Nothing,Float64,Flat}, ::Optim.Options{Float64,DiffEqFlux.var"#_cb#55"{DiffEqFlux.var"#53#66",Base.Iterators.Cycle{Tuple{DiffEqFlux.NullData}}}}, ::TwiceDifferentiable{Float64,Array{Float64,1},Array{Float64,2},Array{Float64,1}}, ::Array{Float64,1}) at /home/user/.julia/packages/Optim/L5T76/src/multivariate/solvers/first_order/bfgs.jl:66 [36] optimize(::TwiceDifferentiable{Float64,Array{Float64,1},Array{Float64,2},Array{Float64,1}}, ::Array{Float64,1}, ::BFGS{LineSearches.InitialStatic{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Nothing,Float64,Flat}, ::Optim.Options{Float64,DiffEqFlux.var"#_cb#55"{DiffEqFlux.var"#53#66",Base.Iterators.Cycle{Tuple{DiffEqFlux.NullData}}}}) at /home/user/.julia/packages/Optim/L5T76/src/multivariate/optimize/optimize.jl:33 [37] sciml_train(::Function, ::Array{Float64,1}, ::BFGS{LineSearches.InitialStatic{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Nothing,Float64,Flat}, ::Base.Iterators.Cycle{Tuple{DiffEqFlux.NullData}}; cb::Function, maxiters::Int64, diffmode::DiffEqFlux.ZygoteDiffMode, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/user/.julia/packages/DiffEqFlux/61JUC/src/train.jl:269 [38] sciml_train at /home/user/.julia/packages/DiffEqFlux/61JUC/src/train.jl:163 [inlined] (repeats 2 times) [39] top-level scope at /home/user/train.jl:38 in expression starting at /home/user/train.jl:38
@ChrisRackauckas
Copy link
Member

]st -m?

@seadra
Copy link
Author

seadra commented Jun 19, 2020

Thanks again for the quick response!

Status `~/.julia/environments/v1.4/Manifest.toml`
  [c3fe647b] AbstractAlgebra v0.9.2
  [621f4979] AbstractFFTs v0.5.0
  [1520ce14] AbstractTrees v0.3.3
  [79e6a3ab] Adapt v1.1.0
  [ec485272] ArnoldiMethod v0.0.4
  [7d9fca2a] Arpack v0.4.0
  [68821587] Arpack_jll v3.5.0+3
  [4fba245c] ArrayInterface v2.8.7
  [4c555306] ArrayLayouts v0.3.4
  [aae01518] BandedMatrices v0.15.12
  [6e4b80f9] BenchmarkTools v0.5.0
  [b99e7846] BinaryProvider v0.5.10
  [a134a8b2] BlackBoxOptim v0.5.0
  [764a87c0] BoundaryValueDiffEq v2.5.0
  [6e34b625] Bzip2_jll v1.0.6+2
  [fa961155] CEnum v0.3.0
  [a9c8d775] CPUTime v1.0.0
  [3895d2a7] CUDAapi v4.0.0
  [c5f51814] CUDAdrv v6.3.0
  [be33ccc6] CUDAnative v3.1.0
  [a603d957] CanonicalTraits v0.2.1
  [082447d4] ChainRules v0.6.4
  [d360d2e6] ChainRulesCore v0.8.0
  [da1fd8a2] CodeTracking v1.0.0
  [944b1d66] CodecZlib v0.7.0
  [35d6a980] ColorSchemes v3.9.0
  [3da002f7] ColorTypes v0.10.4
  [5ae59095] Colors v0.12.2
  [861a8166] Combinatorics v1.0.2
  [bbf7d656] CommonSubexpressions v0.2.0
  [34da2185] Compat v3.12.0
  [e66e0078] CompilerSupportLibraries_jll v0.3.3+0
  [8f4d0f93] Conda v1.4.1
  [88cd18e8] ConsoleProgressMonitor v0.1.2
  [187b0558] ConstructionBase v1.0.0
  [d38c429a] Contour v0.5.3
  [adafc99b] CpuId v0.2.2
  [a8cc5b0e] Crayons v4.0.2
  [f68482b8] Cthulhu v1.1.2
  [3a865a2d] CuArrays v2.2.1
  [9a962f9c] DataAPI v1.3.0
  [864edb3b] DataStructures v0.17.18
  [e2d170a0] DataValueInterfaces v1.0.0
  [bcd4f6db] DelayDiffEq v5.24.1
  [2b5f629d] DiffEqBase v6.38.4
  [459566f4] DiffEqCallbacks v2.13.3
  [5a0ffddc] DiffEqFinancial v2.3.0
  [aae7a2af] DiffEqFlux v1.13.0
  [c894b116] DiffEqJump v6.9.2
  [77a26b50] DiffEqNoiseProcess v4.2.0
  [055956cb] DiffEqPhysics v3.2.0
  [41bf760c] DiffEqSensitivity v6.21.1
  [163ba53b] DiffResults v1.0.2
  [b552c78f] DiffRules v1.0.1
  [0c46a032] DifferentialEquations v6.14.0
  [c619ae07] DimensionalPlotRecipes v1.2.0
  [b4f34e82] Distances v0.8.2
  [31c24e10] Distributions v0.23.4
  [ffbed154] DocStringExtensions v0.8.2
  [d4d017d3] ExponentialUtilities v1.6.0
  [e2ba6199] ExprTools v0.1.1
  [c87230d0] FFMPEG v0.3.0
  [b22a6f82] FFMPEG_jll v4.1.0+3
  [7a1cc6ca] FFTW v1.2.2
  [f5851436] FFTW_jll v3.3.9+5
  [1a297f60] FillArrays v0.8.11
  [6a86dc24] FiniteDiff v2.3.2
  [53c48c17] FixedPointNumbers v0.8.1
  [587475ba] Flux v0.10.4
  [59287772] Formatting v0.4.1
  [f6369f11] ForwardDiff v0.10.10
  [d7e528f0] FreeType2_jll v2.10.1+2
  [559328eb] FriBidi_jll v1.0.5+3
  [069b7b12] FunctionWrappers v1.1.1
  [0c68f7d7] GPUArrays v3.4.1
  [61eb1bfa] GPUCompiler v0.2.0
  [28b8d3ca] GR v0.50.1
  [6b9d7cbe] GeneralizedGenerated v0.2.4
  [01680d73] GenericSVD v0.3.0
  [4d00f742] GeometryTypes v0.8.3
  [cd3eb016] HTTP v0.8.15
  [f0d1745a] HalfIntegers v1.1.2
  [7073ff75] IJulia v1.21.2
  [7869d1d1] IRTools v0.4.0
  [d25df0c9] Inflate v0.1.2
  [83e8ac13] IniFile v0.5.0
  [1d5cc7b8] IntelOpenMP_jll v2018.0.3+0
  [42fd0dbc] IterativeSolvers v0.8.4
  [82899510] IteratorInterfaceExtensions v1.0.0
  [682c06a0] JSON v0.21.0
  [b14d175d] JuliaVariables v0.2.0
  [e5e0dc1b] Juno v0.8.2
  [c1c5ebd0] LAME_jll v3.100.0+1
  [929cbde3] LLVM v1.5.2
  [b964fa9f] LaTeXStrings v1.1.0
  [2ee39098] LabelledArrays v1.2.2
  [23fbe1c1] Latexify v0.13.5
  [a5e1c1ea] LatinHypercubeSampling v1.6.4
  [1d6d02ad] LeftChildRightSiblingTrees v0.1.2
  [dd192d2f] LibVPX_jll v1.8.1+1
  [093fc24a] LightGraphs v1.3.3
  [d3d80556] LineSearches v7.0.1
  [e6f89c97] LoggingExtras v0.4.1
  [bdcacae8] LoopVectorization v0.8.5
  [d00139f3] METIS_jll v5.1.0+4
  [856f044c] MKL_jll v2020.1.216+0
  [d8e11817] MLStyle v0.3.1
  [1914dd2f] MacroTools v0.5.5
  [fdba3010] MathProgBase v0.7.8
  [739be429] MbedTLS v1.0.2
  [c8ffd9c3] MbedTLS_jll v2.16.0+2
  [442fdcdd] Measures v0.3.1
  [e89f7d12] Media v0.5.0
  [e1d29d7a] Missings v0.4.3
  [961ee093] ModelingToolkit v3.10.2
  [46d2c3a1] MuladdMacro v0.2.2
  [f9640e96] MultiScaleArrays v1.8.1
  [d41bc354] NLSolversBase v7.6.1
  [76087f3c] NLopt v0.6.0
  [079eb43e] NLopt_jll v2.6.2+0
  [2774e3e8] NLsolve v4.4.0
  [872c559c] NNlib v0.6.6
  [77ba4419] NaNMath v0.3.3
  [71a1bf82] NameResolution v0.1.3
  [6fe1bfb0] OffsetArrays v1.1.0
  [e7412a2a] Ogg_jll v1.3.4+0
  [4536629a] OpenBLAS_jll v0.3.9+4
  [458c3c95] OpenSSL_jll v1.1.1+3
  [efe28fd5] OpenSpecFun_jll v0.5.3+3
  [429524aa] Optim v0.21.0
  [91d4177d] Opus_jll v1.3.1+1
  [bac558e1] OrderedCollections v1.2.0
  [1dea7af3] OrdinaryDiffEq v5.41.0
  [90014a1f] PDMats v0.9.12
  [65888b18] ParameterizedFunctions v5.3.0
  [d96e819e] Parameters v0.12.1
  [69de0a69] Parsers v1.0.5
  [ccf2f8ad] PlotThemes v2.0.0
  [995b91a9] PlotUtils v1.0.5
  [91a5bcdd] Plots v1.4.3
  [e409e4f3] PoissonRandom v0.4.0
  [85a6dd25] PositiveFactorizations v0.2.3
  [8162dcfd] PrettyPrint v0.1.0
  [08abe8d2] PrettyTables v0.9.1
  [27ebfcd6] Primes v0.4.0
  [33c8b6b6] ProgressLogging v0.1.3
  [92933f4c] ProgressMeter v1.3.1
  [438e738f] PyCall v1.91.4
  [d330b81b] PyPlot v2.9.0
  [1fd47b50] QuadGK v2.3.1
  [6e0679c1] QuantumOptics v0.8.1
  [4f57444f] QuantumOpticsBase v0.2.1
  [8a4e6c94] QuasiMonteCarlo v0.2.0
  [e6cf234a] RandomNumbers v1.4.0
  [308eb6b3] RationalRoots v0.1.0
  [3cdcf5f2] RecipesBase v1.0.1
  [01d81517] RecipesPipeline v0.1.10
  [731186ca] RecursiveArrayTools v2.4.4
  [f2c3362d] RecursiveFactorization v0.1.2
  [189a3867] Reexport v0.2.0
  [ae029012] Requires v1.0.1
  [ae5879a3] ResettableStacks v1.0.0
  [37e2e3b7] ReverseDiff v1.2.0
  [79098fc4] Rmath v0.6.1
  [f50d1b31] Rmath_jll v0.2.2+1
  [f2b01f46] Roots v1.0.2
  [21efa798] SIMDPirates v0.8.7
  [476501e8] SLEEFPirates v0.5.1
  [1bc83da4] SafeTestsets v0.0.1
  [992d4aef] Showoff v0.3.1
  [699a6c99] SimpleTraits v0.9.2
  [ed01d8cd] Sobol v1.4.0
  [b85f4697] SoftGlobalScope v1.0.10
  [a2af1166] SortingAlgorithms v0.3.1
  [47a9eef4] SparseDiffTools v1.9.0
  [d4ead438] SpatialIndexing v0.1.2
  [276daf66] SpecialFunctions v0.10.3
  [90137ffa] StaticArrays v0.12.3
  [2913bbd2] StatsBase v0.33.0
  [4c63d2b9] StatsFuns v0.9.5
  [9672c7b4] SteadyStateDiffEq v1.5.1
  [789caeaf] StochasticDiffEq v6.23.1
  [bea87d4a] SuiteSparse_jll v5.4.0+8
  [c3572dad] Sundials v4.2.3
  [fb77eaff] Sundials_jll v5.2.0+0
  [d1185830] SymbolicUtils v0.3.4
  [3783bdb8] TableTraits v1.0.0
  [bd369af6] Tables v1.0.4
  [5d786b92] TerminalLoggers v0.1.2
  [a759f4b9] TimerOutputs v0.5.6
  [9f7883ad] Tracker v0.2.6
  [3bb67fe8] TranscodingStreams v0.9.5
  [a2a6695c] TreeViews v0.3.0
  [3a884ed6] UnPack v1.0.1
  [1986cc42] Unitful v1.2.1
  [3d5dd08c] VectorizationBase v0.12.8
  [81def892] VersionParsing v1.2.0
  [19fa3120] VertexSafeGraphs v0.1.2
  [9f57e263] WignerSymbols v1.1.0
  [c2297ded] ZMQ v1.2.1
  [8f1865be] ZeroMQ_jll v4.3.2+4
  [a5390f91] ZipFile v0.9.2
  [83775a58] Zlib_jll v1.2.11+11
  [e88e6eb3] Zygote v0.4.21
  [700de1a5] ZygoteRules v0.2.0
  [0ac62f75] libass_jll v0.14.0+2
  [f638f0a6] libfdk_aac_jll v0.1.6+2
  [f27f6e37] libvorbis_jll v1.3.6+4
  [1270edf5] x264_jll v2019.5.25+2
  [dfaa095f] x265_jll v3.0.0+1
  [2a0f44e3] Base64 
  [ade2ca70] Dates 
  [8bb1440f] DelimitedFiles 
  [8ba89e20] Distributed 
  [7b1f6079] FileWatching 
  [9fa8497b] Future 
  [b77e0a4c] InteractiveUtils 
  [76f85450] LibGit2 
  [8f399da3] Libdl 
  [37e2e46d] LinearAlgebra 
  [56ddb016] Logging 
  [d6f4376e] Markdown 
  [a63ad114] Mmap 
  [44cfe95a] Pkg 
  [de0858da] Printf 
  [9abbd945] Profile 
  [3fa0cd96] REPL 
  [9a3f8284] Random 
  [ea8e919c] SHA 
  [9e88b42a] Serialization 
  [1a1011a3] SharedArrays 
  [6462fe0b] Sockets 
  [2f01184e] SparseArrays 
  [10745b16] Statistics 
  [4607b0f0] SuiteSparse 
  [8dfed614] Test 
  [cf7118a7] UUIDs 
  [4ec0a83e] Unicode

@ChrisRackauckas
Copy link
Member

Did you try a new REPL session?

@seadra
Copy link
Author

seadra commented Jun 19, 2020

I was using it via jupyter-lab. I just restarted jupyter-lab and re-run the code above, but it resulted in the same error.

@ChrisRackauckas
Copy link
Member

Then I'm not sure what's going on. That error shouldn't happen with that version of DiffEqBase.

@seadra
Copy link
Author

seadra commented Jun 19, 2020

I tried on a different computer with the same results.

Could you try the example on your own computer?

@seadra
Copy link
Author

seadra commented Jun 19, 2020

I updated the original post at the top with the full stack trace information, it case it helps. But this issue definitely happens with DiffEqBase v6.38.4.

As an additional check, I placed the julia code in the original post in a file train.jl and tried running julia train.jl from shell. It panics with the same error.

@ChrisRackauckas
Copy link
Member

Oh, I'm not sure what the .u was for.

function loss_adjoint(p)
    prediction = predict_adjoint(p)
    usol = last(prediction)
    loss = 1.0 - tr(usol*utarget')/2
    return loss
end

works fine.

@ChrisRackauckas
Copy link
Member

We can add adjoint overloads for the DEFunction getproperty calls, but that shouldn't be necessary in most cases? We can keep the issue open for that though

@ChrisRackauckas ChrisRackauckas changed the title Train fails for real matrix ODEs Direct access of DESolution fields during Zygote differentiation Jun 19, 2020
@seadra
Copy link
Author

seadra commented Jun 19, 2020

I was trying to get the solution at the final time, but indeed, last(prediction) gives the same answer.

I removed .u as you did and re-run the code, but now it fails with a different error:

DimensionMismatch("array could not be broadcast to match destination")

Stacktrace:
 [1] check_broadcast_shape(::Tuple{Base.OneTo{Int64}}, ::Tuple{Base.OneTo{Int64},Base.OneTo{Int64}}) at ./broadcast.jl:509
 [2] check_broadcast_axes at /home/user/.julia/packages/DiffEqBase/LGnTa/src/diffeqfastbc.jl:26 [inlined]
 [3] instantiate at ./broadcast.jl:259 [inlined]
 [4] materialize! at ./broadcast.jl:823 [inlined]
...
Full stack trace ERROR: LoadError: DimensionMismatch("array could not be broadcast to match destination") Stacktrace: [1] check_broadcast_shape(::Tuple{Base.OneTo{Int64}}, ::Tuple{Base.OneTo{Int64},Base.OneTo{Int64}}) at ./broadcast.jl:509 [2] check_broadcast_axes at /home/user/.julia/packages/DiffEqBase/LGnTa/src/diffeqfastbc.jl:26 [inlined] [3] instantiate at ./broadcast.jl:259 [inlined] [4] materialize! at ./broadcast.jl:823 [inlined] [5] (::DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon})(::SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}, ::Array{Float64,2}, ::Array{Float64,1}, ::Float64, ::Int64) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/concrete_solve.jl:97 [6] (::DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}})(::OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Nothing,Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(opnorm),CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Tuple{}},Array{Float64,1},Float64,Nothing,OrdinaryDiffEq.DefaultInit}) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/adjoint_common.jl:277 [7] (::DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}})(::OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Nothing,Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(opnorm),CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Tuple{}},Array{Float64,1},Float64,Nothing,OrdinaryDiffEq.DefaultInit}) at /home/user/.julia/packages/DiffEqCallbacks/N6mXi/src/iterative_and_periodic.jl:12 [8] #35 at /home/user/.julia/packages/DiffEqCallbacks/N6mXi/src/iterative_and_periodic.jl:42 [inlined] [9] initialize! at /home/user/.julia/packages/DiffEqBase/LGnTa/src/callbacks.jl:325 [inlined] [10] initialize! at /home/user/.julia/packages/DiffEqBase/LGnTa/src/callbacks.jl:315 [inlined] [11] initialize_callbacks!(::OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Nothing,Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(opnorm),CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Tuple{}},Array{Float64,1},Float64,Nothing,OrdinaryDiffEq.DefaultInit}, ::Bool) at /home/user/.julia/packages/OrdinaryDiffEq/NsugH/src/solve.jl:520 [12] __init(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}}}},DiffEqBase.StandardODEProblem}, ::Tsit5, ::Tuple{}, ::Tuple{}, ::Tuple{}, ::Type{Val{true}}; saveat::Array{Float64,1}, tstops::Array{Float64,1}, d_discontinuities::Tuple{}, save_idxs::Nothing, save_everystep::Bool, save_on::Bool, save_start::Bool, save_end::Bool, callback::CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}, dense::Bool, calck::Bool, dt::Float64, dtmin::Nothing, dtmax::Float64, force_dtmin::Bool, adaptive::Bool, gamma::Rational{Int64}, abstol::Float64, reltol::Float64, qmin::Rational{Int64}, qmax::Int64, qsteady_min::Int64, qsteady_max::Int64, qoldinit::Rational{Int64}, fullnormalize::Bool, failfactor::Int64, beta1::Nothing, beta2::Nothing, maxiters::Int64, internalnorm::typeof(DiffEqBase.ODE_DEFAULT_NORM), internalopnorm::typeof(opnorm), isoutofdomain::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), unstable_check::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), verbose::Bool, timeseries_errors::Bool, dense_errors::Bool, advance_to_tstop::Bool, stop_at_next_tstop::Bool, initialize_save::Bool, progress::Bool, progress_steps::Int64, progress_name::String, progress_message::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), userdata::Nothing, allow_extrapolation::Bool, initialize_integrator::Bool, alias_u0::Bool, alias_du0::Bool, initializealg::OrdinaryDiffEq.DefaultInit, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/user/.julia/packages/OrdinaryDiffEq/NsugH/src/solve.jl:402 [13] #__solve#360 at /home/user/.julia/packages/OrdinaryDiffEq/NsugH/src/solve.jl:4 [inlined] [14] solve_call(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,DiffEqSensitivity.ODEInterpolatingAdjointSensitivityFunction{DiffEqSensitivity.AdjointDiffCache{Nothing,Nothing,Nothing,Nothing,Nothing,Array{Float64,1},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool}},InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats},Nothing,ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqCallbacks.var"#33#36"{Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}},DiffEqCallbacks.var"#35#38"{typeof(DiffEqBase.INITIALIZE_DEFAULT),Bool,DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},Base.RefValue{Union{Nothing, Float64}},DiffEqCallbacks.var"#34#37"{DiffEqSensitivity.var"#88#90"{Base.RefValue{Int64},Array{Float64,1}},DiffEqSensitivity.var"#89#91"{DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon},InterpolatingAdjoint{0,true,Val{:central},Bool},Base.OneTo{Int64},UnitRange{Int64},UniformScaling{Bool},Bool,Nothing,Nothing,Nothing,Nothing,Bool,Array{Float64,1},Array{Float64,1},Array{Float64,2},Base.RefValue{Int64},Int64,UniformScaling{Bool}},Base.RefValue{Union{Nothing, Float64}}}}}}}}}},DiffEqBase.StandardODEProblem}, ::Tsit5; merge_callbacks::Bool, kwargs::Base.Iterators.Pairs{Symbol,Any,NTuple{6,Symbol},NamedTuple{(:save_everystep, :save_start, :saveat, :tstops, :abstol, :reltol),Tuple{Bool,Bool,Array{Float64,1},Array{Float64,1},Float64,Float64}}}) at /home/user/.julia/packages/DiffEqBase/LGnTa/src/solve.jl:96 [15] #solve_up#454 at /home/user/.julia/packages/DiffEqBase/LGnTa/src/solve.jl:122 [inlined] [16] #solve#453 at /home/user/.julia/packages/DiffEqBase/LGnTa/src/solve.jl:106 [inlined] [17] _adjoint_sensitivities(::ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats}, ::InterpolatingAdjoint{0,true,Val{:central},Bool}, ::Tsit5, ::DiffEqSensitivity.var"#df#126"{Array{Array{Float64,2},1},Array{Float64,2},Colon}, ::Array{Float64,1}, ::Nothing; abstol::Float64, reltol::Float64, checkpoints::Array{Float64,1}, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/sensitivity_interface.jl:21 [18] _adjoint_sensitivities(::ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats}, ::InterpolatingAdjoint{0,true,Val{:central},Bool}, ::Tsit5, ::Function, ::Array{Float64,1}, ::Nothing) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/sensitivity_interface.jl:13 (repeats 2 times) [19] adjoint_sensitivities(::ODESolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},false,Array{Float64,1},ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{false,typeof(f),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DiffEqBase.DEStats}, ::Tsit5, ::Vararg{Any,N} where N; sensealg::InterpolatingAdjoint{0,true,Val{:central},Bool}, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/sensitivity_interface.jl:6 [20] (::DiffEqSensitivity.var"#adjoint_sensitivity_backpass#125"{Tsit5,InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},Array{Float64,1},Tuple{},Colon})(::Array{Array{Float64,2},1}) at /home/user/.julia/packages/DiffEqSensitivity/XiKOH/src/local_sensitivity/concrete_solve.jl:113 [21] #521#back at /home/user/.julia/packages/ZygoteRules/6nssF/src/adjoint.jl:49 [inlined] [22] #175 at /home/user/.julia/packages/Zygote/z3bQd/src/lib/lib.jl:182 [inlined] [23] (::Zygote.var"#347#back#177"{Zygote.var"#175#176"{DiffEqBase.var"#521#back#466"{DiffEqSensitivity.var"#adjoint_sensitivity_backpass#125"{Tsit5,InterpolatingAdjoint{0,true,Val{:central},Bool},Array{Float64,2},Array{Float64,1},Tuple{},Colon}},Tuple{NTuple{4,Nothing},Tuple{Nothing}}}})(::Array{Array{Float64,2},1}) at /home/user/.julia/packages/ZygoteRules/6nssF/src/adjoint.jl:49 [24] #solve#453 at /home/user/.julia/packages/DiffEqBase/LGnTa/src/solve.jl:106 [inlined] [25] (::typeof(∂(#solve#453)))(::Array{Array{Float64,2},1}) at /home/user/.julia/packages/Zygote/z3bQd/src/compiler/interface2.jl:0 [26] (::Zygote.var"#175#176"{typeof(∂(#solve#453)),Tuple{NTuple{6,Nothing},Tuple{Nothing}}})(::Array{Array{Float64,2},1}) at /home/user/.julia/packages/Zygote/z3bQd/src/lib/lib.jl:182 [27] (::Zygote.var"#347#back#177"{Zygote.var"#175#176"{typeof(∂(#solve#453)),Tuple{NTuple{6,Nothing},Tuple{Nothing}}}})(::Array{Array{Float64,2},1}) at /home/user/.julia/packages/ZygoteRules/6nssF/src/adjoint.jl:49 [28] (::typeof(∂(solve##kw)))(::Array{Array{Float64,2},1}) at /home/user/.julia/packages/Zygote/z3bQd/src/compiler/interface2.jl:0 [29] predict_adjoint at /home/user/train.jl:28 [inlined] [30] (::typeof(∂(predict_adjoint)))(::Array{Array{Float64,2},1}) at /home/user/.julia/packages/Zygote/z3bQd/src/compiler/interface2.jl:0 [31] loss_adjoint at /home/user/train.jl:32 [inlined] [32] #175 at /home/user/.julia/packages/Zygote/z3bQd/src/lib/lib.jl:182 [inlined] [33] (::Zygote.var"#347#back#177"{Zygote.var"#175#176"{typeof(∂(loss_adjoint)),Tuple{Tuple{Nothing},Int64}}})(::Int64) at /home/user/.julia/packages/ZygoteRules/6nssF/src/adjoint.jl:49 [34] #43 at /home/user/.julia/packages/DiffEqFlux/61JUC/src/train.jl:176 [inlined] [35] (::typeof(∂(λ)))(::Int64) at /home/user/.julia/packages/Zygote/z3bQd/src/compiler/interface2.jl:0 [36] #37 at /home/user/.julia/packages/Zygote/z3bQd/src/compiler/interface.jl:45 [inlined] [37] (::DiffEqFlux.var"#46#59"{DiffEqFlux.var"#43#56"{typeof(loss_adjoint)}})(::Array{Float64,1}, ::Array{Float64,1}) at /home/user/.julia/packages/DiffEqFlux/61JUC/src/train.jl:199 [38] value_gradient!!(::TwiceDifferentiable{Float64,Array{Float64,1},Array{Float64,2},Array{Float64,1}}, ::Array{Float64,1}) at /home/user/.julia/packages/NLSolversBase/mGaJg/src/interface.jl:82 [39] initial_state(::BFGS{LineSearches.InitialStatic{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Nothing,Float64,Flat}, ::Optim.Options{Float64,DiffEqFlux.var"#_cb#55"{DiffEqFlux.var"#53#66",Base.Iterators.Cycle{Tuple{DiffEqFlux.NullData}}}}, ::TwiceDifferentiable{Float64,Array{Float64,1},Array{Float64,2},Array{Float64,1}}, ::Array{Float64,1}) at /home/user/.julia/packages/Optim/L5T76/src/multivariate/solvers/first_order/bfgs.jl:66 [40] optimize(::TwiceDifferentiable{Float64,Array{Float64,1},Array{Float64,2},Array{Float64,1}}, ::Array{Float64,1}, ::BFGS{LineSearches.InitialStatic{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Nothing,Float64,Flat}, ::Optim.Options{Float64,DiffEqFlux.var"#_cb#55"{DiffEqFlux.var"#53#66",Base.Iterators.Cycle{Tuple{DiffEqFlux.NullData}}}}) at /home/user/.julia/packages/Optim/L5T76/src/multivariate/optimize/optimize.jl:33 [41] sciml_train(::Function, ::Array{Float64,1}, ::BFGS{LineSearches.InitialStatic{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Nothing,Float64,Flat}, ::Base.Iterators.Cycle{Tuple{DiffEqFlux.NullData}}; cb::Function, maxiters::Int64, diffmode::DiffEqFlux.ZygoteDiffMode, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/user/.julia/packages/DiffEqFlux/61JUC/src/train.jl:269 [42] sciml_train at /home/user/.julia/packages/DiffEqFlux/61JUC/src/train.jl:163 [inlined] (repeats 2 times) [43] top-level scope at /home/user/train.jl:38 in expression starting at /home/user/train.jl:38

@ChrisRackauckas
Copy link
Member

Oh that's my bad! I forgot I actually did make a patch to the adjoint: SciML/SciMLSensitivity.jl#289 . I'll get that tagged and the test is your case here.

@ChrisRackauckas
Copy link
Member

As for a direct fix, I was trying:

using RecursiveArrayTools
Zygote.@adjoint function Zygote.literal_getproperty(sol::DiffEqBase.AbstractTimeseriesSolution, ::Val{:u})
    return sol.u,y->(DiffEqArray(sol.u,sol.t),nothing)
end

But that didn't seem right. Anyways, I would never suggest using .u anyways, so this shouldn't be a major issue and SciML/SciMLSensitivity.jl#289 is thus the real solution, but I'll leave this open to try and figure out how to make the getproperty work nicely in the future.

@seadra
Copy link
Author

seadra commented Jun 20, 2020

Oh, great! Once again, thanks a lot for looking into this and for the lighting fast response!

Sure, I don't actually to need use .u. And I'll hopefully be able to use DiffEqFlux.jl once SciML/SciMLSensitivity.jl#289 gets merged.

@ChrisRackauckas
Copy link
Member

Fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants