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

attempt to precompile linsolve #698

Merged
merged 12 commits into from
Aug 12, 2021
Merged

attempt to precompile linsolve #698

merged 12 commits into from
Aug 12, 2021

Conversation

ChrisRackauckas
Copy link
Member

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(lorenz,u0,tspan)
alg = Rodas5()
tinf = @snoopi_deep solve(prob,alg)

@timholy this should be the right method:

_linsolve = DefaultLinSolve()
_testf(du,u,p,t) = du .= u
b = rand(1); x = rand(1)
_linsolve(Val{:init},ODEFunction(_testf),b)
A = rand(1,1)
_linsolve(x,A,b,true)
@which _linsolve(x,A,b,true)
# (p::DefaultLinSolve)(x, A, b, update_matrix; reltol, kwargs...) in DiffEqBase at C:\Users\accou\.julia\dev\DiffEqBase\src\linear_nonlinear.jl:93

```julia
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(lorenz,u0,tspan)
alg = Rodas5()
tinf = @snoopi_deep solve(prob,alg)
```
@ChrisRackauckas
Copy link
Member Author

Capture

Still not caching it though 🤷

@timholy
Copy link
Contributor

timholy commented Aug 9, 2021

Does it help to put it in a fake-loop? See jkrumbiegel/GridLayoutBase.jl#21 (comment)

Also, FYI there are some bugs prior to julia1.4.2 with precompile, might want to put the include in a version-check.

@ChrisRackauckas
Copy link
Member Author

THAT DID IT!!!

InferenceTimingNode: 0.906828/1.835100 on Core.Compiler.Timings.ROOT() with 14 direct children

17 seconds to 2 seconds. That's a big one. I should go make the other precompiles match this same format.

@ChrisRackauckas
Copy link
Member Author

Now to get below 1 second.

@ChrisRackauckas
Copy link
Member Author

Seems like one of the blocks may be that Base logging needs to precompile a bit.

@timholy
Copy link
Contributor

timholy commented Aug 9, 2021

Seems like one of the blocks may be that Base logging needs to precompile a bit.

If you have a list I can try add them. But there are already some, and I have the impression that not all "work". Some discussion of this is in JuliaLang/julia#38906.

Co-authored-by: Tim Holy <tim.holy@gmail.com>
@ChrisRackauckas
Copy link
Member Author

Okay, really weird. Sometimes I'm getting 2 seconds, other times I'm getting 16.5 and it's not precompiling it? Trying to see if I can narrow that down.

@ChrisRackauckas
Copy link
Member Author

Really weird. I got the two second precompile like 4 different times, now I can't seem to get it back.

@ChrisRackauckas
Copy link
Member Author

So it keeps switching between that 2 seconds and that 16.5 seconds. But curiously:

InferenceTimingNode: 1.804147/16.599086 on Core.Compiler.Timings.ROOT() with 54 direct children

the number of inference triggers is substantially different. Is there a heuristic this might be hitting non-deterministically based on time? I noticed the other day that whether or not I'd have 1 or 2 children in a simpler ODE solve call seem non-deterministic (whether a heap operation from DataStructures) was inferred.

@ChrisRackauckas
Copy link
Member Author

JuliaCollections/DataStructures.jl#747
SciML/OrdinaryDiffEq.jl#1468

Reducing inference triggers and making more things easier on inference

InferenceTimingNode: 1.460777/16.030597 on Core.Compiler.Timings.ROOT() with 46 direct children

can't seem to get that magical 2 anymore.

@timholy
Copy link
Contributor

timholy commented Aug 9, 2021

