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

0-element Vector{Base.Stacktraces.StackFrame} #184

Closed
ChrisRackauckas opened this issue Jul 31, 2021 · 1 comment · Fixed by #185
Closed

0-element Vector{Base.Stacktraces.StackFrame} #184

ChrisRackauckas opened this issue Jul 31, 2021 · 1 comment · Fixed by #185

Comments

@ChrisRackauckas
Copy link
Contributor

ChrisRackauckas commented Jul 31, 2021

# DiffEqBase#diffcache
# OrdinaryDiffEq#precompile

using OrdinaryDiffEq, SnoopCompile
function lorenz(du,u,p,t)
 du[1] = 10.0(u[2]-u[1])
 du[2] = u[1]*(28.0-u[3]) - u[2]
 du[3] = u[1]*u[2] - (8/3)*u[3]
end
u0 = [1.0;0.0;0.0]
tspan = (0.0,100.0)
prob = ODEProblem(OrdinaryDiffEq.lorenz,u0,tspan)
alg = Tsit5()
tinf = @snoopi_deep solve(prob,alg)
itrigs = inference_triggers(tinf)
itrig = itrigs[13]
ascend(itrig)
julia> itrig = itrigs[13]
Inference triggered to call perform_step!(::OrdinaryDiffEq.ODEIntegrator{Tsit5, true, Vector{Float64}, Nothing, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{Vector{Float64}}, ODESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(OrdinaryDiffEq.lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(OrdinaryDiffEq.lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(OrdinaryDiffEq.lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{Int64}}, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(LinearAlgebra.opnorm), Nothing, CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryMinHeap{Float64}, DataStructures.BinaryMinHeap{Float64}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, ::OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, ::Bool) called from toplevel

julia> ascend(itrig)
ERROR: BoundsError: attempt to access 0-element Vector{Base.StackTraces.StackFrame} at index [0]
Stacktrace:
 [1] getindex
   @ .\array.jl:801 [inlined]
 [2] callstring(io::IOBuffer, sfs::Vector{Base.StackTraces.StackFrame})
   @ Cthulhu C:\Users\accou\.julia\packages\Cthulhu\wsvdB\src\backedges.jl:104
 [3] treelist!(parent::FoldingTrees.Node{Cthulhu.Data{Core.MethodInstance}}, io::IOBuffer, mi::InferenceTrigger, indent::String, visited::Base.IdSet{Core.MethodInstance})
   @ Cthulhu C:\Users\accou\.julia\packages\Cthulhu\wsvdB\src\backedges.jl:125
 [4] treelist(mi::InferenceTrigger)
   @ Cthulhu C:\Users\accou\.julia\packages\Cthulhu\wsvdB\src\backedges.jl:118
 [5] ascend(mi::InferenceTrigger; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Cthulhu C:\Users\accou\.julia\packages\Cthulhu\wsvdB\src\Cthulhu.jl:285
 [6] ascend(mi::InferenceTrigger)
   @ Cthulhu C:\Users\accou\.julia\packages\Cthulhu\wsvdB\src\Cthulhu.jl:285
 [7] top-level scope
   @ REPL[17]:1

@timholy

timholy added a commit that referenced this issue Aug 1, 2021
timholy added a commit that referenced this issue Aug 1, 2021
@ChrisRackauckas
Copy link
Contributor Author

New branches:

# DiffEqBase#cthulhu
# OrdinaryDiffEq#cthulhu

using OrdinaryDiffEq, SnoopCompile
function lorenz(du,u,p,t)
 du[1] = 10.0(u[2]-u[1])
 du[2] = u[1]*(28.0-u[3]) - u[2]
 du[3] = u[1]*u[2] - (8/3)*u[3]
end
u0 = [1.0;0.0;0.0]
tspan = (0.0,100.0)
prob = ODEProblem(OrdinaryDiffEq.lorenz,u0,tspan)
alg = Tsit5()
tinf = @snoopi_deep solve(prob,alg)
itrigs = inference_triggers(tinf)
itrig = itrigs[11]
ascend(itrig)

timholy added a commit that referenced this issue Aug 1, 2021
timholy added a commit that referenced this issue Aug 1, 2021
See discussion in #185

Co-authored-by: Chris Rackauckas <[email protected]>
timholy added a commit that referenced this issue Aug 1, 2021
See discussion in #185

Co-authored-by: Chris Rackauckas <[email protected]>
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

Successfully merging a pull request may close this issue.

1 participant