What does "Warning: `binary_minheap(xs::AbstractVector{T}) where T` is deprecated" mean?

My code now generates this warning. It still runs but I would like to understand why and if there is a way to make Julia happy and have the warning go away. I am using the latest Julia on Atom, on Windows 10.

Code is after the warning.

└ @ OrdinaryDiffEq C:\Users\Helga\.julia\packages\OrdinaryDiffEq\7mKtS\src\solve.jl:415
┌ Warning: `binary_minheap(xs::AbstractVector{T}) where T` is deprecated, use `BinaryMinHeap(xs)` instead.
│   caller = tstop_saveat_disc_handling at solve.jl:389 [inlined]
└ @ Core C:\Users\Helga\.julia\packages\OrdinaryDiffEq\7mKtS\src\solve.jl:389
┌ Warning: `binary_minheap(xs::AbstractVector{T}) where T` is deprecated, use `BinaryMinHeap(xs)` instead.│   caller = #__init#203(::Int64, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Nothing, ::Bool, ::Nothing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Float64, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Int64, ::Rational{Int64}, ::Int64, ::Rational{Int64}, ::Rational{Int64}, ::Bool, ::Int64, ::Nothing, ::Nothing, ::Int64, ::Float64, ::Float64, ::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, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(DiffEqBase.__init), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Tuple{Int64,Float64,Int64,Int64,Float64,Float64,Int64,Float64,Float64,Float64,Int64,Int64},FoodChain{getfield(Main, Symbol("##17#18")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Nothing,DiffEqBase.StandardODEProblem}, ::Rosenbrock23{0,true,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at solve.jl:407
└ @ OrdinaryDiffEq C:\Users\Helga\.julia\packages\OrdinaryDiffEq\7mKtS\src\solve.jl:407
┌ Warning: `binary_minheap(xs::AbstractVector{T}) where T` is deprecated, use `BinaryMinHeap(xs)` instead.│   caller = #__init#203(::Int64, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Nothing, ::Bool, ::Nothing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Float64, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Int64, ::Rational{Int64}, ::Int64, ::Rational{Int64}, ::Rational{Int64}, ::Bool, ::Int64, ::Nothing, ::Nothing, ::Int64, ::Float64, ::Float64, ::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, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(DiffEqBase.__init), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Tuple{Int64,Float64,Int64,Int64,Float64,Float64,Int64,Float64,Float64,Float64,Int64,Int64},FoodChain{getfield(Main, Symbol("##17#18")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Nothing,DiffEqBase.StandardODEProblem}, ::Rosenbrock23{0,true,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at solve.jl:415
└ @ OrdinaryDiffEq C:\Users\Helga\.julia\packages\OrdinaryDiffEq\7mKtS\src\solve.jl:415
using DifferentialEquations
f = @ode_def_bare FoodChain begin
dBB = r*(1- BB/K)*BB -xI*yIB*BI*((BB^h/(B0^h + BB^h))/eIB)
dBI = -xI*BI + xI*yIB*BI*(BB^h/(B0^h + BB^h))-xT *yTI*BT*((BI^h/(B0^h + BI^h))/eTI)
dBT = -xT*BT + xT*yTI*BT*(BI^h/(B0^h + BI^h))-q*BT*E
end K r yIB yTI eIB eTI B0 h xI xT q E
u0 = [500.0,200.0,100.0]
tspan = (0.0,1000.0)
p = (450, 1.1, 10, 10, 0.66, 0.85, 80, 1.2, 0.15, 0.06, 0, 0)
# K r yIB yTI eIB eTI B0 h xI xT q E
prob = ODEProblem(f,u0,tspan,p)
sol=solve(prob,Rosenbrock23())

using Plots

plot(sol, title = "Food Chain Pristine", xlabel = "Time" ,ylabel = "Density", lw=0.5)

The warning happens in OrdinaryDiffEq and is thus not a consequence of your user code. Either OrdinaryDiffEq needs an update, or you must run ] up to update your installed version of OrdinaryDiffEq

Edit: I created an issue in OrdinaryDiffEq to track progress. It is indeed OrdinaryDiffEq that requires an update.

1 Like

Thank you!

Hopefully this PR solves the problem
https://github.com/JuliaDiffEq/OrdinaryDiffEq.jl/pull/593

Edit: This PR has now been merged and the warning should go away if you temporarily check out master branch
] add OrdinaryDiffEq#master

1 Like

Yup this was fixed. DataStructures.jl updated and deprecated a feature we used, so we changed according to their deprecation and there should be a new version out which doesn’t throw the warning. Release should be fine now, so there shouldn’t be a need to ] add OrdinaryDiffEq#master

2 Likes

I ran ] add OrdinaryDiffEq#master yesterday - is this okay or could it cause problems down the road? I don’t understand what #master does.

] add OrdinaryDiffEq#master checks out the master branch of the repository. This branch will in general have slightly worse guarantees of working well together with other packages, so if you want to have a hassle-free environment, you can now ] add OrdinaryDiffEq to check out the latest tagged release (you might have to ] update first).

2 Likes

] add OrdinaryDiffEq#master will get you our current in-development code before it’s released. Of course, that should be done with caution, but if you want the bleeding edge it’s there.

I have tried ] update and ] add OrdinaryDiffEq and I am still getting this warning.

Have you restarted Julia? Otherwise, Maybe some package is holding you back. You could try to check out the master branch for a while to see if the problem goes away. What version of Ordinarydiffeq do you have,? Check. ] st

] st

[a134a8b2] BlackBoxOptim v0.4.0
[0c46a032] DifferentialEquations v5.2.1
[31c24e10] Distributions v0.16.4
[4138dd39] JLD v0.9.1
[b964fa9f] LaTeXStrings v1.0.3
[d3d80556] LineSearches v7.0.1
[f9640e96] MultiScaleArrays v1.2.0
[429524aa] Optim v0.16.0
[1dea7af3] OrdinaryDiffEq v4.13.0
[06bb1623] PenaltyFunctions v0.1.2
[91a5bcdd] Plots v0.19.3
[92933f4c] ProgressMeter v0.9.0
[731186ca] RecursiveArrayTools v0.17.2
[295af30f] Revise v0.7.15
[60ddc479] StatPlots v0.9.2
[8bb1440f] DelimitedFiles

You should use ]up. Those versions are old.

1 Like