Does issuing the precompile directive manually help? After you load the package (but don't run any code), does

using MethodAnalysis
methodinstances(@which _linsolve(x,A,b,true))

show any instances for that method? If not, does manually specifying precompile(Tuple{...}) fix it? And if you run this on 1.7, do you get a warning about a non-effective precompile directive?

@ChrisRackauckas
Copy link
Member Author

methodinstances(@which DiffEqBase.DEFAULT_LINSOLVE(x,A,b,true))

2-element Vector{Core.MethodInstance}:
 MethodInstance for (::DefaultLinSolve)(::Vector{Float64}, ::Matrix{Float64}, ::Vector{Float64}, ::Bool)
 MethodInstance for (::DefaultLinSolve)(::Vector{Float64}, ::LinearAlgebra.UniformScaling{Bool}, ::Vector{Float64}, ::Bool)
julia> C:\Users\accou\.julia\dev\DiffEqBase\src\linear_nonlinear.jl:93, MethodInstance for DiffEqBase.var"#_#31"(::Nothing, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::DefaultLinSolve, ::Vector{Float64}, ::Any, ::Vector{Float64}, ::Bool)
C:\Users\accou\.julia\dev\DiffEqBase\src\linear_nonlinear.jl:93, MethodInstance for (::DefaultLinSolve)(::Vector{Float64}, ::Any, ::Vector{Float64}, ::Bool)

Looks like the issue might be the keyword argument helper function?

Adding:

Base.precompile(Tuple{DefaultLinSolve,Vector{Float64},Any,Vector{Float64},Bool})

leads to:

┌ Warning: Inactive precompile statement
└   form = Tuple{DiffEqBase.DefaultLinSolve, Vector{Float64}, Any, Vector{Float64}, Bool}
function (p::DefaultLinSolve)(x,@nospecialize(A),b,update_matrix=false;reltol=nothing, kwargs...)

doesn't do it either, and the majority of what's leftover is the kwarg function

@ChrisRackauckas
Copy link
Member Author

Manually removing the kwargs also doesn't work, so it's something a bit deeper.

@ChrisRackauckas
Copy link
Member Author

It might be due to invalidations? I started going down that trail:

using SnoopCompile
using DiffEqBase, RecursiveFactorization
invalidations = @snoopr using OrdinaryDiffEq
length(invalidations) # 61
trees = invalidation_trees(invalidations)
1-element Vector{SnoopCompile.MethodInvalidations}:
 inserting Pair(e::LightGraphs.SimpleGraphs.AbstractSimpleEdge) in LightGraphs.SimpleGraphs at C:\Users\accou\.julia\packages\LightGraphs\IgJif\src\SimpleGraphs\simpleedge.jl:26 invalidated:
   mt_backedges: 1: signature Tuple{Type{Pair}, Vararg{Any}} triggered MethodInstance for (::Base.var"#6#7"{Pair})(::Any) (23 children)
   1 mt_cache

@vtjnash thinks this might be a Base issue that should get fixed.

@ChrisRackauckas
Copy link
Member Author

Commenting out both:

1-element Vector{SnoopCompile.MethodInvalidations}:
 inserting Pair(e::LightGraphs.SimpleGraphs.AbstractSimpleEdge) in LightGraphs.SimpleGraphs at C:\Users\accou\.julia\packages\LightGraphs\IgJif\src\SimpleGraphs\simpleedge.jl:26 invalidated:
   mt_backedges: 1: signature Tuple{Type{Pair}, Vararg{Any}} triggered MethodInstance for (::Base.var"#6#7"{Pair})(::Any) (23 children)
   1 mt_cache
1-element Vector{SnoopCompile.MethodInvalidations}:
 inserting Pair(e::LightGraphs.AbstractEdge) in LightGraphs at C:\Users\accou\.julia\dev\LightGraphs\src\interface.jl:86 invalidated:
   mt_backedges: 1: signature Tuple{Type{Pair}, Vararg{Any}} triggered MethodInstance for (::Base.var"#6#7"{Pair})(::Any) (23 children)
   2 mt_cache

leads to 0 invalidation trees and

length(invalidations) # 14

with:

julia> invalidations
14-element Vector{Any}:
 MethodInstance for show(::IOContext{IOBuffer}, ::Any)
 "invalidate_mt_cache"
 MethodInstance for show(::IOContext{IOBuffer}, ::Any)
 "invalidate_mt_cache"
 MethodInstance for hash(::Any, ::UInt64)
 "invalidate_mt_cache"
 MethodInstance for OrdinaryDiffEq.gen_tableau(::OrdinaryDiffEq.RosenbrockAdaptiveTableau{Float64, Float64}, ::Expr, ::Symbol)
 "insert_backedges"
 MethodInstance for OrdinaryDiffEq.gen_tableau(::OrdinaryDiffEq.RosenbrockFixedTableau{Float64, Float64}, ::Expr, ::Symbol)
 "insert_backedges"
 MethodInstance for OrdinaryDiffEq.gen_tableau(::OrdinaryDiffEq.RosenbrockAdaptiveTableau{Rational{Int64}, Rational{Int64}}, ::Expr, ::Symbol)
 "insert_backedges"
 MethodInstance for OrdinaryDiffEq.gen_algcache(::Expr, ::Symbol, ::Symbol, ::Symbol)
 "insert_backedges"

but that only brings the compile time to:

InferenceTimingNode: 1.447423/15.620653 on Core.Compiler.Timings.ROOT() with 42 direct children

@ChrisRackauckas
Copy link
Member Author

ChrisRackauckas commented Aug 11, 2021

Figuring out DiffEqBase's invalidation issues will be much more exciting:

using SnoopCompile
using RecursiveFactorization
invalidations = @snoopr using DiffEqBase
length(invalidations) # 5584
trees = invalidation_trees(invalidations)
julia> println(trees)
SnoopCompile.MethodInvalidations[inserting convert(::Type{<:Tuple}, t::ChainRulesCore.Tangent{<:Any, <:Tuple}) in ChainRulesCore at deprecated.jl:70 invalidated:
   mt_backedges: 1: signature Tuple{typeof(convert), Type{Tuple{DataType, DataType, DataType}}, Any} triggered MethodInstance for Pair{DataType, Tuple{DataType, DataType, 
DataType}}(::Any, ::Any) (0 children)
                 2: signature Tuple{typeof(convert), Type{NTuple{8, DataType}}, Any} triggered MethodInstance for Pair{DataType, NTuple{8, DataType}}(::Any, ::Any) (0 children)
                 3: signature Tuple{typeof(convert), Type{NTuple{7, DataType}}, Any} triggered MethodInstance for Pair{DataType, NTuple{7, DataType}}(::Any, ::Any) (0 children)
                 4: signature Tuple{typeof(convert), Type{Tuple{Symbol, Any, Symbol, Symbol}}, Any} triggered MethodInstance for setindex!(::Vector{Tuple{Symbol, Any, Symbol, Symbol}}, ::Any, ::Int64) (0 children)
                 5: signature Tuple{typeof(convert), Type{Tuple{Any, String}}, Any} triggered MethodInstance for setindex!(::Vector{Tuple{Any, String}}, ::Any, ::Int64) (0 children)
, inserting getproperty(::StaticArrays.SOneTo{n}, s::Symbol) where n in StaticArrays at C:\Users\accou\.julia\packages\StaticArrays\vxjOO\src\SOneTo.jl:57 invalidated:    
   backedges: 1: superseding getproperty(x, f::Symbol) in Base at Base.jl:42 with MethodInstance for getproperty(::AbstractUnitRange, ::Symbol) (1 children)
, inserting (::Base.var"#sort!##kw")(::Any, ::typeof(sort!), a::FillArrays.AbstractFill) in FillArrays at C:\Users\accou\.julia\packages\FillArrays\VLeUk\src\FillArrays.jl:187 invalidated:
   backedges: 1: superseding (::Base.var"#sort!##kw")(::Any, ::typeof(sort!), A::AbstractArray) in Base.Sort at sort.jl:1088 with MethodInstance for (::Base.var"#sort!##kw")(::NamedTuple{(:by,), Tuple{typeof(identity)}}, ::typeof(sort!), ::AbstractArray) (1 children)
, inserting hastreeview(x::SciMLBase.DEIntegrator) in SciMLBase at C:\Users\accou\.julia\packages\SciMLBase\cA7Re\src\integrator_interface.jl:304 invalidated:
   backedges: 1: superseding hastreeview(x) in TreeViews at C:\Users\accou\.julia\packages\TreeViews\EdGaj\src\TreeViews.jl:11 with MethodInstance for TreeViews.hastreeview(::Any) (1 children)
, inserting all(f::Function, a::StaticArrays.StaticArray; dims) in StaticArrays at C:\Users\accou\.julia\packages\StaticArrays\vxjOO\src\mapreduce.jl:262 invalidated:     
   backedges: 1: superseding all(f::Function, a::AbstractArray; dims) in Base at reducedim.jl:902 with MethodInstance for all(::typeof(Colors._isfinite), ::AbstractVector{<:ColorTypes.Colorant}) (1 children)
              2: superseding all(f::Function, a::AbstractArray; dims) in Base at reducedim.jl:902 with MethodInstance for all(::typeof(Colors._isfinite), ::AbstractMatrix{<:ColorTypes.Color}) (1 children)
, inserting any(f::Function, a::StaticArrays.StaticArray; dims) in StaticArrays at C:\Users\accou\.julia\packages\StaticArrays\vxjOO\src\mapreduce.jl:265 invalidated:     
   backedges: 1: superseding any(f::Function, a::AbstractArray; dims) in Base at reducedim.jl:899 with MethodInstance for any(::Test.var"#41#43", ::AbstractArray) (1 children)
              2: superseding any(f::Function, a::AbstractArray; dims) in Base at reducedim.jl:899 with MethodInstance for any(::typeof(ismissing), ::AbstractArray) (1 children)
   34 mt_cache
, inserting convert(::Type{NonlinearFunction}, f) in SciMLBase at C:\Users\accou\.julia\packages\SciMLBase\cA7Re\src\scimlfunctions.jl:2005 invalidated:
   mt_backedges: 1: signature Tuple{typeof(convert), Type{<:Function}, Base.BinaryPlatforms.var"#2#4"} triggered MethodInstance for setindex!(::Vector{<:Function}, ::Base.BinaryPlatforms.var"#2#4", ::Int64) (0 children)
                 2: signature Tuple{typeof(convert), Type{<:Function}, Base.BinaryPlatforms.var"#2#4"} triggered MethodInstance for setindex!(::Dict{String, <:Function}, ::Base.BinaryPlatforms.var"#2#4", ::String) (0 children)
                 3: signature Tuple{typeof(convert), Type{F} where F<:Function, Function} triggered MethodInstance for Base.MappingRF(::Function, ::typeof(|)) (1 children)   backedges: 1: superseding convert(::Type{T}, x::T) where T in Base at essentials.jl:218 with MethodInstance for convert(::Type{T}, ::T) where T<:Function (1 children)  
   10 mt_cache
, inserting promote_rule(::Type{R}, ::Type{ForwardDiff.Dual{T, V, N}}) where {R<:Real, T, V, N} in ForwardDiff at C:\Users\accou\.julia\packages\ForwardDiff\5gUap\src\dual.jl:372 invalidated:
   mt_backedges: 1: signature Tuple{typeof(promote_rule), Type{Int64}, Any} triggered MethodInstance for promote_rule(::Type{Int64}, ::Type{LoopVectorization.UpperBoundedInteger{N, S}}) where {N, S} (2 children)
   backedges: 1: superseding promote_rule(::Type, ::Type) in Base at promotion.jl:257 with MethodInstance for promote_rule(::Type{Int64}, ::Type) (1 children)
              2: superseding promote_rule(::Type, ::Type) in Base at promotion.jl:257 with MethodInstance for promote_rule(::Type{Int64}, ::Type{T} where T<:Real) (1 children)
   13 mt_cache
, inserting isassigned(a::StaticArrays.StaticArray, i::Int64...) in StaticArrays at C:\Users\accou\.julia\packages\StaticArrays\vxjOO\src\abstractarray.jl:30 invalidated: 
   backedges: 1: superseding isassigned(a::AbstractArray, i::Integer...) in Base at abstractarray.jl:554 with MethodInstance for isassigned(::AbstractVecOrMat, ::Int64, ::Int64) (2 children)
              2: superseding isassigned(a::AbstractArray, i::Integer...) in Base at abstractarray.jl:554 with MethodInstance for isassigned(::AbstractMatrix, ::Int64, ::Int64) (3 children)
   4 mt_cache
, inserting iterate(x::LabelledArrays.SLArray, args...) in LabelledArrays at C:\Users\accou\.julia\packages\LabelledArrays\oVkHZ\src\slarray.jl:53 invalidated:
   backedges: 1: superseding iterate(A::AbstractArray, state) in Base at abstractarray.jl:1144 with MethodInstance for iterate(::AbstractMatrix{<:ColorTypes.Color}, ::Int64) (1 children)
              2: superseding iterate(A::AbstractArray, state) in Base at abstractarray.jl:1144 with MethodInstance for iterate(::AbstractMatrix{<:ColorTypes.Color}, ::Tuple{Any}) (2 children)
              3: superseding iterate(A::AbstractArray, state) in Base at abstractarray.jl:1144 with MethodInstance for iterate(::AbstractMatrix{<:ColorTypes.Color}, ::Tuple{Any, Vararg{Any}}) (3 children)
   1 mt_cache
, inserting convert(::Type{<:Dict}, t::ChainRulesCore.Tangent{<:Dict, <:Dict}) in ChainRulesCore at deprecated.jl:70 invalidated:
   mt_backedges: 1: signature Tuple{typeof(convert), Type{Dict{String, Any}}, Any} triggered MethodInstance for setindex!(::Dict{Base.BinaryPlatforms.AbstractPlatform, Dict{String, Any}}, ::Any, ::Base.BinaryPlatforms.Platform) (0 children)
                 2: signature Tuple{typeof(convert), Type{Dict{Char, Any}}, Any} triggered MethodInstance for REPL.LineEdit.Prompt(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any) (6 children)
                 3: signature Tuple{typeof(convert), Type{Dict{Symbol, Any}}, Any} triggered MethodInstance for setindex!(::IdDict{Function, Dict{Symbol, Any}}, ::Any, ::Any) (8 children)
, inserting ==(a, b::ChainRulesCore.AbstractThunk) in ChainRulesCore at C:\Users\accou\.julia\packages\ChainRulesCore\BYuIz\src\differentials\thunks.jl:27 invalidated:    
   backedges: 1: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Base.UUID, ::Any) (4 children)
              2: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Tokenize.Tokens.Kind, ::Any) (6 children)
              3: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Core.TypeName, ::Any) (7 children)
              4: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Module, ::Any) (10 children)
              5: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Symbol, ::Any) (167 children)
, inserting identity(d::ForwardDiff.Dual{T}) where T in ForwardDiff at C:\Users\accou\.julia\packages\ForwardDiff\5gUap\src\dual.jl:201 invalidated:
   backedges: 1: superseding identity(x) in Base at operators.jl:590 with MethodInstance for identity(::Any) (218 children)
, inserting ==(a::ChainRulesCore.AbstractThunk, b) in ChainRulesCore at C:\Users\accou\.julia\packages\ChainRulesCore\BYuIz\src\differentials\thunks.jl:26 invalidated:    
   backedges:  1: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::LineNumberNode) (1 children)
               2: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::Module) (1 children)
               3: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::Core.Compiler.InferenceResult) (1 children)
               4: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::Core.MethodInstance) (2 children)
               5: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::Base.UUID) (5 children)
               6: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::Base.CoreLogging.LogLevel) (5 children)
               7: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::Tokenize.Tokens.Kind) (5 children)
               8: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::REPL.LineEdit.Prompt) (7 children)
               9: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::typeof(show)) (16 children)
              10: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::Nothing) (105 children)
              11: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::Symbol) (224 children)
              12: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Any, ::CSTParser.EXPR) (224 children)
