Open korsbo opened 5 years ago
I should also say that I'm using the default algorithm (the Tsit5/Rosenbrock23 combo)
It took a few hours, but I just hit the error using a small example.
function dummy(du, u, p, t)
du[1] = - p[1]*u[1]
for i in 2:length(du)
du[i] = p[i] * u[i-1] - p[i] * u[i]
end
end
using DifferentialEquations
function solve_dummy()
u0 = fill(0., 10)
u0[1] = 1.
p = 10. .^ (6 * rand(11) .- 4)
prob = ODEProblem(dummy, u0, (0.,5000.), p)
sol = solve(prob; callback = TerminateSteadyState( 1e-8, 1e-6))
u0 = fill(0., 2)
u0[1] = 1.
p = 10. .^ (6 * rand(3) .- 4)
prob = ODEProblem(dummy, u0, (0.,sol.t[end]), p)
sol = solve(prob)
end
for i = 1:1e7
solve_dummy()
end
Something went wrong. Integrator stepped past tstops but the algorithm was dtchangeable. Please report this error.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] handle_tstop!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},Array{Float64,1},Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}}}},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1}}) at /home/Niklas/.julia/packages/OrdinaryDiffEq/NS3ps/src/integrators/integrator_utils.jl:448
[3] solve!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},Array{Float64,1},Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}}}},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1}}) at /home/Niklas/.julia/packages/OrdinaryDiffEq/NS3ps/src/solve.jl:344
[4] #__solve#202(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:default_set,),Tuple{Bool}}}, ::Function, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at /home/Niklas/.julia/packages/OrdinaryDiffEq/NS3ps/src/solve.jl:7
[5] #__solve at ./none:0 [inlined] (repeats 5 times)
[6] #__solve#2(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::Nothing) at /home/Niklas/.julia/packages/DifferentialEquations/DbyfR/src/default_solve.jl:15
[7] #__solve at ./none:0 [inlined]
[8] #__solve#1 at /home/Niklas/.julia/packages/DifferentialEquations/DbyfR/src/default_solve.jl:5 [inlined]
[9] __solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}) at /home/Niklas/.julia/packages/DifferentialEquations/DbyfR/src/default_solve.jl:2
[10] #solve#428(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}) at /home/Niklas/.julia/packages/DiffEqBase/mKOqQ/src/solve.jl:19
[11] solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}) at /home/Niklas/.julia/packages/DiffEqBase/mKOqQ/src/solve.jl:15
[12] solve_dummy() at ./In[27]:15
[13] top-level scope at ./In[28]:2
I found something that I can reproduce(!)
using DifferentialEquations
function dummy(du, u, p, t)
du[1] = - p[1]*u[1]
for i in 2:length(du)
du[i] = p[i] * u[i-1] - p[i] * u[i]
end
end
u0 = [1., 0]
p = [43.81703388892643, 46.52486955262283, 0.03767060848221134]
tstop = 4893.88614562193
prob = ODEProblem(dummy, u0, (0.,tstop), p)
sol = solve(prob)
┌ Warning: dt <= dtmin. Aborting. If you would like to force continuation with dt=dtmin, set force_dtmin=true
└ @ DiffEqBase /home/Niklas/.julia/packages/DiffEqBase/mKOqQ/src/integrator_interface.jl:122
Something went wrong. Integrator stepped past tstops but the algorithm was dtchangeable. Please report this error.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] handle_tstop!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},Array{Float64,1},Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}}}},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1}}) at /home/Niklas/.julia/packages/OrdinaryDiffEq/NS3ps/src/integrators/integrator_utils.jl:448
[3] solve!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},Array{Float64,1},Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}}}},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1}}) at /home/Niklas/.julia/packages/OrdinaryDiffEq/NS3ps/src/solve.jl:344
[4] #__solve#202(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:default_set,),Tuple{Bool}}}, ::Function, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at /home/Niklas/.julia/packages/OrdinaryDiffEq/NS3ps/src/solve.jl:7
[5] #__solve at ./none:0 [inlined] (repeats 5 times)
[6] #__solve#2(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::Nothing) at /home/Niklas/.julia/packages/DifferentialEquations/DbyfR/src/default_solve.jl:15
[7] #__solve at ./none:0 [inlined]
[8] #__solve#1 at /home/Niklas/.julia/packages/DifferentialEquations/DbyfR/src/default_solve.jl:5 [inlined]
[9] __solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}) at /home/Niklas/.julia/packages/DifferentialEquations/DbyfR/src/default_solve.jl:2
[10] #solve#428(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}) at /home/Niklas/.julia/packages/DiffEqBase/mKOqQ/src/solve.jl:19
[11] solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}) at /home/Niklas/.julia/packages/DiffEqBase/mKOqQ/src/solve.jl:15
[12] solve_dummy() at ./In[29]:21
[13] top-level scope at ./In[31]:2
Your example does not error on my computer (Julia 1.0.3 with up-to-date packages). Maybe there was a bug that's fixed already? Can you post the output of ] st
?
This example doesn't error for me either. The output of ] st
would be helpful. I believe this is something I already fixed awhile ago.
Hi, sorry for the slow reply (I locked myself out of my password manager when I lost my phone).
] st
Project LinearNodes v0.1.0
Status `../Project.toml`
[a134a8b2] BlackBoxOptim v0.4.0
[70588ee8] CSSUtil v0.1.0
[f89e0132] CostFunctions v0.1.0 #master (https://gitlab.com/slcu/teamHJ/niklas/CostFunctions.jl.git)
[c3c3384c] DiffEqParameters v0.1.0 #master (https://gitlab.com/slcu/teamHJ/niklas/DiffEqParameters.jl.git)
[0c46a032] DifferentialEquations v5.2.1
[5789e2e9] ↑ FileIO v1.0.1 ⇒ v1.0.4
[7073ff75] ↑ IJulia v1.12.0 ⇒ v1.15.2
[033835bb] JLD2 v0.1.2
[b964fa9f] LaTeXStrings v1.0.3
[23fbe1c1] ↑ Latexify v0.5.0 ⇒ v0.6.0
[442fdcdd] Measures v0.3.0
[3b7a836e] + PGFPlots v3.0.1
[91a5bcdd] Plots v0.19.3
[438e738f] ↑ PyCall v1.18.4 ⇒ v1.18.5
[d330b81b] PyPlot v2.6.3
[3cdcf5f2] RecipesBase v0.5.0
[189a3867] Reexport v0.2.0
[295af30f] ↑ Revise v0.7.11 ⇒ v0.7.15
[276daf66] ↑ SpecialFunctions v0.7.1 ⇒ v0.7.2
[10745b16] Statistics
Status `../Manifest.toml`
[621f4979] + AbstractFFTs v0.3.2
[7d9fca2a] ↑ Arpack v0.2.3 ⇒ v0.3.0
[13072b0f] + AxisAlgorithms v0.3.0
[39de3d68] + AxisArrays v0.3.0
[aae01518] ↑ BandedMatrices v0.6.0 ⇒ v0.8.1
[b99e7846] ↑ BinaryProvider v0.5.0 ⇒ v0.5.3
[aafaddc9] + CatIndices v0.2.0
[324d7699] + CategoricalArrays v0.5.2
[944b1d66] ↑ CodecZlib v0.5.0 ⇒ v0.5.1
[a2cac450] + ColorBrewer v0.4.0
[c3611d14] + ColorVectorSpace v0.6.2
[5ae59095] ↑ Colors v0.9.4 ⇒ v0.9.5
[34da2185] ↑ Compat v1.2.0 ⇒ v1.4.0
[ed09eef8] + ComputationalResources v0.3.0
[8f4d0f93] ↑ Conda v1.0.2 ⇒ v1.1.1
[150eb455] + CoordinateTransformations v0.5.0
[dc8bdbbb] + CustomUnitRanges v0.2.0
[a93c6f00] + DataFrames v0.16.0
[9a8bc11e] + DataStreams v0.4.1
[01453d9d] ↑ DiffEqDiffTools v0.6.0 ⇒ v0.7.1
[6e83dbb3] + Discretizers v3.0.1
[b4f34e82] ↑ Distances v0.7.3 ⇒ v0.7.4
[d4d017d3] ↑ ExponentialUtilities v1.1.0 ⇒ v1.3.0
[4f61f5a4] + FFTViews v0.2.0
[7a1cc6ca] + FFTW v0.2.4
[1a297f60] ↑ FillArrays v0.2.1 ⇒ v0.4.0
[f6369f11] ↑ ForwardDiff v0.9.0 ⇒ v0.10.1
[de31a74c] ↑ FunctionalCollections v0.4.0 ⇒ v0.5.0
[28b8d3ca] ↑ GR v0.34.1 ⇒ v0.36.0
[01680d73] ↑ GenericSVD v0.2.0 ⇒ v0.2.1
[a2bd30eb] + Graphics v0.4.0
[bbac6d45] + IdentityRanges v0.2.0
[2803e5a7] + ImageAxes v0.5.0
[a09fc81d] + ImageCore v0.7.3
[51556ac3] + ImageDistances v0.1.1
[6a3955dd] + ImageFiltering v0.5.2
[6218d12a] + ImageMagick v0.7.1
[bc367c6b] + ImageMetadata v0.5.2
[787d08f9] + ImageMorphology v0.1.1
[4e3cecfd] + ImageShow v0.1.2
[02fcd773] + ImageTransformations v0.7.0
[916415d5] + Images v0.17.0
[9b13fd28] + IndirectArrays v0.5.0
[a98d9a8b] + Interpolations v0.11.1
[8197267c] + IntervalSets v0.3.1
[c8e1da08] + IterTools v1.1.1
[682c06a0] ↑ JSON v0.19.0 ⇒ v0.20.0
[5078a376] ↑ LazyArrays v0.2.1 ⇒ v0.5.1
[d3d80556] ↑ LineSearches v7.0.0 ⇒ v7.0.1
[dbb5928d] + MappedArrays v0.2.1
[739be429] ↑ MbedTLS v0.6.3 ⇒ v0.6.6
[e89f7d12] ↑ Media v0.4.1 ⇒ v0.5.0
[d41bc354] ↑ NLSolversBase v7.1.0 ⇒ v7.1.2
[2774e3e8] ↑ NLsolve v2.1.0 ⇒ v3.0.1
[510215fc] ↑ Observables v0.2.2 ⇒ v0.2.3
[6fe1bfb0] + OffsetArrays v0.9.1
[90014a1f] ↑ PDMats v0.9.5 ⇒ v0.9.6
[5432bcbf] + PaddedViews v0.4.2
[d96e819e] ↑ Parameters v0.10.1 ⇒ v0.10.3
[995b91a9] ↑ PlotUtils v0.5.4 ⇒ v0.5.5
[92933f4c] + ProgressMeter v0.9.0
[1fd47b50] ↑ QuadGK v2.0.2 ⇒ v2.0.3
[e6cf234a] ↑ RandomNumbers v1.0.2 ⇒ v1.0.3
[b3c3ace0] + RangeArrays v0.3.1
[c84ed2f1] + Ratios v0.3.0
[f2b01f46] ↑ Roots v0.7.3 ⇒ v0.7.4
[6038ab10] + Rotations v0.9.1
[b9d75638] + SIUnits v0.1.0
[b85f4697] ↑ SoftGlobalScope v1.0.7 ⇒ v1.0.8
[2913bbd2] ↑ StatsBase v0.25.0 ⇒ v0.27.0
[123dc426] ↑ SymEngine v0.4.3 ⇒ v0.5.0
[3783bdb8] ↑ TableTraits v0.3.1 ⇒ v0.4.1
[bd369af6] + Tables v0.1.12
[9b435220] + TexExtensions v0.1.0
[37f6aa50] + TikzPictures v3.0.3
[06e1c1a7] + TiledIteration v0.2.3
[ea10d353] + WeakRefStrings v0.5.3
[0f1e0344] ↑ WebIO v0.4.0 ⇒ v0.7.0
[cc8bc4a8] ↑ Widgets v0.4.2 ⇒ v0.4.4
[efce3f68] + WoodburyMatrices v0.4.1
[9fa8497b] + Future
versioninfo(verbose=true)
Julia Version 0.7.0
Commit a4cb80f3ed (2018-08-08 06:46 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
Ubuntu 16.04.5 LTS
uname: Linux 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64
CPU: Intel(R) Core(TM) i7-7800X CPU @ 3.50GHz:
speed user nice sys idle irq
#1-12 1599 MHz 206185083 s 1765965 s 51699681 s 4549803560 s 0 s
Memory: 31.11959457397461 GB (8698.4765625 MB free)
Uptime: 4.045098e6 sec
Load Avg: 0.58544921875 1.17236328125 1.17724609375
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
Environment:
XDG_SESSION_PATH = /org/freedesktop/DisplayManager/Session2
DEFAULTS_PATH = /usr/share/gconf/i3.default.path
PATH = /home/Niklas/programs/anaconda3/bin:/home/Niklas/programs/anaconda3/bin:/nfs/bin:/home/Niklas/master/scripts:/home/Niklas/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/home/Niklas/projects/images/scripts:/home/Niklas/programs/clang/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04/bin:/home/Niklas/.local/bin
XDG_SEAT_PATH = /org/freedesktop/DisplayManager/Seat0
TERM = xterm-256color
HOME = /home/Niklas
PYTHONPATH = :/home/Niklas/home3/lib/python
LD_LIBRARY_PATH = /home/Niklas/local/lib:/home/Niklas/.local/lib::/home/Niklas/programs/timagetk/timagetk/build-scons/lib
MANDATORY_PATH = /usr/share/gconf/i3.mandatory.path
GKS_FONTPATH = /home/Niklas/.julia/packages/GR/wFd9A/src/../deps/gr
GKS_FILEPATH = /tmp/juliaglF5S8.svg
I see, you still use Julia 0.7. Recent versions of OrdinaryDiffEq
(and DifferentialEquations
) require Julia 1.0, and hence you're stuck with an old version of DifferentialEquations
(you still use version 5.2.1 whereas the most recent version is 5.3.1, see https://github.com/JuliaDiffEq/DifferentialEquations.jl/releases). Can you switch to Julia 1.0 and see whether this resolves your issue?
same problem on an up-to-date Julia 1.0.3:
ERROR: Something went wrong. Integrator stepped past tstops but the algorithm was dtchangeable. Please report this error.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] handle_tstop!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},Array{Float64,1},Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}}}},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64}) at /home/Niklas/.julia/packages/OrdinaryDiffEq/7mKtS/src/integrators/integrator_utils.jl:467
[3] solve!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},Array{Float64,1},Float64,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}}}},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},Array{Float64,1}},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Array{Float64,1}},LinSolveFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64}) at /home/Niklas/.julia/packages/OrdinaryDiffEq/7mKtS/src/solve.jl:347
[4] #__solve#202(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:default_set,),Tuple{Bool}}}, ::Function, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at /home/Niklas/.julia/packages/OrdinaryDiffEq/7mKtS/src/solve.jl:7
[5] #__solve at ./none:0 [inlined] (repeats 5 times)
[6] #__solve#2(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::Nothing) at /home/Niklas/.julia/packages/DifferentialEquations/88DSk/src/default_solve.jl:15
[7] #__solve at ./none:0 [inlined]
[8] #__solve#1 at /home/Niklas/.julia/packages/DifferentialEquations/88DSk/src/default_solve.jl:5 [inlined]
[9] __solve at /home/Niklas/.julia/packages/DifferentialEquations/88DSk/src/default_solve.jl:2 [inlined]
[10] #solve#442 at /home/Niklas/.julia/packages/DiffEqBase/8usQ9/src/solve.jl:41 [inlined]
[11] solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(dummy),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}) at /home/Niklas/.julia/packages/DiffEqBase/8usQ9/src/solve.jl:27
[12] top-level scope at none:0
Julia Version 1.0.3
Commit 099e826241 (2018-12-18 01:34 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
Ubuntu 16.04.5 LTS
uname: Linux 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64
CPU: Intel(R) Core(TM) i7-7800X CPU @ 3.50GHz:
speed user nice sys idle irq
#1-12 1555 MHz 206655121 s 1766423 s 51810705 s 4554833613 s 0 s
Memory: 31.11959457397461 GB (7306.609375 MB free)
Uptime: 4.049835e6 sec
Load Avg: 0.986328125 1.94287109375 1.76953125
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
Environment:
XDG_SEAT_PATH = /org/freedesktop/DisplayManager/Seat0
MANDATORY_PATH = /usr/share/gconf/i3.mandatory.path
DEFAULTS_PATH = /usr/share/gconf/i3.default.path
TERM = xterm-256color
PATH = /home/Niklas/programs/anaconda3/bin:/nfs/bin:/home/Niklas/master/scripts:/home/Niklas/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/home/Niklas/projects/images/scripts:/home/Niklas/programs/clang/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04/bin:/home/Niklas/.local/bin
HOME = /home/Niklas
XDG_SESSION_PATH = /org/freedesktop/DisplayManager/Session2
PYTHONPATH = :/home/Niklas/home3/lib/python
LD_LIBRARY_PATH = /home/Niklas/local/lib:/home/Niklas/.local/lib::/home/Niklas/programs/timagetk/timagetk/build-scons/lib
Status `~/.julia/environments/v1.0/Project.toml`
[6e4b80f9] BenchmarkTools v0.4.1
[a134a8b2] BlackBoxOptim v0.4.0
[70588ee8] CSSUtil v0.1.0
[5d742f6a] CSVFiles v0.11.0
[0c46a032] DifferentialEquations v5.3.1
[5789e2e9] FileIO v1.0.4
[7073ff75] IJulia v1.15.2
[916415d5] Images v0.17.0
[c601a237] Interact v0.9.0
[033835bb] JLD2 v0.1.2
[b964fa9f] LaTeXStrings v1.0.3
[23fbe1c1] Latexify v0.6.0
[3b7a836e] PGFPlots v3.0.1
[91a5bcdd] Plots v0.22.3
[295af30f] Revise v1.0.2
[276daf66] SpecialFunctions v0.7.2
[10745b16] Statistics
] st --manifest
Status `~/.julia/environments/v1.0/Manifest.toml`
[621f4979] AbstractFFTs v0.3.2
[22286c92] AccurateArithmetic v0.3.0
[7d9fca2a] Arpack v0.3.0
[bf4720bc] AssetRegistry v0.1.0
[13072b0f] AxisAlgorithms v0.3.0
[39de3d68] AxisArrays v0.3.0
[aae01518] BandedMatrices v0.8.1
[6e4b80f9] BenchmarkTools v0.4.1
[9e28174c] BinDeps v0.8.10
[b99e7846] BinaryProvider v0.5.3
[a134a8b2] BlackBoxOptim v0.4.0
[764a87c0] BoundaryValueDiffEq v2.2.1
[a9c8d775] CPUTime v0.1.0
[70588ee8] CSSUtil v0.1.0
[5d742f6a] CSVFiles v0.11.0
[49dc2e85] Calculus v0.4.1
[aafaddc9] CatIndices v0.2.0
[324d7699] CategoricalArrays v0.5.2
[8bab3169] ChunkedArrays v0.1.1
[944b1d66] CodecZlib v0.5.1
[a2cac450] ColorBrewer v0.4.0
[3da002f7] ColorTypes v0.7.5
[c3611d14] ColorVectorSpace v0.6.2
[5ae59095] Colors v0.9.5
[bbf7d656] CommonSubexpressions v0.2.0
[34da2185] Compat v1.4.0
[ed09eef8] ComputationalResources v0.3.0
[8f4d0f93] Conda v1.1.1
[d38c429a] Contour v0.5.1
[150eb455] CoordinateTransformations v0.5.0
[dc8bdbbb] CustomUnitRanges v0.2.0
[a93c6f00] DataFrames v0.16.0
[9a8bc11e] DataStreams v0.4.1
[864edb3b] DataStructures v0.14.0
[e7dc6d0d] DataValues v0.4.5
[bcd4f6db] DelayDiffEq v4.7.0
[c5cfe0b6] DiffBase v0.3.2
[2b5f629d] DiffEqBase v4.31.2
[eb300fae] DiffEqBiological v3.4.1
[459566f4] DiffEqCallbacks v2.4.0
[f3b72e0c] DiffEqDevTools v2.6.1
[01453d9d] DiffEqDiffTools v0.7.1
[5a0ffddc] DiffEqFinancial v2.1.0
[c894b116] DiffEqJump v5.6.0
[78ddff82] DiffEqMonteCarlo v0.14.0
[77a26b50] DiffEqNoiseProcess v2.3.2
[9fdde737] DiffEqOperators v3.4.0
[34035eb4] DiffEqPDEBase v0.4.0
[1130ab10] DiffEqParamEstim v1.5.1
[055956cb] DiffEqPhysics v3.1.0
[41bf760c] DiffEqSensitivity v2.4.0
[ef61062a] DiffEqUncertainty v1.1.0
[163ba53b] DiffResults v0.0.3
[b552c78f] DiffRules v0.0.7
[0c46a032] DifferentialEquations v5.3.1
[c619ae07] DimensionalPlotRecipes v0.2.0
[6e83dbb3] Discretizers v3.0.1
[b4f34e82] Distances v0.7.4
[31c24e10] Distributions v0.16.4
[497a8b3b] DoubleFloats v0.4.3
[da5c29d0] EllipsisNotation v0.3.0
[d4d017d3] ExponentialUtilities v1.3.0
[4f61f5a4] FFTViews v0.2.0
[7a1cc6ca] FFTW v0.2.4
[5789e2e9] FileIO v1.0.4
[1a297f60] FillArrays v0.4.0
[53c48c17] FixedPointNumbers v0.5.3
[f6369f11] ForwardDiff v0.10.1
[069b7b12] FunctionWrappers v1.0.0
[de31a74c] FunctionalCollections v0.5.0
[28b8d3ca] GR v0.36.0
[01680d73] GenericSVD v0.2.1
[a2bd30eb] Graphics v0.4.0
[cd3eb016] HTTP v0.7.1
[7073ff75] IJulia v1.15.2
[bbac6d45] IdentityRanges v0.2.0
[2803e5a7] ImageAxes v0.5.0
[a09fc81d] ImageCore v0.7.3
[51556ac3] ImageDistances v0.1.1
[6a3955dd] ImageFiltering v0.5.2
[6218d12a] ImageMagick v0.7.1
[bc367c6b] ImageMetadata v0.5.2
[787d08f9] ImageMorphology v0.1.1
[4e3cecfd] ImageShow v0.1.2
[02fcd773] ImageTransformations v0.7.1
[916415d5] Images v0.17.0
[9b13fd28] IndirectArrays v0.5.0
[83e8ac13] IniFile v0.5.0
[c601a237] Interact v0.9.0
[d3863d7c] InteractBase v0.8.2
[7981ab7d] InteractBulma v0.4.2
[a98d9a8b] Interpolations v0.11.1
[8197267c] IntervalSets v0.3.1
[c8e1da08] IterTools v1.1.1
[1c8ee90f] IterableTables v0.10.0
[82899510] IteratorInterfaceExtensions v0.1.1
[033835bb] JLD2 v0.1.2
[97c1335a] JSExpr v0.5.0
[682c06a0] JSON v0.20.0
[bcebb21b] Knockout v0.2.0
[b964fa9f] LaTeXStrings v1.0.3
[23fbe1c1] Latexify v0.6.0
[5078a376] LazyArrays v0.5.1
[7f8f8fb0] LearnBase v0.2.2
[d3d80556] LineSearches v7.0.1
[2fda8390] LsqFit v0.6.0
[1914dd2f] MacroTools v0.4.4
[dbb5928d] MappedArrays v0.2.1
[739be429] MbedTLS v0.6.6
[442fdcdd] Measures v0.3.0
[e1d29d7a] Missings v0.3.1
[46d2c3a1] MuladdMacro v0.2.1
[f9640e96] MultiScaleArrays v1.3.1
[d41bc354] NLSolversBase v7.1.2
[2774e3e8] NLsolve v3.0.1
[77ba4419] NaNMath v0.3.2
[4d1e1d77] Nullables v0.0.8
[510215fc] Observables v0.2.3
[6fe1bfb0] OffsetArrays v0.9.1
[429524aa] Optim v0.17.2
[87e2bd06] OptimBase v2.0.0
[bac558e1] OrderedCollections v1.0.2
[1dea7af3] OrdinaryDiffEq v4.18.3
[90014a1f] PDMats v0.9.6
[3b7a836e] PGFPlots v3.0.1
[5432bcbf] PaddedViews v0.4.2
[65888b18] ParameterizedFunctions v4.0.0
[d96e819e] Parameters v0.10.3
[06bb1623] PenaltyFunctions v0.1.2
[fa939f87] Pidfile v1.1.0
[ccf2f8ad] PlotThemes v0.3.0
[995b91a9] PlotUtils v0.5.5
[91a5bcdd] Plots v0.22.3
[e409e4f3] PoissonRandom v0.3.0
[f27b6e38] Polynomials v0.5.1
[2dfb63ee] PooledArrays v0.4.1
[85a6dd25] PositiveFactorizations v0.2.1
[92933f4c] ProgressMeter v0.9.0
[1fd47b50] QuadGK v2.0.3
[e6cf234a] RandomNumbers v1.0.3
[b3c3ace0] RangeArrays v0.3.1
[c84ed2f1] Ratios v0.3.0
[3cdcf5f2] RecipesBase v0.6.0
[731186ca] RecursiveArrayTools v0.18.5
[189a3867] Reexport v0.2.0
[ae029012] Requires v0.5.2
[ae5879a3] ResettableStacks v0.5.0
[37e2e3b7] ReverseDiff v0.3.1
[295af30f] Revise v1.0.2
[79098fc4] Rmath v0.5.0
[f2b01f46] Roots v0.7.4
[6038ab10] Rotations v0.9.2
[b9d75638] SIUnits v0.1.0
[992d4aef] Showoff v0.2.1
[699a6c99] SimpleTraits v0.8.0
[b85f4697] SoftGlobalScope v1.0.8
[a2af1166] SortingAlgorithms v0.3.1
[276daf66] SpecialFunctions v0.7.2
[90137ffa] StaticArrays v0.10.2
[2913bbd2] StatsBase v0.27.0
[4c63d2b9] StatsFuns v0.7.0
[9672c7b4] SteadyStateDiffEq v1.4.0
[789caeaf] StochasticDiffEq v5.10.4
[c3572dad] Sundials v2.6.0
[123dc426] SymEngine v0.5.0
[5e66a065] TableShowUtils v0.2.1
[3783bdb8] TableTraits v0.4.1
[382cd787] TableTraitsUtils v0.3.1
[bd369af6] Tables v0.1.12
[9b435220] TexExtensions v0.1.0
[e0df1984] TextParse v0.6.2
[37f6aa50] TikzPictures v3.0.3
[06e1c1a7] TiledIteration v0.2.3
[3bb67fe8] TranscodingStreams v0.8.1
[a2a6695c] TreeViews v0.3.0
[30578b45] URIParser v0.4.0
[0e69188a] VectorizedRoutines v0.0.2
[81def892] VersionParsing v1.1.3
[ea10d353] WeakRefStrings v0.5.3
[0f1e0344] WebIO v0.7.0
[cc8bc4a8] Widgets v0.4.4
[efce3f68] WoodburyMatrices v0.4.1
[c2297ded] ZMQ v1.0.0
[2a0f44e3] Base64
[ade2ca70] Dates
[8bb1440f] DelimitedFiles
[8ba89e20] Distributed
[7b1f6079] FileWatching
[9fa8497b] Future
[b77e0a4c] InteractiveUtils
[76f85450] LibGit2
[8f399da3] Libdl
[37e2e46d] LinearAlgebra
[56ddb016] Logging
[d6f4376e] Markdown
[a63ad114] Mmap
[44cfe95a] Pkg
[de0858da] Printf
[3fa0cd96] REPL
[9a3f8284] Random
[ea8e919c] SHA
[9e88b42a] Serialization
[1a1011a3] SharedArrays
[6462fe0b] Sockets
[2f01184e] SparseArrays
[10745b16] Statistics
[4607b0f0] SuiteSparse
[8dfed614] Test
[cf7118a7] UUIDs
[4ec0a83e] Unicode
In the code right before the error, can you @show integrator.t
?
This could be a deep low probability floating point issue. What happens if you change the 10 here to a 100? https://github.com/JuliaDiffEq/OrdinaryDiffEq.jl/blob/master/src/integrators/integrator_utils.jl#L320-L321
In the code right before the error, can you
@show integrator.t
?
function cond(u, t, i)
@show(i.t)
false
end
cb = DiscreteCallback(cond, nothing)
sol = solve(prob, callback=cb)
The last printout is
i.t = 4893.886145621931
Yeah, it's a floating point issue. Can you see if changing that 10 to a 100 fixes it for you?
oh, can you print out the tstops?
Do you mean the full list of places that the integrator stopped at?
2.147239887921319e-5
0.00023619638767134507
0.0014350845212315693
0.0039725238781144305
0.007593141940596021
0.012208605613401431
0.018012228563551044
0.024959972017826702
0.03311410374941467
0.04253805294636018
0.05321538162864828
0.06514045585607978
0.07826282843834248
0.09250642239383122
0.10775011192921594
0.12386186257646414
0.14073562328619968
0.15833698609417288
0.17672880737376054
0.1960528514587469
0.21642654775640352
0.2379531633423685
0.2609829129772989
0.28613404148944555
0.31422962135314303
0.3463583991919664
0.38403726942614647
0.42952673964248445
0.4863904288853889
0.560311576170682
0.6578231854345444
0.7815535666739514
0.8654385335345511
0.9345685568055051
1.000519751785193
1.0686546208012313
1.1405633121341434
1.2158201388070722
1.292887847114765
1.4474398101069887
1.6101156541913522
1.8181045063505168
2.1029432907449883
2.5264420800133847
3.219062222361395
4.494277724432434
7.333585386865053
16.399067283760107
62.539124607945425
502.07073232319044
4893.886145621931
Yeah, it's a floating point issue. Can you see if changing that 10 to a 100 fixes it for you?
It did not seem to make a difference. I placed a printout (or rather a display
) just before that line too. It was not triggered.
I placed a printout (or rather a display) just before that line too. It was not triggered.
Oh, that's not the spot that was triggered? Then we need to find where it is an add floating point handling.
Here's the issue. Every compiler setup / computer can be slightly different with the minute details of how it handles floating point. It's usually not an issue, but with tstops trying to be exact it is. The issue that comes up here is simply that if you are at t
and want to stop at tstop
, then dt = tstop - t
. That sounds sensical, but when defining dt
like that on a computer, you have cases where dt + t != tstop
. In your case, it's dt = tstop - t
and dt + t > tstop
, so it steps past the tstop. That spot in the code is where I have a nudge factor, where if you're within 10eps(t)
it realizes it should've been at the tstop and catches it. But it sounds like the update is applied somewhere else, maybe in the callback code. Since this can be different depending on the computer/OS, it's a rough issue to handle. Maybe this is just something showing up on Ubuntu?
Sorry, my mistake. I was changing line 330, not 320.
Your change did indeed allow me to solve my example.
Okay cool, I'll adjust the nudge to be 100eps when stepping over. There shouldn't be any case where (tstop - t) + t > 100eps
I think? You found a case where (tstop - t) + t > 10eps
which surprises me but I guess that's floating point for you 👍 . Out of curiosity, can you print out tstop
, t
, and dt
there so that this example can be stored? It's a fun one :).
Sure, just waiting for the recompile. Revise has for some reason decided to only work a few times before I need to restart the session.
From just before the error:
tstop = 4893.88614562193
integrator.t = 502.07073232319044
integrator.dt = 4391.81541329874
My specified tstop:
tstop = 4893.88614562193
It's now late here and I need food. I'll leave the fix to you. Cheers!
Example with annotations.
tstop = 4893.88614562193
t = 502.07073232319044
dt = 4391.81541329874
tstop - t == dt # true
t + dt == tstop # false
(tstop - t) + t - tstop # 9.094947017729282e-13
The joys of floating point. Share it with your friends.
It should be fixed now. Using eps(tstop)
instead of eps(t)
makes it better contained.
I believe I'm running into similar floating point issues now, with OrdinaryDiffEq v5.1.4. I'm using a PeriodicCallback
, and I'm checking explicitly that I'm exactly hitting the scheduled stop time in RigidBodySim:
I found a case where the t
at which the controller is called is a tiny bit larger than the tstop
that the PeriodicCallback
had scheduled. The example at https://docs.juliadiffeq.org/stable/features/diffeq_arrays.html#Example:-A-Control-Problem-1 made me think that exact floating point comparisons were OK (i.e., the integrator is guaranteed to stop exactly at any tstop
that you pass in). But that doesn't seem to be the case.
I really think that
followed by
is always going to result in numerical issues. We can reduce the probability of bad behavior using
and keep tuning the tolerance, but why not solve this issue once and for all? I think that requires having the integrator first propose a dt
and then stopping at exactly min(integrator.t + dt, top(integrator.opts.tstops))
(if tdir > 0
). Do you see any issues with this approach?
I think that requires having the integrator first propose a
dt
and then stopping at exactlymin(integrator.t + dt, top(integrator.opts.tstops))
(iftdir > 0
). Do you see any issues with this approach?
I guess that should be fine. The only issue really is that we should check integrator.t + dt
is sufficiently close to top(integrator.opts.tstops)
since otherwise we might be silently off? But maybe that's just being too careful.
I don't quite understand what you mean. min(integrator.t + dt, top(integrator.opts.tstops))
will either exactly equal integrator.t + dt
or it will exactly equal top(integrator.opts.tstops))
. What would be silently off when integrator.t + dt
is close to top(integrator.opts.tstops)
?
If dt
was much much larger than it should be, we don't want to truncate the step down to the tstop, we want to throw an error because we somehow missed that a tstop was supposed to be in there. That might be too defensive though.
In my opinion, any dt
checks should be done on the dt
proposed by the integrator, not on the one adjusted for tstops
. This would also fix https://github.com/JuliaDiffEq/OrdinaryDiffEq.jl/issues/273.
I think we may still be misunderstanding each other, so maybe it helps if I explain one way to implement what I'm proposing:
tnext
field to ODEIntegrator
modify_dt_for_tstops!(integrator)
to update_tnext!(integrator)
, which implements the min(integrator.t + dt, top(integrator.opts.tstops))
idea and leaves integrator.dt
untouched (effectively changing the meaning of integrator.dt
to 'the time step proposed by the integrator').loopfooter!
, get rid of ttmp
and just use integrator.t = integrator.tnext
I'm sure there are issues with changing the meaning of integrator.dt
like this, but this is the flavor of the change I'm proposing.
Yes, that's generally a good idea. The issue is that in order to get the correct value for the step, dt
needs to be close to integrator.t - top(integrator.opts.tstops)
, so I'm just saying that we should still check that's true.
Note that I am not rejecting this change, and I think it should be done. But I do note that it needs to be careful about error due to the true time being different from the t+dt
time. If we do this change, since it's now just numerical error, we can likely be a lot less strict about it.
Hello,
I sometimes encounter the following error:
This occurs very rarely. Here, I'm optimising parameters and I think that the ODE is solved on average 10 million (or maybe more) times before I encounter an error. It is thus hard to provide an MWE (I tried, but it ran for over an hour without hitting the error).
The things that I'm doing are essentially rather simple. I'm basically solving
lots of times.
The only non-standard thing I'm doing with the solver is to occasionally use
callback = TerminateSteadyState( 1e-8, 1e-6)
. Sometimes, the parameters make the problem somewhat stiff and other times I expect that the Tsit5 algorithm is used all the way through.I'm not desperate for a fix, I just wanted to report the issue. Also, I realise that since I can produce the error, I'm in a fairly good position to help fix it but I'm afraid that I will not have much time to dig into this.