Side note. I took out the for loop so there is only a one time through. I still get a compile error. Is there any advice on how to debug this type of error?
In the Zygote error message it says try/catch is not supported… how do I find that, I don’t think it is in my code and I don’t have any threading. In that long error string will it point to the villain? I’ll keep searching.
I do have some table interpolations going on in the function, could that be a problem?
If I use reverse diff the error is:
ERROR: TypeError: in TrackedReal, in V, expected V<:Real, got Type{Any}
If I use Zygote the error is:
ERROR: Compiling Tuple{typeof(OrdinaryDiffEq._postamble!),OrdinaryDiffEq.ODEIntegrator{OrdinaryDiffEq.Tsit5,true,Array{Float64,1},Nothing,Float64,Array{Any,1},Float64,Float64,Float64,Array{Array{Float64,1},1},SciMLBase.ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},SciMLBase.ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Any,1},SciMLBase.ODEFunction{true,Main.MLSAGA.SAGA.var"#14#15"{Main.MLSAGA.SAGA.SAGAConst},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing},Base.Iterators.Pairs{Symbol,DiffEqBase.CallbackSet{Tuple{DiffEqBase.ContinuousCallback{Main.MLSAGA.SAGA.var"#6#7",typeof(SciMLBase.terminate!),typeof(SciMLBase.terminate!),typeof(DiffEqBase.INITIALIZE_DEFAULT),typeof(DiffEqBase.FINALIZE_DEFAULT),Float64,Int64,Nothing,Int64},DiffEqBase.ContinuousCallback{Main.MLSAGA.SAGA.var"#4#5",typeof(SciMLBase.terminate!),typeof(SciMLBase.terminate!),typeof(DiffEqBase.INITIALIZE_DEFAULT),typeof(DiffEqBase.FINALIZE_DEFAULT),Float64,Int64,Nothing,Int64}},Tuple{}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{DiffEqBase.CallbackSet{Tuple{DiffEqBase.ContinuousCallback{Main.MLSAGA.SAGA.var"#6#7",typeof(SciMLBase.terminate!),typeof(SciMLBase.terminate!),typeof(DiffEqBase.INITIALIZE_DEFAULT),typeof(DiffEqBase.FINALIZE_DEFAULT),Float64,Int64,Nothing,Int64},DiffEqBase.ContinuousCallback{Main.MLSAGA.SAGA.var"#4#5",typeof(SciMLBase.terminate!),typeof(SciMLBase.terminate!),typeof(DiffEqBase.INITIALIZE_DEFAULT),typeof(DiffEqBase.FINALIZE_DEFAULT),Float64,Int64,Nothing,Int64}},Tuple{}}}}},SciMLBase.StandardODEProblem},OrdinaryDiffEq.Tsit5,OrdinaryDiffEq.InterpolationData{SciMLBase.ODEFunction{true,Main.MLSAGA.SAGA.var"#14#15"{Main.MLSAGA.SAGA.SAGAConst},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},SciMLBase.ODEFunction{true,Main.MLSAGA.SAGA.var"#14#15"{Main.MLSAGA.SAGA.SAGAConst},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),Nothing,DiffEqBase.CallbackSet{Tuple{DiffEqBase.ContinuousCallback{Main.MLSAGA.SAGA.var"#6#7",typeof(SciMLBase.terminate!),typeof(SciMLBase.terminate!),typeof(DiffEqBase.INITIALIZE_DEFAULT),typeof(DiffEqBase.FINALIZE_DEFAULT),Float64,Int64,Nothing,Int64},DiffEqBase.ContinuousCallback{Main.MLSAGA.SAGA.var"#4#5",typeof(SciMLBase.terminate!),typeof(SciMLBase.terminate!),typeof(DiffEqBase.INITIALIZE_DEFAULT),typeof(DiffEqBase.FINALIZE_DEFAULT),Float64,Int64,Nothing,Int64}},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,Base.Order.ForwardOrdering},DataStructures.BinaryHeap{Float64,Base.Order.ForwardOrdering},Nothing,Nothing,Int64,Tuple{},Tuple{},Tuple{}},Array{Float64,1},Float64,Nothing,OrdinaryDiffEq.DefaultInit}}: try/catch is not supported.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] instrument(::IRTools.Inner.IR) at C:\Users\bakerar\.julia\packages\Zygote\KpME9\src\compiler\reverse.jl:121