, inserting mapreduce_empty(::typeof(DiffEqBase.UNITLESS_ABS2), op, T) in DiffEqBase at C:\Users\accou\.julia\dev\DiffEqBase\src\common_defaults.jl:4 invalidated:
   backedges: 1: superseding mapreduce_empty(f, op, T) in Base at reduce.jl:344 with MethodInstance for Base.mapreduce_empty(::Function, ::Base.BottomRF{typeof(Base._rf_findmax)}, ::Type) (3 children)
              2: superseding mapreduce_empty(f, op, T) in Base at reduce.jl:344 with MethodInstance for Base.mapreduce_empty(::Function, ::Base.BottomRF{typeof(min)}, ::Type) (9 children)
              3: superseding mapreduce_empty(f, op, T) in Base at reduce.jl:344 with MethodInstance for Base.mapreduce_empty(::Function, ::Base.BottomRF{typeof(Base.add_sum)}, ::Type) (99 children)
              4: superseding mapreduce_empty(f, op, T) in Base at reduce.jl:344 with MethodInstance for Base.mapreduce_empty(::Function, ::Base.BottomRF{typeof(Base._rf_findmin)}, ::Type) (479 children)
              5: superseding mapreduce_empty(f, op, T) in Base at reduce.jl:344 with MethodInstance for Base.mapreduce_empty(::Function, ::Function, ::Type) (994 children)   21 mt_cache
]

@ChrisRackauckas
Copy link
Member Author

@timholy I think I hit a SnoopCompile bug after updating?

using SnoopCompile
using RecursiveFactorization
invalidations = @snoopr using DiffEqBase
length(invalidations) # 61
trees = invalidation_trees(invalidations)

MethodError: no method matching getroot(::Nothing)
Closest candidates are:
  getroot(!Matched::SnoopCompile.InstanceNode) at C:\Users\accou\.julia\packages\SnoopCompile\Q5x4J\src\invalidations.jl:77
invalidation_trees(list::Vector{Any}; exclude_corecompiler::Bool) at invalidations.jl:305
invalidation_trees(list::Vector{Any}) at invalidations.jl:257
top-level scope at test.jl:211
eval at boot.jl:373 [inlined]
(@v1.7) pkg> st
      Status `C:\Users\accou\.julia\environments\v1.7\Project.toml`
  [c52e3926] Atom v0.12.34
  [2b5f629d] DiffEqBase v6.71.1 `C:\Users\accou\.julia\dev\DiffEqBase`        
  [e5e0dc1b] Juno v0.8.4
  [093fc24a] LightGraphs v1.3.5 `C:\Users\accou\.julia\dev\LightGraphs`       
  [1dea7af3] OrdinaryDiffEq v5.61.0 `C:\Users\accou\.julia\dev\OrdinaryDiffEq`
  [4722fa14] PkgAuthentication v1.1.1
  [c46f51b8] ProfileView v0.6.10
  [f2c3362d] RecursiveFactorization v0.2.2
  [0bca4576] SciMLBase v1.18.4
  [aa65fe97] SnoopCompile v2.7.0

@ChrisRackauckas
Copy link
Member Author

trees = invalidation_trees(invalidations[1:1572])

is fine and gives:

2-element Vector{SnoopCompile.MethodInvalidations}:
 inserting ==(a, b::ChainRulesCore.AbstractThunk) in ChainRulesCore at C:\Users\accou\.julia\packages\ChainRulesCore\Voykb\src\differentials\thunks.jl:27 invalidated:
   backedges: 1: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Base.UUID, ::Any) (4 children)
              2: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Tokenize.Tokens.Kind, ::Any) (6 children)
              3: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Core.TypeName, ::Any) (7 children)
              4: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Module, ::Any) (8 children)
              5: superseding ==(x, y) in Base at Base.jl:116 with MethodInstance for ==(::Symbol, ::Any) (160 children)

 inserting ==(a::ChainRulesCore.AbstractThunk, b) in ChainRulesCore at C:\Users\accou\.julia\packages\ChainRulesCore\Voykb\src\differentials\thunks.jl:26 invalidat

Then:

trees = invalidation_trees(invalidations[1:1573])

errors:

BoundsError: attempt to access 1573-element Vector{Any} at index [1574]
getindex at array.jl:835 [inlined]
invalidation_trees(list::Vector{Any}; exclude_corecompiler::Bool) at invalidations.jl:279
invalidation_trees(list::Vector{Any}) at invalidations.jl:257
top-level scope at test.jl:211
eval at boot.jl:373 [inlined]

then:

trees = invalidation_trees(invalidations[1:1574])

MethodError: no method matching getroot(::Nothing)
Closest candidates are:
  getroot(!Matched::SnoopCompile.InstanceNode) at C:\Users\accou\.julia\packages\SnoopCompile\Q5x4J\src\invalidations.jl:77
invalidation_trees(list::Vector{Any}; exclude_corecompiler::Bool) at invalidations.jl:305
invalidation_trees(list::Vector{Any}) at invalidations.jl:257
top-level scope at test.jl:211
eval at boot.jl:373 [inlined]

and the error message is stable from that point onwards.

@timholy
Copy link
Contributor

timholy commented Aug 11, 2021

Sorry for my silence, I've been writing a non-instantiating deserializer of our precompile *.ji files so I can finally figure out what's in them. FWIW it seems close to working but 🤷‍♂️

Good idea to check the invalidations. In addition to the really good tool @snoopr, SnoopCompile also provides staleinstances(tinf) to check the output of @snoopi_deep as a simple gut-check of whether you might need to check for invalidations. It doesn't differentiate between old invalidations (one present before your workload started) and new ones, so @snoopr is the more accurate tool, but it's quick & easy. And if memory serves it give you (possibly accurate, possibly inaccurate) info about whether you were calling any previously-invalided methods, and that can be useful in figuring out why something doesn't precompile.

@ChrisRackauckas
Copy link
Member Author

ChrisRackauckas commented Aug 11, 2021

No worries, I'm just poking around and seeing what it takes to get that lu factorization to compile correctly. BTW @timholy Elisabeth is trying to catch you to finalize the draft for submission: that's probably more time sensitive (sneaking this reminder in there 😅 )

But I got an idea: isolate the issue by using PackageCompiler?

using PackageCompiler
create_sysimage([:StaticArrays, :ForwardDiff, :LabelledArrays, :ChainRulesCore]; replace_default=true)

Then:

using SnoopCompile
using RecursiveFactorization
invalidations = @snoopr using DiffEqBase
length(invalidations) # 1581
trees = invalidation_trees(invalidations)
julia> invalidation_trees(invalidations)
insert_backedges for MethodInstance for FunctionWrappers.convert_ret(::Type{Any}, ::Any)
insert_backedges for MethodInstance for (::FunctionWrappers.CallWrapper{Any})(::typeof(identity), ::Any)
insert_backedges for MethodInstance for RecipesBase.create_kw_body(::Expr)
insert_backedges for MethodInstance for Setfield.parse_obj_lenses(::Any)
insert_backedges for MethodInstance for Setfield.parse_obj_lenses(::Symbol)
insert_backedges for MethodInstance for Setfield.parse_obj_lenses(::Expr)
insert_backedges for MethodInstance for Setfield.parse_obj_lenses_composite(::Vector)
5-element Vector{SnoopCompile.MethodInvalidations}:
 inserting copyto!(L::DiffEqArrayOperator, rhs) in SciMLBase at C:\Users\accou\.julia\packages\SciMLBase\cA7Re\src\operators\basic_operators.jl:113 invalidated:
   mt_backedges: 1: signature Tuple{typeof(copyto!), Any, Base.KeySet} triggered MethodInstance for Base._collect(::UnitRange{Int64}, ::Base.KeySet, ::Base.HasEltype, ::Base.HasLength) (0 children)
   6 mt_cache

 inserting hastreeview(x::SciMLBase.DEIntegrator) in SciMLBase at C:\Users\accou\.julia\packages\SciMLBase\cA7Re\src\integrator_interface.jl:304 invalidated:
   backedges: 1: superseding hastreeview(x) in TreeViews at C:\Users\accou\.julia\packages\TreeViews\EdGaj\src\TreeViews.jl:11 with MethodInstance for TreeViews.hastreeview(::Any) (1 children)
   1 mt_cache

 inserting (::Base.var"#sort!##kw")(::Any, ::typeof(sort!), a::FillArrays.AbstractFill) in FillArrays at C:\Users\accou\.julia\packages\FillArrays\Pi2FR\src\FillArrays.jl:188 invalidated:
   backedges: 1: superseding (::Base.var"#sort!##kw")(::Any, ::typeof(sort!), A::AbstractArray) in Base.Sort at sort.jl:1088 with MethodInstance for (::Base.var"#sort!##kw")(::NamedTuple{(:by,), Tuple{typeof(identity)}}, ::typeof(sort!), ::AbstractArray) (2 children)
   2 mt_cache

 inserting convert(::Type{RODEFunction}, f) in SciMLBase at C:\Users\accou\.julia\packages\SciMLBase\cA7Re\src\scimlfunctions.jl:1784 invalidated:
   mt_backedges: 1: signature Tuple{typeof(convert), Type{<:Function}, Base.BinaryPlatforms.var"#2#4"} triggered MethodInstance for setindex!(::Vector{<:Function}, ::Base.BinaryPlatforms.var"#2#4", ::Int64) (0 children)
                 2: signature Tuple{typeof(convert), Type{<:Function}, Base.BinaryPlatforms.var"#2#4"} triggered MethodInstance for setindex!(::Dict{String, <:Function}, ::Base.BinaryPlatforms.var"#2#4", ::String) (0 children)
                 3: signature Tuple{typeof(convert), Type{F} where F<:Function, Function} triggered MethodInstance for Base.MappingRF(::Function, ::typeof(|)) (1 children)   backedges: 1: superseding convert(::Type{T}, x::T) where T in Base at essentials.jl:218 with MethodInstance for convert(::Type{T}, ::T) where T<:Function (1 children)  

 inserting mapreduce_empty(::typeof(DiffEqBase.UNITLESS_ABS2), op::Function, T::Type) in DiffEqBase at C:\Users\accou\.julia\dev\DiffEqBase\src\common_defaults.jl:4 invalidated:
   backedges: 1: superseding mapreduce_empty(f, op, T) in Base at reduce.jl:344 with MethodInstance for Base.mapreduce_empty(::Function, ::Function, ::Type) (901 children)   39 mt_cache

But that leaves me at:

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)

using OrdinaryDiffEq, SnoopCompile
prob = ODEProblem(lorenz,u0,tspan)
alg = Rodas5()
tinf = @snoopi_deep solve(prob,alg)

InferenceTimingNode: 1.429329/15.644452 on Core.Compiler.Timings.ROOT() with 46 direct children

So if those don't effect the compile time, then it must be something of mine?

using PackageCompiler
create_sysimage([:StaticArrays, :ForwardDiff, :LabelledArrays, :ChainRulesCore, :SciMLBase]; replace_default=true)

...

using SnoopCompile
using RecursiveFactorization
invalidations = @snoopr using DiffEqBase
length(invalidations) # 2
trees = invalidation_trees(invalidations)

2-element Vector{SnoopCompile.MethodInvalidations}:
 inserting (::Base.var"#sort!##kw")(::Any, ::typeof(sort!), a::FillArrays.AbstractFill) in FillArrays at C:\Users\accou\.julia\packages\FillArrays\Pi2FR\src\FillArrays.jl:188 invalidated:
   backedges: 1: superseding (::Base.var"#sort!##kw")(::Any, ::typeof(sort!), A::AbstractArray) in Base.Sort at sort.jl:1088 with MethodInstance for (::Base.var"#sort!##kw")(::NamedTuple{(:by,), Tuple{typeof(identity)}}, ::typeof(sort!), ::AbstractArray) (2 children)
   2 mt_cache

 inserting mapreduce_empty(::typeof(DiffEqBase.UNITLESS_ABS2), op::Function, T::Type) in DiffEqBase at C:\Users\accou\.julia\dev\DiffEqBase\src\common_defaults.jl:4 invalidated:
   backedges: 1: superseding mapreduce_empty(f, op, T) in Base at reduce.jl:344 with MethodInstance for Base.mapreduce_empty(::Function, ::Function, ::Type) (901 children)
   43 mt_cache

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)

using OrdinaryDiffEq, SnoopCompile
prob = ODEProblem(lorenz,u0,tspan)
alg = Rodas5()
tinf = @snoopi_deep solve(prob,alg)

InferenceTimingNode: 1.460752/15.745000 on Core.Compiler.Timings.ROOT() with 46 direct children

So... two last ones to try...

using PackageCompiler
create_sysimage([:StaticArrays, :ForwardDiff, :LabelledArrays, :ChainRulesCore, :SciMLBase, :FillArrays]; replace_default=true)

# And comment out that one DiffEqBase line that causes an invalidation

...

using SnoopCompile
using RecursiveFactorization
invalidations = @snoopr using DiffEqBase
length(invalidations) # 100
trees = invalidation_trees(invalidations) # 0!

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)

using OrdinaryDiffEq, SnoopCompile
prob = ODEProblem(lorenz,u0,tspan)
alg = Rodas5()
tinf = @snoopi_deep solve(prob,alg)

InferenceTimingNode: 1.436485/15.870688 on Core.Compiler.Timings.ROOT() with 46 direct children

😅 well that failed.

@ChrisRackauckas
Copy link
Member Author

So summary of that. Eliminating all major invalidation trees by putting the sources in the system image, compile times did not budge at all. And with that I still have:

julia> show(stdout,MIME"text/plain"(),staleinstances(tinf))
45-element Vector{SnoopCompileCore.InferenceTiming}:
 InferenceTiming: 0.000051/0.010410 on ForwardDiff.var"#s10#33"(::Any, ::Any, ::Any, ::Any)
 InferenceTiming: 0.000442/0.010359 on ForwardDiff.tupexpr(#34::ForwardDiff.var"#34#35", ::Any)
 InferenceTiming: 0.000990/0.008745 on collect(::Base.Generator{_A, ForwardDiff.var"#16#17"{ForwardDiff.var"#34#35"}} where _A)
 InferenceTiming: 0.002431/0.004820 on Base.collect_to_with_first!(::AbstractArray, ::Expr, ::Base.Generator{_A, ForwardDiff.var"#16#17"{ForwardDiff.var"#34#35"}} where _A, ::Any)
 InferenceTiming: 0.000351/0.006221 on ForwardDiff.tupexpr(#34::ForwardDiff.var"#34#35", ::Int64)
 InferenceTiming: 0.000057/0.000622 on Base.cconvert(::Type{Int32}, ::Enum{T2}) where T2<:Integer
 InferenceTiming: 0.000170/0.000565 on Int32(::Enum)
 InferenceTiming: 0.000114/0.000175 on Static.var"#s3#1"(::Any, ::Any, ::Any, ::Type, ::Any)
 InferenceTiming: 0.000129/0.000199 on Static.var"#s3#2"(::Any, ::Any, ::Any, ::Type, ::Any)
 InferenceTiming: 0.000117/0.000180 on Static.var"#s3#3"(::Any, ::Any, ::Any, ::Type, ::Any)
 InferenceTiming: 0.000129/0.000193 on Static.var"#s3#5"(::Any, ::Any, ::Any, ::Type, ::Any)
 InferenceTiming: 0.005421/0.011408 on getindex(::Core.SimpleVector, ::AbstractArray)
 InferenceTiming: 0.000917/0.000917 on Base.IteratorSize(::AbstractArray)
 InferenceTiming: 0.009340/0.014736 on ArrayInterface.var"#s13#18"(::Any, ::Any, ::Any, ::Any, ::Any)
 InferenceTiming: 0.000730/0.002170 on (::Colon)(::Int64, ::Static.StaticInt{U}) where U
 InferenceTiming: 0.001248/0.001248 on ArrayInterface.OptionallyStaticUnitRange(::Int64, ::Union{Int64, Static.StaticInt})
 InferenceTiming: 0.000192/0.000192 on ArrayInterface.OptionallyStaticUnitRange(::Int64, ::Integer)
 InferenceTiming: 0.001313/0.002110 on ArrayInterface.var"#s13#21"(::Any, ::Any, ::Any, ::Type, ::Any)
 InferenceTiming: 0.000906/0.001342 on ArrayInterface.var"#s13#22"(::Any, ::Any, ::Any, ::Any, ::Type, ::Any)
 InferenceTiming: 0.001090/0.001946 on Static.var"#s3#27"(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)
 InferenceTiming: 0.002478/0.004839 on ArrayInterface.var"#s49#45"(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Type, ::Type, ::Any)
 InferenceTiming: 0.001974/0.002299 on ArrayInterface.rank_to_sortperm(::Tuple{Vararg{Static.StaticInt, N}}) where N
 InferenceTiming: 0.000070/0.015091 on ForwardDiff.var"#s10#21"(::Any, ::Any, ::Any, ::Any)
 InferenceTiming: 0.000489/0.015021 on ForwardDiff.tupexpr(#22::ForwardDiff.var"#22#23", ::Any)
 InferenceTiming: 0.001327/0.013339 on collect(::Base.Generator{_A, ForwardDiff.var"#16#17"{ForwardDiff.var"#22#23"}} where _A)
 InferenceTiming: 0.000279/0.000279 on Base._array_for(::Type{Symbol}, ::Any, Base.HasLength()::Base.HasLength)
 InferenceTiming: 0.002368/0.007726 on Base.collect_to_with_first!(::AbstractArray, ::Symbol, ::Base.Generator{_A, ForwardDiff.var"#16#17"{ForwardDiff.var"#22#23"}} where 
_A, ::Any)
 InferenceTiming: 0.002375/0.005359 on Base.collect_to!(::AbstractArray, ::Base.Generator{_A, ForwardDiff.var"#16#17"{ForwardDiff.var"#22#23"}} where _A, ::Any, ::Any)    
 InferenceTiming: 0.002984/0.002984 on Base.setindex_widen_up_to(::AbstractArray, ::Symbol, ::Any)
 InferenceTiming: 0.000394/0.006532 on ForwardDiff.tupexpr(#22::ForwardDiff.var"#22#23", ::Int64)
 InferenceTiming: 0.000053/0.010643 on ForwardDiff.var"#s10#42"(::Any, ::Any, ::Any, ::Any)
 InferenceTiming: 0.000459/0.010590 on ForwardDiff.tupexpr(#43::ForwardDiff.var"#43#44", ::Any)
 InferenceTiming: 0.001090/0.008975 on collect(::Base.Generator{_A, ForwardDiff.var"#16#17"{ForwardDiff.var"#43#44"}} where _A)
 InferenceTiming: 0.002429/0.004903 on Base.collect_to_with_first!(::AbstractArray, ::Expr, ::Base.Generator{_A, ForwardDiff.var"#16#17"{ForwardDiff.var"#43#44"}} where _A, ::Any)
 InferenceTiming: 0.000367/0.006414 on ForwardDiff.tupexpr(#43::ForwardDiff.var"#43#44", ::Int64)
 InferenceTiming: 0.000088/0.032105 on ForwardDiff.var"#s10#45"(::Any, ::Any, ::Any)
 InferenceTiming: 0.000833/0.032017 on ForwardDiff.tupexpr(#46::ForwardDiff.var"#46#47", ::Any)
 InferenceTiming: 0.001881/0.011196 on collect(::Base.Generator{_A, ForwardDiff.var"#16#17"{ForwardDiff.var"#46#47"}} where _A)
 InferenceTiming: 0.002700/0.005390 on Base.collect_to_with_first!(::AbstractArray, ::Expr, ::Base.Generator{_A, ForwardDiff.var"#16#17"{ForwardDiff.var"#46#47"}} where _A, ::Any)
 InferenceTiming: 0.000511/0.007142 on ForwardDiff.tupexpr(#46::ForwardDiff.var"#46#47", ::Int64)
 InferenceTiming: 0.000059/0.011278 on ForwardDiff.var"#s10#48"(::Any, ::Any, ::Any, ::Any, ::Any, ::Any)
 InferenceTiming: 0.000487/0.011219 on ForwardDiff.tupexpr(#49::ForwardDiff.var"#49#50", ::Any)
 InferenceTiming: 0.001180/0.009389 on collect(::Base.Generator{_A, ForwardDiff.var"#16#17"{ForwardDiff.var"#49#50"}} where _A)
 InferenceTiming: 0.002482/0.004950 on Base.collect_to_with_first!(::AbstractArray, ::Expr, ::Base.Generator{_A, ForwardDiff.var"#16#17"{ForwardDiff.var"#49#50"}} where _A, ::Any)
 InferenceTiming: 0.000393/0.007056 on ForwardDiff.tupexpr(#49::ForwardDiff.var"#49#50", ::Int64)

and:

julia> show(stdout,MIME"text/plain"(),invalidations)
100-element Vector{Any}:
 MethodInstance for FunctionWrappers.convert_ret(::Type{Any}, ::Any)
 "insert_backedges"
 MethodInstance for (::FunctionWrappers.CallWrapper{Any})(::typeof(identity), ::Any)
 "insert_backedges"
 MethodInstance for Base.IteratorSize(::Type)
 "invalidate_mt_cache"
 MethodInstance for Base.IteratorEltype(::Type)
 "invalidate_mt_cache"
 MethodInstance for Base.IteratorEltype(::Type)
 "invalidate_mt_cache"
 MethodInstance for Base.IteratorEltype(::Type)
 "invalidate_mt_cache"
 MethodInstance for Base.IteratorEltype(::Type)
 "invalidate_mt_cache"
 MethodInstance for show(::IOBuffer, ::Any)
 "invalidate_mt_cache"
 MethodInstance for show(::IOContext{IOBuffer}, ::Any)
 "invalidate_mt_cache"
 MethodInstance for Setfield.parse_obj_lenses(::Any)
 "insert_backedges"
 MethodInstance for Setfield.parse_obj_lenses(::Symbol)
 "insert_backedges"
 MethodInstance for Setfield.parse_obj_lenses(::Expr)
 "insert_backedges"
 MethodInstance for Setfield.parse_obj_lenses_composite(::Vector)
 "insert_backedges"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"
 MethodInstance for promote_rule(::Type, ::Type)
 "invalidate_mt_cache"

That seems to be conclusive that invalidations are not the issue here?

@timholy
Copy link
Contributor

timholy commented Aug 11, 2021

BTW @timholy Elisabeth is trying to catch you to finalize the draft for submission: that's probably more time sensitive (sneaking this reminder in there sweat_smile )

We met yesterday morning 🙂

That seems to be conclusive that invalidations are not the issue here?

That does seem to be likely. One thing to check: with the precompile and just loading the package, can you find the MethodInstance with methodinstance(Tuple{DefaultLinSolve,Vector{Float64},Any,Vector{Float64},Bool}) or even just methodinstances(DefaultLinSolve) from MethodAnalysis.jl?

@KristofferC
Copy link

I think that a sysimage can still contain "primed" invalidations that are not realized until functions are executed. If you build the sysimage twice though it seems to resolve (https://discourse.julialang.org/t/slow-julia-startup-time-after-sysimage-creation-and-an-unbelievable-observation/44102/23?u=kristoffer.carlsson)? Haven't looked into that though.

@ChrisRackauckas
Copy link
Member Author

Okay, well interesting. I compiled OrdinaryDiffEq.jl into my system image:

using PackageCompiler
create_sysimage([:StaticArrays, :ForwardDiff, :LabelledArrays, :ChainRulesCore, :SciMLBase, :FillArrays, :DiffEqBase, :OrdinaryDiffEq]; replace_default=true)

using SnoopCompile
using RecursiveFactorization
invalidations = @snoopr using DiffEqBase
length(invalidations) # 0
trees = invalidation_trees(invalidations) # zero

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)

using OrdinaryDiffEq, SnoopCompile
prob = ODEProblem(lorenz,u0,tspan)
alg = Rodas5()
tinf = @snoopi_deep solve(prob,alg)

and it still didn't tackle the majority of the compile time:

InferenceTimingNode: 1.394632/12.263162 on Core.Compiler.Timings.ROOT() with 46 direct children

and it's still all that same function:

Capture

I guess that's probably the most clear way to confirm that it doesn't even try to get precompiled. What's interesting though is that I can confirm that the bar above it is the RecursiveFactorization.lu call (well, above the keyword argument dispatch), and that precompiles just fine with the updates of JuliaLinearAlgebra/RecursiveFactorization.jl#30 (now on latest release)

using RecursiveFactorization, SnoopCompile
A = rand(2,2)
@snoopi_deep RecursiveFactorization.lu!(A)

InferenceTimingNode: 0.038368/0.042615 on Core.Compiler.Timings.ROOT() with 1 direct children

So it's only from the DiffEq usage.

That does seem to be likely. One thing to check: with the precompile and just loading the package, can you find the MethodInstance with methodinstance(Tuple{DefaultLinSolve,Vector{Float64},Any,Vector{Float64},Bool}) or even just methodinstances(DefaultLinSolve) from MethodAnalysis.jl?

julia> methodinstances(DefaultLinSolve)
5-element Vector{Core.MethodInstance}:
 MethodInstance for DefaultLinSolve()
 MethodInstance for DefaultLinSolve(::Nothing, ::Nothing, ::Nothing)
 MethodInstance for DefaultLinSolve(::Function, ::Vector{Int64}, ::Nothing)
 MethodInstance for DefaultLinSolve(::Any, ::Vector{Int64}, ::Nothing)
 MethodInstance for DefaultLinSolve(::SciMLBase.UJacobianWrapper{_A, Float64, SciMLBase.NullParameters} where _A, ::Vector{Int64}, ::Nothing)

but

methodinstance(Tuple{DefaultLinSolve,Vector{Float64},Any,Vector{Float64},Bool}) # nothing

so, that being nothing is likely the issue?

BTW, to get that to print correctly I had to do:

function MethodAnalysis.call_type(tt)
    ft = tt.parameters[1]
    argt = Tuple{tt.parameters[2:end]...}
    name = Symbol(String(ft.name.name)[1:end])  # was 2:end, now 1:end
    return (getfield(ft.name.module, name), argt)
end

otherwise I got:

UndefVarError: efaultLinSolve not defined
call_type(tt::Type) at MethodAnalysis.jl:28
methodinstance(types::Any) at MethodAnalysis.jl:108
top-level scope at test.jl:245
eval at boot.jl:373 [inlined]

Seems like it doesn't always lead with a # and should check for it first?

@KristofferC
Copy link

and it still didn't tackle the majority of the compile time:

To properly tackle the compile time you want to use a precompile_script with your example code. But then it won't be representative of what you can get with normal precompilation so perhaps that is why you don't do that.

@ChrisRackauckas
Copy link
Member Author

This library has a precompile.jl which, using @timholy 's advice, is at:

let
    while true
        _testf(du,u,p,t) = copyto!(du,u)
        b = rand(1); x = rand(1)
        _linsolve = DEFAULT_LINSOLVE(Val{:init},ODEFunction(_testf),b)
        A = rand(1,1)
        _linsolve(x,A,b,true)
        _linsolve(x,A,b,false)
        break
    end
end

So, if I'm understanding things correctly, the problem seems to be that

        _linsolve(x,A,b,true)
        _linsolve(x,A,b,false)

are compiling method instances not with Any but with Matrix{Float64} (see #698 (comment)). So I'm going to put a type parameter on there and see if I can force it to want to do the non-Any version (I already tried @nospecialize above)

@ChrisRackauckas
Copy link
Member Author

Okay, now we've got something. What that commit I just did, I get down to 3.5 second precompilation with just the default Julia system image:

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)

using OrdinaryDiffEq, SnoopCompile
prob = ODEProblem(lorenz,u0,tspan)
alg = Rodas5()
tinf = @snoopi_deep solve(prob,alg)

InferenceTimingNode: 1.412334/3.456491 on Core.Compiler.Timings.ROOT() with 46 direct children

That 3.5 seconds is precisely how much the DiffEqBase system image chopped off, so that seems to be invalidations and the like which we can worry about later. But 15 seconds -> 3.5 seems to come from just forcing that function to only allow A::Matrix{Float64}, presumably because that's the specific method I'm generating in the precompile. However, the usage in OrdinaryDiffEq also uses Matrix{Float64}, so (a) I do not get why it's wanting to use the Any method instead of Matrix{Float64} and (b) how one could tell it to precompile the Any method. I tried forcing that earlier in #698 (comment) but Julia called it an inactive precompile statement. But yay, concrete questions now!

@timholy
Copy link
Contributor

timholy commented Aug 11, 2021

I should have mentioned the Any earlier, sorry, but I hadn't done my homework to see if that was going to be an issue (some Anys are not, particularly if you've deliberately despecialized something). You might check the caller with Cthulhu; SnoopCompile provides ascend overloads like ascend(itrig), so it's pretty simple to do.

@ChrisRackauckas
Copy link
Member Author

ChrisRackauckas commented Aug 11, 2021

Okay, nailed it. @timholy if you need the (not very) tl;dr, this is it.

With all of these precompiles setup, with SciML/OrdinaryDiffEq.jl#1468 (latest release), and without that latest commit (no ::Matrix{Float64} on the default linsolve):

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)

using OrdinaryDiffEq, SnoopCompile
prob = ODEProblem(lorenz,u0,tspan)
alg = Rodas5(autodiff=false)
tinf = @snoopi_deep solve(prob,alg)
InferenceTimingNode: 1.076522/1.776459 on Core.Compiler.Timings.ROOT() with 9 direct children

We have sub 2 second compile times for the same method with autodiff=false (i.e. using FiniteDiff instead of SparseDiffTools). But when autodiff is used (the default)

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)

using OrdinaryDiffEq, SnoopCompile
prob = ODEProblem(lorenz,u0,tspan)
alg = Rodas5()
tinf = @snoopi_deep solve(prob,alg)
InferenceTimingNode: 1.156932/15.162334 on Core.Compiler.Timings.ROOT() with 42 direct children

And it even recompiles all of that in the same session. The inference triggers are completely different between the two. With finite differencing:

8-element Vector{InferenceTrigger}:
 Inference triggered to call setproperty!(::Function, ::Symbol, ::SciMLBase.NullParameters) from calc_tderivative! (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\derivative_utils.jl:34) with specialization OrdinaryDiffEq.calc_tderivative!(::OrdinaryDiffEq.ODEIntegrator{Rodas5{0, false, DefaultLinSolve, Val{:forward}}, 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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, false, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}, 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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, ::OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}, ::Float64, ::Bool)
 Inference triggered to call (NamedTuple{(:dir,)})(::Tuple{Bool}) from derivative! (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\derivative_wrappers.jl:10) with specialization OrdinaryDiffEq.derivative!(::Vector{Float64}, ::SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, 
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, ::Float64, ::Vector{Float64}, ::OrdinaryDiffEq.ODEIntegrator{Rodas5{0, false, DefaultLinSolve, Val{:forward}}, 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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, false, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, 
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}, 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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, ::FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()})
 Inference triggered to call (::FiniteDiff.var"#finite_difference_gradient!##kw")(::NamedTuple{(:dir,), Tuple{Bool}}, ::typeof(FiniteDiff.finite_difference_gradient!), ::Vector{Float64}, ::Function, ::Float64, ::FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}) from derivative! (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\derivative_wrappers.jl:10) with specialization OrdinaryDiffEq.derivative!(::Vector{Float64}, ::SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, ::Float64, ::Vector{Float64}, ::OrdinaryDiffEq.ODEIntegrator{Rodas5{0, false, DefaultLinSolve, Val{:forward}}, 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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, 
Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, false, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, 
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}, 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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, 
::FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()})
 Inference triggered to call OrdinaryDiffEq.jacobian_finitediff_forward!(::Matrix{Float64}, ::Function, ::Vector{Float64}, ::FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, ::Vector{Float64}, ::OrdinaryDiffEq.ODEIntegrator{Rodas5{0, false, DefaultLinSolve, Val{:forward}}, 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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, false, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}, 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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}) from jacobian! (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\derivative_wrappers.jl:107) inlined into OrdinaryDiffEq.calc_J!(::Matrix{Float64}, ::OrdinaryDiffEq.ODEIntegrator{Rodas5{0, false, DefaultLinSolve, Val{:forward}}, 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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, 
false, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, 
Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}, 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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, ::OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, 
Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}) (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\derivative_utils.jl:138)
 Inference triggered to call (::FiniteDiff.var"#finite_difference_jacobian!##kw")(::NamedTuple{(:dir,), Tuple{Bool}}, ::typeof(FiniteDiff.finite_difference_jacobian!), ::Matrix{Float64}, ::Function, ::Vector{Float64}, ::FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, ::Vector{Float64}) from jacobian_finitediff_forward! (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\derivative_wrappers.jl:89) with specialization OrdinaryDiffEq.jacobian_finitediff_forward!(::Matrix{Float64}, ::Function, ::Vector{Float64}, ::FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, ::Vector{Float64}, ::OrdinaryDiffEq.ODEIntegrator{Rodas5{0, false, DefaultLinSolve, Val{:forward}}, 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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, false, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}}, DiffEqBase.DEStats}, ODEFunction{true, 
typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), 
Float64, Val{true}()}}, 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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit})
 Inference triggered to call unsafe_copyto!(::Matrix{Float64}, ::Int64, ::Matrix{Float64}, ::Int64, ::Int64) from _copyto_impl! (.\array.jl:331) inlined into OrdinaryDiffEq.calc_W!(::Matrix{Float64}, ::OrdinaryDiffEq.ODEIntegrator{Rodas5{0, false, DefaultLinSolve, Val{:forward}}, 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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, false, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}, 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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, ::Nothing, ::OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}, ::Float64, ::Bool, ::Bool) (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\derivative_utils.jl:499)   
 Inference triggered to call DiffEqBase.var"#_#31"(::Nothing, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::DefaultLinSolve, ::Vector{Float64}, ::Matrix{Float64}, ::Vector{Float64}, ::Bool) called from toplevel
 Inference triggered to call LinearAlgebra.var"#generic_lufact!#152"(::Bool, ::typeof(LinearAlgebra.generic_lufact!), ::Matrix{Float64}, ::LinearAlgebra.RowMaximum) from generic_lufact!##kw (C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\LinearAlgebra\src\lu.jl:139) inlined into DiffEqBase.var"#_#31"(::Nothing, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::DefaultLinSolve, ::Vector{Float64}, ::Matrix{Float64}, ::Vector{Float64}, ::Bool) (C:\Users\accou\.julia\dev\DiffEqBase\src\linear_nonlinear.jl:112)

and with autodiff:

julia> show(stdout,MIME"text/plain"(),inference_triggers(tinf))
41-element Vector{InferenceTrigger}:
 Inference triggered to call OrdinaryDiffEq.build_grad_config(::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Function, ::SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, ::Vector{Float64}, ::Float64) from alg_cache (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\caches\rosenbrock_caches.jl:587) with specialization OrdinaryDiffEq.alg_cache(::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Vector{Float64}, ::Vector{Float64}, ::Type{Float64}, ::Type{Float64}, ::Type{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, ::Float64, ::Float64, ::Float64, ::SciMLBase.NullParameters, ::Bool, ::Val{true})
 Inference triggered to call SparseDiffTools.var"#ForwardColorJacCache#12"(::Nothing, ::UnitRange{Int64}, ::Nothing, ::Type{SparseDiffTools.ForwardColorJacCache}, ::Function, ::Vector{Float64}, ::Nothing) from Type##kw (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:22) inlined into OrdinaryDiffEq.alg_cache(::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Vector{Float64}, ::Vector{Float64}, ::Type{Float64}, ::Type{Float64}, ::Type{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, ::Float64, ::Float64, ::Float64, ::SciMLBase.NullParameters, ::Bool, ::Val{true}) (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\caches\rosenbrock_caches.jl:588)
 Inference triggered to call SparseDiffTools.generate_chunked_partials(::Vector{Float64}, ::UnitRange{Int64}, ::Val{3}) from generate_chunked_partials (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:44) with specialization SparseDiffTools.generate_chunked_partials(::Vector{Float64}, ::UnitRange{Int64}, ::Int64)
 Inference triggered to call hcat(::BitMatrix, ::BitMatrix) from generate_chunked_partials (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:51) with specialization SparseDiffTools.generate_chunked_partials(::Vector{Float64}, ::UnitRange{Int64}, ::Val{3})
 Inference triggered to call getindex(::BitMatrix, ::Function, ::UnitRange{Int64}) from #15 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:53) with specialization (::SparseDiffTools.var"#15#16"{3})(::Int64)
 Inference triggered to call eachrow(::BitMatrix) from #15 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:53) with specialization (::SparseDiffTools.var"#15#16"{3})(::Int64)
 Inference triggered to call Base.Broadcast.broadcasted(::Type, ::Base.Generator{Base.OneTo{Int64}, Base.var"#215#216"{BitMatrix}}) from #15 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:53) with specialization (::SparseDiffTools.var"#15#16"{3})(::Int64)
 Inference triggered to call (Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}})(::Type{Tuple}, ::Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}}) from broadcasted (.\broadcast.jl:1343) inlined into Base.Broadcast.broadcasted(::Type, ::Base.Generator{Base.OneTo{Int64}, Base.var"#215#216"{BitMatrix}}) (.\broadcast.jl:1335)
 Inference triggered to call Base.Broadcast.materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Type{Tuple}, Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}}}) from #15 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:53) with specialization (::SparseDiffTools.var"#15#16"{3})(::Int64)
 Inference triggered to call Base.Broadcast.combine_eltypes(::Type, ::Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}}) from 
copy (.\broadcast.jl:926) inlined into Base.Broadcast.materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Type{Tuple}, Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}}}) (.\broadcast.jl:904)
 Inference triggered to call Core.Compiler.return_type(::Any, ::Any) from combine_eltypes (.\broadcast.jl:761) with specialization Base.Broadcast.combine_eltypes(::Type, ::Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}})
 Inference triggered to call Core.Compiler.return_type(::Any, ::Any, ::UInt64) from combine_eltypes (.\broadcast.jl:761) with specialization Base.Broadcast.combine_eltypes(::Type, ::Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}})
 Inference triggered to call Core.Compiler.return_type(::Core.Compiler.NativeInterpreter, ::Any, ::Any) from combine_eltypes (.\broadcast.jl:761) with specialization Base.Broadcast.combine_eltypes(::Type, ::Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}})
 Inference triggered to call Core.Compiler.typeinf_type(::Core.Compiler.NativeInterpreter, ::Method, ::Any, ::Core.SimpleVector) from combine_eltypes (.\broadcast.jl:761) 
with specialization Base.Broadcast.combine_eltypes(::Type, ::Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}})
 Inference triggered to call Core.Compiler.contains_is(::Core.SimpleVector, ::Any) from combine_eltypes (.\broadcast.jl:761) with specialization Base.Broadcast.combine_eltypes(::Type, ::Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}})
 Inference triggered to call Base.Broadcast.promote_typejoin_union(::Type{Tuple{Vararg{Bool}}}) from combine_eltypes (.\broadcast.jl:761) with specialization Base.Broadcast.combine_eltypes(::Type, ::Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}})
 Inference triggered to call similar(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, Type{Tuple}, Tuple{Base.Broadcast.Extruded{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}, Tuple{Bool}, Tuple{Int64}}}}, ::Type{Tuple{Bool, Bool, Bool}}) from copy (.\broadcast.jl:944) inlined into Base.Broadcast.materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Type{Tuple}, Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}}}) (.\broadcast.jl:904)
 Inference triggered to call setindex!(::Vector{Tuple{Bool, Bool, Bool}}, ::Tuple{Bool, Bool, Bool}, ::Int64) from copy (.\broadcast.jl:945) inlined into Base.Broadcast.materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Type{Tuple}, Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}}}) (.\broadcast.jl:904)
 Inference triggered to call ndims(::Vector{Tuple{Bool, Bool, Bool}}) from copy (.\broadcast.jl:950) inlined into Base.Broadcast.materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Type{Tuple}, Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}}}) (.\broadcast.jl:904)
 Inference triggered to call Base.Broadcast.copyto_nonleaf!(::Vector{Tuple{Bool, Bool, Bool}}, ::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, Type{Tuple}, Tuple{Base.Broadcast.Extruded{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}, Tuple{Bool}, Tuple{Int64}}}}, ::Base.OneTo{Int64}, ::Int64, ::Int64) from copy (.\broadcast.jl:951) inlined into Base.Broadcast.materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Type{Tuple}, Tuple{Vector{SubArray{Bool, 1, BitMatrix, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}}}}) (.\broadcast.jl:904)
 Inference triggered to call Base._similar_for(::UnitRange{Int64}, ::Type{Vector{Tuple{Bool, Bool, Bool}}}, ::Base.Generator{UnitRange{Int64}, SparseDiffTools.var"#15#16"{3}}, ::Base.HasShape{1}) from _collect (.\array.jl:728) with specialization Base._collect(::UnitRange{Int64}, ::Base.Generator{UnitRange{Int64}, SparseDiffTools.var"#15#16"{3}}, ::Base.EltypeUnknown, ::Base.HasShape{1})
 Inference triggered to call Base.collect_to_with_first!(::Vector{Vector{Tuple{Bool, Bool, Bool}}}, ::Vector{Tuple{Bool, Bool, Bool}}, ::Base.Generator{UnitRange{Int64}, SparseDiffTools.var"#15#16"{3}}, ::Int64) from _collect (.\array.jl:728) with specialization Base._collect(::UnitRange{Int64}, ::Base.Generator{UnitRange{Int64}, SparseDiffTools.var"#15#16"{3}}, ::Base.EltypeUnknown, ::Base.HasShape{1})
 Inference triggered to call Base.Broadcast.broadcasted(::Function, ::Type, ::Vector{Vector{Tuple{Bool, Bool, Bool}}}) from #ForwardColorJacCache#12 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:28) with specialization SparseDiffTools.var"#ForwardColorJacCache#12"(::Nothing, ::UnitRange{Int64}, ::Nothing, ::Type{SparseDiffTools.ForwardColorJacCache}, ::Function, ::Vector{Float64}, ::Nothing)
 Inference triggered to call Base.Broadcast.combine_styles(::Base.RefValue{Type{Array}}, ::Vector{Vector{Tuple{Bool, Bool, Bool}}}) from broadcasted (.\broadcast.jl:1341) 
with specialization Base.Broadcast.broadcasted(::Function, ::Type, ::Vector{Vector{Tuple{Bool, Bool, Bool}}})
 Inference triggered to call (Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}})(::typeof(Adapt.adapt), ::Tuple{Base.RefValue{Type{Array}}, Vector{Vector{Tuple{Bool, Bool, Bool}}}}) from broadcasted (.\broadcast.jl:1343) inlined into Base.Broadcast.broadcasted(::Function, ::Type, ::Vector{Vector{Tuple{Bool, Bool, Bool}}}) (.\broadcast.jl:1341)
 Inference triggered to call Base.Broadcast.materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(Adapt.adapt), Tuple{Base.RefValue{Type{Array}}, Vector{Vector{Tuple{Bool, Bool, Bool}}}}}) from #ForwardColorJacCache#12 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:28) with specialization SparseDiffTools.var"#ForwardColorJacCache#12"(::Nothing, ::UnitRange{Int64}, ::Nothing, ::Type{SparseDiffTools.ForwardColorJacCache}, ::Function, ::Vector{Float64}, ::Nothing)
 Inference triggered to call first(::Vector{Vector{Tuple{Bool, Bool, Bool}}}) from #ForwardColorJacCache#12 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:29) with specialization SparseDiffTools.var"#ForwardColorJacCache#12"(::Nothing, ::UnitRange{Int64}, ::Nothing, ::Type{SparseDiffTools.ForwardColorJacCache}, ::Function, ::Vector{Float64}, ::Nothing)
 Inference triggered to call Base.Broadcast.broadcasted(::Type, ::Vector{Float64}, ::Vector{Tuple{Bool, Bool, Bool}}) from #ForwardColorJacCache#12 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:29) with specialization SparseDiffTools.var"#ForwardColorJacCache#12"(::Nothing, ::UnitRange{Int64}, ::Nothing, ::Type{SparseDiffTools.ForwardColorJacCache}, ::Function, ::Vector{Float64}, ::Nothing)
 Inference triggered to call (Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}})(::Type{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}}}, ::Tuple{Vector{Float64}, Vector{Tuple{Bool, Bool, Bool}}}) from broadcasted (.\broadcast.jl:1343) inlined into Base.Broadcast.broadcasted(::Type, ::Vector{Float64}, ::Vector{Tuple{Bool, Bool, Bool}}) (.\broadcast.jl:1341)
 Inference triggered to call Base.Broadcast.materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Type{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}}}, Tuple{Vector{Float64}, Vector{Tuple{Bool, Bool, Bool}}}}) from #ForwardColorJacCache#12 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:29) with specialization SparseDiffTools.var"#ForwardColorJacCache#12"(::Nothing, ::UnitRange{Int64}, ::Nothing, ::Type{SparseDiffTools.ForwardColorJacCache}, ::Function, ::Vector{Float64}, ::Nothing)   
 Inference triggered to call ArrayInterface.restructure(::Vector{Float64}, ::Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}) from #ForwardColorJacCache#12 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:30) with specialization SparseDiffTools.var"#ForwardColorJacCache#12"(::Nothing, ::UnitRange{Int64}, ::Nothing, ::Type{SparseDiffTools.ForwardColorJacCache}, ::Function, ::Vector{Float64}, ::Nothing)
 Inference triggered to call similar(::Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}) from #ForwardColorJacCache#12 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:32) with specialization SparseDiffTools.var"#ForwardColorJacCache#12"(::Nothing, ::UnitRange{Int64}, ::Nothing, ::Type{SparseDiffTools.ForwardColorJacCache}, ::Function, ::Vector{Float64}, ::Nothing)
 Inference triggered to call SparseDiffTools.ForwardColorJacCache(::Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, ::Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, ::Vector{Float64}, ::Vector{Vector{Tuple{Bool, Bool, Bool}}}, ::UnitRange{Int64}, ::Nothing, ::Int64) from #ForwardColorJacCache#12 (C:\Users\accou\.julia\packages\SparseDiffTools\Iv3lV\src\differentiation\compute_jacobian_ad.jl:41) with specialization SparseDiffTools.var"#ForwardColorJacCache#12"(::Nothing, ::UnitRange{Int64}, ::Nothing, ::Type{SparseDiffTools.ForwardColorJacCache}, ::Function, ::Vector{Float64}, ::Nothing)
 Inference triggered to call OrdinaryDiffEq.Rosenbrock5Cache(::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Matrix{Float64}, ::Matrix{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, ::SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, ::SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, ::Vector{Float64}, ::DefaultLinSolve, ::SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, 
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, 
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, ::Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}) from alg_cache (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\caches\rosenbrock_caches.jl:589) with specialization OrdinaryDiffEq.alg_cache(::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Vector{Float64}, ::Vector{Float64}, ::Type{Float64}, ::Type{Float64}, ::Type{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, 
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, ::Float64, ::Float64, ::Float64, ::SciMLBase.NullParameters, ::Bool, ::Val{true})
 Inference triggered to call OrdinaryDiffEq.InterpolationData(::ODEFunction{true, typeof(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}}}, ::Bool, ::OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}) from #__init#472 (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\solve.jl:363) with specialization OrdinaryDiffEq.var"#__init#472"(::Tuple{}, ::Tuple{}, ::Tuple{}, ::Nothing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Nothing, ::Bool, ::Bool, ::Float64, ::Nothing, ::Float64, ::Bool, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Int64, ::Int64, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Nothing, ::Bool, ::Int64, ::Int64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof(LinearAlgebra.opnorm), ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::OrdinaryDiffEq.DefaultInit, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(SciMLBase.__init), 
::ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, ::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Tuple{}, ::Tuple{}, ::Tuple{}, ::Type{Val{true}})      
 Inference triggered to call (NamedTuple{(:dense, :k, :interp, :calculate_error, :destats)})(::Tuple{Bool, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}}, Bool, DiffEqBase.DEStats}) from #__init#472 (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\solve.jl:364) with specialization OrdinaryDiffEq.var"#__init#472"(::Tuple{}, ::Tuple{}, ::Tuple{}, ::Nothing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Nothing, ::Bool, ::Bool, ::Float64, ::Nothing, ::Float64, ::Bool, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Int64, ::Int64, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Nothing, ::Bool, ::Int64, ::Int64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof(LinearAlgebra.opnorm), ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::OrdinaryDiffEq.DefaultInit, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(SciMLBase.__init), ::ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, ::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Tuple{}, ::Tuple{}, ::Tuple{}, ::Type{Val{true}})
 Inference triggered to call (::SciMLBase.var"#build_solution##kw")(::NamedTuple{(:dense, :k, :interp, :calculate_error, :destats), Tuple{Bool, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, 
Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}}, Bool, DiffEqBase.DEStats}}, ::typeof(SciMLBase.build_solution), ::ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, ::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Vector{Float64}, ::Vector{Vector{Float64}}) from #__init#472 (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\solve.jl:364) with specialization OrdinaryDiffEq.var"#__init#472"(::Tuple{}, ::Tuple{}, ::Tuple{}, ::Nothing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Nothing, ::Bool, ::Bool, ::Float64, ::Nothing, ::Float64, ::Bool, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Int64, ::Int64, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Nothing, ::Bool, ::Int64, ::Int64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof(LinearAlgebra.opnorm), ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::OrdinaryDiffEq.DefaultInit, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(SciMLBase.__init), ::ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, ::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Tuple{}, ::Tuple{}, ::Tuple{}, ::Type{Val{true}})
 Inference triggered to call OrdinaryDiffEq.ODEIntegrator{Rodas5{0, true, DefaultLinSolve, Val{:forward}}, 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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, true, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, 
typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, 
Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, 
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, 
SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}, 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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, 
Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}(::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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, true, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}}, DiffEqBase.DEStats}, ::Vector{Float64}, ::Nothing, ::Vector{Vector{Float64}}, ::Float64, ::Float64, ::Function, ::SciMLBase.NullParameters, ::Vector{Float64}, ::Vector{Float64}, ::Nothing, ::Float64, ::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Float64, ::Bool, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Int64, ::Int64, ::Int64, ::Int64, ::OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}, ::Nothing, ::Int64, ::Bool, 
::Bool, ::Bool, ::Bool, ::Int64, ::Int64, ::Float64, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, ::DiffEqBase.DEStats, ::OrdinaryDiffEq.DefaultInit) from #__init#472 (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\solve.jl:413) with specialization OrdinaryDiffEq.var"#__init#472"(::Tuple{}, ::Tuple{}, ::Tuple{}, ::Nothing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Nothing, ::Bool, ::Bool, ::Float64, ::Nothing, ::Float64, ::Bool, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Int64, ::Int64, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Nothing, ::Bool, ::Int64, ::Int64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof(LinearAlgebra.opnorm), ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::OrdinaryDiffEq.DefaultInit, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(SciMLBase.__init), ::ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, ::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Tuple{}, ::Tuple{}, ::Tuple{}, ::Type{Val{true}})
 Inference triggered to call DiffEqBase.initialize!(::OrdinaryDiffEq.ODEIntegrator{Rodas5{0, true, DefaultLinSolve, Val{:forward}}, 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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, true, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), 
LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, 
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}, 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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, ::OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}) from #__init#472 (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\solve.jl:456) with specialization OrdinaryDiffEq.var"#__init#472"(::Tuple{}, ::Tuple{}, ::Tuple{}, ::Nothing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Nothing, ::Bool, ::Bool, ::Float64, ::Nothing, ::Float64, ::Bool, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Int64, ::Int64, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Nothing, ::Bool, ::Int64, ::Int64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof(LinearAlgebra.opnorm), ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::OrdinaryDiffEq.DefaultInit, ::Base.Pairs{Symbol, Union{}, Tuple{}, 
NamedTuple{(), Tuple{}}}, ::typeof(SciMLBase.__init), ::ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, ::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Tuple{}, ::Tuple{}, ::Tuple{}, ::Type{Val{true}})
 Inference triggered to call OrdinaryDiffEq.handle_dt!(::OrdinaryDiffEq.ODEIntegrator{Rodas5{0, true, DefaultLinSolve, Val{:forward}}, 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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, true, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}, 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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, 
Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}) from #__init#472 (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\solve.jl:466) with specialization OrdinaryDiffEq.var"#__init#472"(::Tuple{}, ::Tuple{}, ::Tuple{}, ::Nothing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Nothing, ::Bool, ::Bool, ::Float64, ::Nothing, ::Float64, ::Bool, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Int64, ::Int64, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Nothing, ::Bool, ::Int64, ::Int64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof(LinearAlgebra.opnorm), ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::OrdinaryDiffEq.DefaultInit, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(SciMLBase.__init), ::ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, ::Rodas5{0, true, DefaultLinSolve, Val{:forward}}, ::Tuple{}, ::Tuple{}, ::Tuple{}, ::Type{Val{true}})
 Inference triggered to call CommonSolve.solve!(::OrdinaryDiffEq.ODEIntegrator{Rodas5{0, true, DefaultLinSolve, Val{:forward}}, 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(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas5{0, true, DefaultLinSolve, Val{:forward}}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(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.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, 
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, 
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Rosenbrock5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rodas5Tableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, DefaultLinSolve, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, SciMLBase.NullParameters}, Float64}, Float64, 3}}, Vector{Float64}, Vector{Vector{Tuple{Bool, Bool, Bool}}}, UnitRange{Int64}, Nothing}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.TimeGradientWrapper{ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, SciMLBase.NullParameters}, Float64}, Float64, 1}}}, 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.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}) from #__solve#471 (C:\Users\accou\.julia\dev\OrdinaryDiffEq\src\solve.jl:5) with specialization OrdinaryDiffEq.var"#__solve#471"(::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(SciMLBase.__solve), ::ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, ::Rodas5{0, true, DefaultLinSolve, Val{:forward}})

So the issue seems to be that the type-instability that comes from the dual number handling in SparseDiffTools. ForwardDiff.Dual usage in here by default has a little bit of dynamism which comes from the chunk size selection (dependent on the array size). However, if I hardcode that to the right size Rodas5(chunk_size = 3) (which gets lifted to a type parameter), it still does not budge the compile times or invalidations.

So if I understand the chain of events correctly, SparseDiffTools causes inference to lose track of what's going on which causes some dynamic dispatches. While these do not effect runtime performance at all because the next calls are behind big function barriers, this does effect compile times because the compiler loses the ability to figure out that the matrix is A::Matrix{Float64}, so the compiler roams forward and compiles Tuple{DefaultLinSolve,Vector{Float64},Any,Vector{Float64},Bool}. But then at runtime, it will do a dynamic dispatch at the function barrier to actually call Tuple{DefaultLinSolve,Vector{Float64},Matrix{Float64},Vector{Float64},Bool} which it sees it did not compile, and so we hit a 10 second recompilation of the full LU factorization stack.

The ideal solution is to just solve the SparseDiffTools inference issues as much as possible (so I'll go do that now), but is there a way to force Julia to compile Tuple{DefaultLinSolve,Vector{Float64},Any,Vector{Float64},Bool} without changing the code itself? Base.precompile(Tuple{DefaultLinSolve,Vector{Float64},Any,Vector{Float64},Bool}) gives an inactive precompile statement warning, so it seems Julia simply doesn't want to precompile this.

@timholy
Copy link
Contributor

timholy commented Aug 11, 2021

is there a way to force Julia to compile Tuple{DefaultLinSolve,Vector{Float64},Any,Vector{Float64},Bool} without changing the code itself? Base.precompile(Tuple{DefaultLinSolve,Vector{Float64},Any,Vector{Float64},Bool}) gives an inactive precompile statement warning, so it seems Julia simply doesn't want to precompile this.

I haven't dug into the internals of precompile enough yet (that's on the TODO list), but I'm guessing it refuses because it knows that MethodInstance will never run. Nevertheless, it adds considerably to precompile latency since the caller might call it.

Certainly the easiest approach is to try to fix the dispatch, or type-annotate the argument at the callsite (e.g., arg::Matrix{T} or something, assuming T is inferrable).

@ChrisRackauckas
Copy link
Member Author

JuliaArrays/ArrayInterface.jl#188
JuliaDiff/SparseDiffTools.jl#149
SciML/OrdinaryDiffEq.jl#1469

The primary takeaway from JuliaDiff/SparseDiffTools.jl#149 is that map can wreck inference and so removing map does even more than broadcast! That was a map of a broadcast over a potentially uninferred Tuple call so inference seems to have just given up 😅 .

These 3 together make the compile time 2 seconds if the chunk size is chosen:

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)

using OrdinaryDiffEq, SnoopCompile
prob = ODEProblem(lorenz,u0,tspan)
alg = Rodas5(chunk_size = 3)
tinf = @snoopi_deep solve(prob,alg)
InferenceTimingNode: 1.310514/2.560714 on Core.Compiler.Timings.ROOT() with 17 direct children

If the chunk size is not chosen it still cannot infer enough to hit the Matrix{Float64} specialization.

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)

using OrdinaryDiffEq, SnoopCompile
prob = ODEProblem(lorenz,u0,tspan)
alg = Rodas5()
tinf = @snoopi_deep solve(prob,alg)
InferenceTimingNode: 1.200698/15.232669 on Core.Compiler.Timings.ROOT() with 24 direct children

@ChrisRackauckas
Copy link
Member Author

Okay, here it goes:

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)

using OrdinaryDiffEq, SnoopCompile
prob = ODEProblem(lorenz,u0,tspan)

alg = Rodas5()
tinf = @snoopi_deep solve(prob,alg)
InferenceTimingNode: 1.077774/2.868269 on Core.Compiler.Timings.ROOT() with 11 direct children

With the dynamism in the chunk size we are now sub 3 seconds! 🎉 🎉 . The trick came down to helping inference with a higher function barrier. In the previous way, you could choose a chunk size in the algorithm but if you did not, that meant that the differentiation library would. But that would delay the chunk size choice until the generation of the Jacobian, so deep into the setup of the solver, which would make inference have to check a whole bunch of different options for what the combinations of algorithms, chunks, etc. could be. In that case, it would just give up.

But DiffEqBase has a mechanism where we do solve -> preprocess -> __solve (in the solver package). So I added a hook preprocess_alg(alg,u0,p,prob) where in the preprocessing state it could take a look at the algorithm and the problem and automatically change the algorithm. What that means it could look there and say, hey the user didn't specify the chunk size, so let's dynamically change the algorithm to use chunk size N, and now function barrier call into all of __solve. This makes the dynamism only happen at the very beginning and so the compiler can then just know that the rest of the time every dual always matches N chunk size of the algorithm, which then allows inference to be essentially as good as the pre-chosen chunk case.

Valuable lessons here, thanks @timholy

@timholy
Copy link
Contributor

timholy commented Aug 11, 2021

Very impressive progress! And very glad to help.

Next goal: 0.2s. But that will take quite a few months (we'll have to figure out native code caching, and that's a long road). And I think this platform you've hit is already going to be a major win for your users. Kudos to you for seeing this through!

ChrisRackauckas added a commit to SciML/OrdinaryDiffEq.jl that referenced this pull request Aug 11, 2021
ChrisRackauckas added a commit to SciML/OrdinaryDiffEq.jl that referenced this pull request Aug 12, 2021
ChrisRackauckas added a commit to SciML/OrdinaryDiffEq.jl that referenced this pull request Aug 12, 2021
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 this pull request may close these issues.

4 participants