BinaryHeap Error in DifferentialEquations

Hello,

I am having a lot of problems trying to resolve an issue with DifferentialEquations.jl in a package I am developing. For the example code from the docs

using DifferentialEquations, Plots


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)
sol = solve(prob)

I get the following error:

MethodError: no method matching iterate(::DataStructures.BinaryHeap{Float64,DataStructures.LessThan})
Closest candidates are:
  iterate(!Matched::Core.SimpleVector) at essentials.jl:603
  iterate(!Matched::Core.SimpleVector, !Matched::Any) at essentials.jl:603
  iterate(!Matched::ExponentialBackOff) at error.jl:253
  ...
first(::DataStructures.BinaryHeap{Float64,DataStructures.LessThan}) at abstractarray.jl:341
solve!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},OrdinaryDiffEq.AutoSwitchCache{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},true,Array{Float64,1},Nothing,Float64,DiffEqBase.NullParameters,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,DiffEqBase.NullParameters,ODEFunction{true,typeof(lorenz!),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},OrdinaryDiffEq.AutoSwitchCache{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(lorenz!),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,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,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(lorenz!),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(lorenz!),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward}(),Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Float64,Val{:forward}(),Float64,Val{true}()}}},OrdinaryDiffEq.AutoSwitchCache{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}}},DiffEqBase.DEStats},ODEFunction{true,typeof(lorenz!),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,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,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(lorenz!),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(lorenz!),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward}(),Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Float64,Val{:forward}(),Float64,Val{true}()}}},OrdinaryDiffEq.AutoSwitchCache{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(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,Tuple{},Tuple{},Tuple{}},Array{Float64,1},Float64,Nothing,OrdinaryDiffEq.DefaultInit}) at solve.jl:445
__solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(lorenz!),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}, ::CompositeAlgorithm{...

Here is the package environment:

Project HCRSimJul v0.1.0
Status ~/work/Arcascope/HCRSimJul/Project.toml
[5d742f6a] CSVFiles v1.0.0
[a93c6f00] DataFrames v0.21.7
[1313f7d8] DataFramesMeta v0.5.1
[864edb3b] DataStructures v0.18.7
[aae7a2af] DiffEqFlux v1.23.0
[41bf760c] DiffEqSensitivity v6.33.0
[0c46a032] DifferentialEquations v6.15.0
[31c24e10] Distributions v0.23.12
[587475ba] Flux v0.11.1
[f0e99cf1] MLBase v0.8.0
[e1d29d7a] Missings v0.4.4
[09606e27] ODEInterfaceDiffEq v3.8.0
[1dea7af3] OrdinaryDiffEq v5.43.0
[91a5bcdd] Plots v1.6.10
[d330b81b] PyPlot v2.9.0
[b0e4dd01] RollingFunctions v0.6.2
[2913bbd2] StatsBase v0.33.2
[f3b207a7] StatsPlots v0.14.13
[ade2ca70] Dates
[37e2e46d] LinearAlgebra
[9a3f8284] Random
[10745b16] Statistics

For some reason this enviroment works on my Mac, but not on Linux. Not sure if that is at all relevant.

Thanks is advance for any help I can get in resolving this.

Do ]add DataStructures@0.18 and see what happens.

Hi, I just tried this. Still get the same error

Did the resolver spit out a bunch of information of packages changing? Could you share that?

Here are the commands I put in. It didn’t change the actual package

(HCRSimJul) pkg> add DataStructures@0.18
  Resolving package versions...
   Updating `~/Project.toml`
 [no changes]
   Updating `~/Manifest.toml`
 [no changes]

(HCRSimJul) pkg> status
Project HCRSimJul v0.1.0
Status `~/Project.toml`
  [5d742f6a] CSVFiles v1.0.0
  [a93c6f00] DataFrames v0.21.7
  [1313f7d8] DataFramesMeta v0.5.1
  [864edb3b] DataStructures v0.18.7
  [aae7a2af] DiffEqFlux v1.23.0
  [41bf760c] DiffEqSensitivity v6.33.0
  [0c46a032] DifferentialEquations v6.15.0
  [31c24e10] Distributions v0.23.12
  [6a86dc24] FiniteDiff v2.7.0
  [587475ba] Flux v0.11.1
  [f0e99cf1] MLBase v0.8.0
  [e1d29d7a] Missings v0.4.4
  [09606e27] ODEInterfaceDiffEq v3.8.0
  [1dea7af3] OrdinaryDiffEq v5.43.0
  [91a5bcdd] Plots v1.6.10
  [d330b81b] PyPlot v2.9.0
  [b0e4dd01] RollingFunctions v0.6.2
  [2913bbd2] StatsBase v0.33.2
  [f3b207a7] StatsPlots v0.14.13
  [ade2ca70] Dates 
  [37e2e46d] LinearAlgebra 
  [9a3f8284] Random 
  [10745b16] Statistics 

So I removed the DataStructure package and then added the 0.18.0 version.

HCRSimJul) pkg> add DataStructures@0.18.0
  Resolving package versions...
  Installed FillArrays ───── v0.9.7
  Installed DataStructures ─ v0.18.0
  Installed BandedMatrices ─ v0.15.22
   Updating `~/Project.toml`
  [864edb3b] ↑ DataStructures v0.17.20 ⇒ v0.18.0
  [31c24e10] ↑ Distributions v0.23.8 ⇒ v0.23.12
  [09606e27] ↑ ODEInterfaceDiffEq v3.7.0 ⇒ v3.8.0
  [1dea7af3] ↑ OrdinaryDiffEq v5.42.3 ⇒ v5.43.0
   Updating `~/Manifest.toml`
  [4c555306] ↑ ArrayLayouts v0.3.8 ⇒ v0.4.8
  [aae01518] ↑ BandedMatrices v0.15.15 ⇒ v0.15.22
  [864edb3b] ↑ DataStructures v0.17.20 ⇒ v0.18.0
  [bcd4f6db] ↑ DelayDiffEq v5.24.1 ⇒ v5.24.2
  [2b5f629d] ↑ DiffEqBase v6.44.3 ⇒ v6.48.0
  [459566f4] ↑ DiffEqCallbacks v2.13.5 ⇒ v2.14.1
  [c894b116] ↑ DiffEqJump v6.10.0 ⇒ v6.10.1
  [31c24e10] ↑ Distributions v0.23.8 ⇒ v0.23.12
  [1a297f60] ↑ FillArrays v0.8.14 ⇒ v0.9.7
  [093fc24a] ↓ LightGraphs v1.3.3 ⇒ v1.3.0
  [961ee093] ↑ ModelingToolkit v3.20.1 ⇒ v3.21.0
  [09606e27] ↑ ODEInterfaceDiffEq v3.7.0 ⇒ v3.8.0
  [1dea7af3] ↑ OrdinaryDiffEq v5.42.3 ⇒ v5.43.0
  [789caeaf] ↑ StochasticDiffEq v6.25.0 ⇒ v6.26.0
  [c3572dad] ↑ Sundials v4.2.6 ⇒ v4.3.0

I should say I still get the same error.

Did you restart Julia?

I didn’t at first, but I just did and the error persisted.

]free DataStructures restart and try?

Julia v1.5?

Did you PackageCompiler on an old version?

Just switched to Julia 1.5.2 and did a quick test. Gave the same error, I was org on 1.5.2 when I first encountered this error and then moved back to on old 1.4.2 version in my wanderings.

I have never used PackageCompiler

Also I didn’t pin any packages in my enviroment but I still did free DataStructures

This is really weird because I know what I think your issue might be but it shouldn’t exist on the versions that you’re showing…

Can you show ]st -m?

Sure, for the 0.18.0 version of DataStructures enviroment.

(HCRSimJul) pkg> st -m
Project HCRSimJul v0.1.0
Status `~/Manifest.toml`
  [c3fe647b] AbstractAlgebra v0.10.0
  [621f4979] AbstractFFTs v0.5.0
  [1520ce14] AbstractTrees v0.3.3
  [79e6a3ab] Adapt v2.3.0
  [ec485272] ArnoldiMethod v0.0.4
  [7d9fca2a] Arpack v0.4.0
  [68821587] Arpack_jll v3.5.0+3
  [4fba245c] ArrayInterface v2.13.5
  [4c555306] ArrayLayouts v0.4.8
  [56f22d72] Artifacts v1.3.0
  [13072b0f] AxisAlgorithms v1.0.0
  [aae01518] BandedMatrices v0.15.22
  [b99e7846] BinaryProvider v0.5.10
  [a134a8b2] BlackBoxOptim v0.5.0
  [764a87c0] BoundaryValueDiffEq v2.5.0
  [6e34b625] Bzip2_jll v1.0.6+5
  [fa961155] CEnum v0.4.1
  [a9c8d775] CPUTime v1.0.0
  [5d742f6a] CSVFiles v1.0.0
  [052768ef] CUDA v1.3.3
  [a603d957] CanonicalTraits v0.2.3
  [324d7699] CategoricalArrays v0.8.3
  [082447d4] ChainRules v0.7.23
  [d360d2e6] ChainRulesCore v0.9.15
  [aaaa29a8] Clustering v0.14.1
  [944b1d66] CodecZlib v0.6.0
  [35d6a980] ColorSchemes v3.10.1
  [3da002f7] ColorTypes v0.10.9
  [5ae59095] Colors v0.12.4
  [861a8166] Combinatorics v1.0.2
  [bbf7d656] CommonSubexpressions v0.3.0
  [34da2185] Compat v3.20.0
  [e66e0078] CompilerSupportLibraries_jll v0.3.3+0
  [8f4d0f93] Conda v1.4.1
  [88cd18e8] ConsoleProgressMonitor v0.1.2
  [187b0558] ConstructionBase v1.0.0
  [d38c429a] Contour v0.5.5
  [adafc99b] CpuId v0.2.2
  [9a962f9c] DataAPI v1.3.0
  [a93c6f00] DataFrames v0.21.8
  [1313f7d8] DataFramesMeta v0.5.1
  [864edb3b] DataStructures v0.18.0
  [e2d170a0] DataValueInterfaces v1.0.0
  [e7dc6d0d] DataValues v0.4.13
  [bcd4f6db] DelayDiffEq v5.24.2
  [2b5f629d] DiffEqBase v6.48.0
  [459566f4] DiffEqCallbacks v2.14.1
  [5a0ffddc] DiffEqFinancial v2.4.0
  [aae7a2af] DiffEqFlux v1.23.0
  [c894b116] DiffEqJump v6.10.1
  [77a26b50] DiffEqNoiseProcess v5.4.0
  [055956cb] DiffEqPhysics v3.6.0
  [41bf760c] DiffEqSensitivity v6.33.0
  [163ba53b] DiffResults v1.0.2
  [b552c78f] DiffRules v1.0.1
  [0c46a032] DifferentialEquations v6.15.0
  [c619ae07] DimensionalPlotRecipes v1.2.0
  [b4f34e82] Distances v0.9.2
  [31c24e10] Distributions v0.23.12
  [ced4e74d] DistributionsAD v0.6.9
  [ffbed154] DocStringExtensions v0.8.3
  [497a8b3b] DoubleFloats v1.1.13
  [5ae413db] EarCut_jll v2.1.5+0
  [d4d017d3] ExponentialUtilities v1.8.0
  [e2ba6199] ExprTools v0.1.2
  [8f5d6c58] EzXML v1.1.0
  [c87230d0] FFMPEG v0.4.0
  [b22a6f82] FFMPEG_jll v4.3.1+4
  [7a1cc6ca] FFTW v1.2.4
  [f5851436] FFTW_jll v3.3.9+5
  [9aa1b823] FastClosures v0.3.2
  [5789e2e9] FileIO v1.4.3
  [1a297f60] FillArrays v0.9.7
  [6a86dc24] FiniteDiff v2.7.0
  [53c48c17] FixedPointNumbers v0.8.4
  [587475ba] Flux v0.11.1
  [59287772] Formatting v0.4.1
  [f6369f11] ForwardDiff v0.10.12
  [d7e528f0] FreeType2_jll v2.10.1+5
  [559328eb] FriBidi_jll v1.0.5+6
  [069b7b12] FunctionWrappers v1.1.1
  [d9f16b24] Functors v0.1.0
  [0c68f7d7] GPUArrays v5.2.1
  [61eb1bfa] GPUCompiler v0.6.1
  [28b8d3ca] GR v0.52.0
  [6b9d7cbe] GeneralizedGenerated v0.2.7
  [01680d73] GenericSVD v0.3.0
  [c145ed77] GenericSchur v0.4.0
  [5c1252a2] GeometryBasics v0.3.3
  [4d00f742] GeometryTypes v0.8.3
  [42e2da0e] Grisu v1.0.0
  [cd3eb016] HTTP v0.8.19
  [7869d1d1] IRTools v0.4.1
  [615f187c] IfElse v0.1.0
  [d25df0c9] Inflate v0.1.2
  [83e8ac13] IniFile v0.5.0
  [1d5cc7b8] IntelOpenMP_jll v2018.0.3+0
  [a98d9a8b] Interpolations v0.12.10
  [d8418881] Intervals v1.4.2
  [41ab1584] InvertedIndices v1.0.0
  [c8e1da08] IterTools v1.3.0
  [1c8ee90f] IterableTables v1.0.0
  [42fd0dbc] IterativeSolvers v0.8.4
  [82899510] IteratorInterfaceExtensions v1.0.0
  [692b3bcd] JLLWrappers v1.1.1
  [682c06a0] JSON v0.21.1
  [b14d175d] JuliaVariables v0.2.3
  [e5e0dc1b] Juno v0.8.4
  [5ab0869b] KernelDensity v0.6.1
  [c1c5ebd0] LAME_jll v3.100.0+3
  [929cbde3] LLVM v2.0.0
  [b964fa9f] LaTeXStrings v1.2.0
  [2ee39098] LabelledArrays v1.3.0
  [23fbe1c1] Latexify v0.14.0
  [a5e1c1ea] LatinHypercubeSampling v1.6.4
  [73f95e8e] LatticeRules v0.0.1
  [1d6d02ad] LeftChildRightSiblingTrees v0.1.2
  [dd192d2f] LibVPX_jll v1.9.0+1
  [94ce4f54] Libiconv_jll v1.16.0+6
  [093fc24a] LightGraphs v1.3.0
  [d3d80556] LineSearches v7.1.0
  [e6f89c97] LoggingExtras v0.4.2
  [bdcacae8] LoopVectorization v0.8.26
  [d00139f3] METIS_jll v5.1.0+4
  [856f044c] MKL_jll v2020.2.254+0
  [f0e99cf1] MLBase v0.8.0
  [d8e11817] MLStyle v0.4.6
  [1914dd2f] MacroTools v0.5.5
  [739be429] MbedTLS v1.0.2
  [c8ffd9c3] MbedTLS_jll v2.16.8+0
  [442fdcdd] Measures v0.3.1
  [e89f7d12] Media v0.5.0
  [e1d29d7a] Missings v0.4.4
  [78c3b35d] Mocking v0.7.1
  [961ee093] ModelingToolkit v3.21.0
  [46d2c3a1] MuladdMacro v0.2.2
  [f9640e96] MultiScaleArrays v1.8.1
  [6f286f6a] MultivariateStats v0.7.0
  [d41bc354] NLSolversBase v7.7.1
  [2774e3e8] NLsolve v4.4.1
  [872c559c] NNlib v0.7.5
  [77ba4419] NaNMath v0.3.4
  [71a1bf82] NameResolution v0.1.5
  [b8a86587] NearestNeighbors v0.4.7
  [4d1e1d77] Nullables v1.0.0
  [54ca160b] ODEInterface v0.4.8
  [09606e27] ODEInterfaceDiffEq v3.8.0
  [510215fc] Observables v0.3.2
  [6fe1bfb0] OffsetArrays v1.3.1
  [e7412a2a] Ogg_jll v1.3.4+2
  [4536629a] OpenBLAS_jll v0.3.10+0
  [458c3c95] OpenSSL_jll v1.1.1+6
  [efe28fd5] OpenSpecFun_jll v0.5.3+3
  [429524aa] Optim v1.2.0
  [91d4177d] Opus_jll v1.3.1+3
  [bac558e1] OrderedCollections v1.3.1
  [1dea7af3] OrdinaryDiffEq v5.43.0
  [90014a1f] PDMats v0.10.1
  [65888b18] ParameterizedFunctions v5.6.0
  [d96e819e] Parameters v0.12.1
  [69de0a69] Parsers v1.0.11
  [ccf2f8ad] PlotThemes v2.0.0
  [995b91a9] PlotUtils v1.0.7
  [91a5bcdd] Plots v1.6.10
  [e409e4f3] PoissonRandom v0.4.0
  [f27b6e38] Polynomials v1.1.9
  [2dfb63ee] PooledArrays v0.5.3
  [85a6dd25] PositiveFactorizations v0.2.3
  [8162dcfd] PrettyPrint v0.2.0
  [33c8b6b6] ProgressLogging v0.1.3
  [92933f4c] ProgressMeter v1.4.0
  [438e738f] PyCall v1.92.1
  [d330b81b] PyPlot v2.9.0
  [1fd47b50] QuadGK v2.4.1
  [be4d8f0f] Quadmath v0.5.4
  [8a4e6c94] QuasiMonteCarlo v0.2.1
  [e6cf234a] RandomNumbers v1.4.0
  [c84ed2f1] Ratios v0.4.0
  [3cdcf5f2] RecipesBase v1.1.0
  [01d81517] RecipesPipeline v0.1.13
  [731186ca] RecursiveArrayTools v2.7.2
  [f2c3362d] RecursiveFactorization v0.1.4
  [189a3867] Reexport v0.2.0
  [ae029012] Requires v1.1.0
  [ae5879a3] ResettableStacks v1.0.0
  [37e2e3b7] ReverseDiff v1.4.3
  [79098fc4] Rmath v0.6.1
  [f50d1b31] Rmath_jll v0.2.2+1
  [b0e4dd01] RollingFunctions v0.6.2
  [f2b01f46] Roots v1.0.5
  [21efa798] SIMDPirates v0.8.25
  [476501e8] SLEEFPirates v0.5.5
  [1bc83da4] SafeTestsets v0.0.1
  [992d4aef] Showoff v0.3.2
  [699a6c99] SimpleTraits v0.9.3
  [ed01d8cd] Sobol v1.4.0
  [a2af1166] SortingAlgorithms v0.3.1
  [47a9eef4] SparseDiffTools v1.10.0
  [d4ead438] SpatialIndexing v0.1.2
  [276daf66] SpecialFunctions v0.10.3
  [90137ffa] StaticArrays v0.12.4
  [2913bbd2] StatsBase v0.33.2
  [4c63d2b9] StatsFuns v0.9.5
  [f3b207a7] StatsPlots v0.14.14
  [9672c7b4] SteadyStateDiffEq v1.5.1
  [789caeaf] StochasticDiffEq v6.26.0
  [09ab397b] StructArrays v0.4.4
  [856f2bd8] StructTypes v1.1.0
  [bea87d4a] SuiteSparse_jll v5.4.0+9
  [c3572dad] Sundials v4.3.0
  [fb77eaff] Sundials_jll v5.2.0+1
  [d1185830] SymbolicUtils v0.5.1
  [ab02a1b2] TableOperations v0.2.1
  [5e66a065] TableShowUtils v0.2.5
  [3783bdb8] TableTraits v1.0.0
  [382cd787] TableTraitsUtils v1.0.1
  [bd369af6] Tables v1.1.0
  [5d786b92] TerminalLoggers v0.1.2
  [e0df1984] TextParse v1.0.1
  [f269a46b] TimeZones v1.4.0
  [a759f4b9] TimerOutputs v0.5.6
  [9f7883ad] Tracker v0.2.12
  [3bb67fe8] TranscodingStreams v0.9.5
  [a2a6695c] TreeViews v0.3.0
  [3a884ed6] UnPack v1.0.2
  [1986cc42] Unitful v1.4.1
  [3d5dd08c] VectorizationBase v0.12.33
  [81def892] VersionParsing v1.2.0
  [19fa3120] VertexSafeGraphs v0.1.2
  [ea10d353] WeakRefStrings v0.6.2
  [cc8bc4a8] Widgets v0.6.2
  [efce3f68] WoodburyMatrices v0.5.2
  [02c8fc9c] XML2_jll v2.9.10+2
  [a5390f91] ZipFile v0.9.3
  [83775a58] Zlib_jll v1.2.11+17
  [e88e6eb3] Zygote v0.5.8
  [700de1a5] ZygoteRules v0.2.0
  [0ac62f75] libass_jll v0.14.0+4
  [f638f0a6] libfdk_aac_jll v0.1.6+4
  [f27f6e37] libvorbis_jll v1.3.6+6
  [1270edf5] x264_jll v2020.7.14+2
  [dfaa095f] x265_jll v3.0.0+3
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [9fa8497b] Future
  [b77e0a4c] InteractiveUtils
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [44cfe95a] Pkg
  [de0858da] Printf
  [9abbd945] Profile
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA
  [9e88b42a] Serialization
  [1a1011a3] SharedArrays
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [4607b0f0] SuiteSparse
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode

The latest DataStructures should be fine: you should probably free DataStructures.

But hmm… none of this points to an issue. I’m really confused. Are you using some other manifest or environment? What happens if you create a new environment, only add DiffEqBase and OrdinaryDiffEq, and use that?

Made a new clean environment and added just those two libraries

(TestProject) pkg> status
Status `~/TestProject/Project.toml`
  [2b5f629d] DiffEqBase v6.48.0
  [1dea7af3] OrdinaryDiffEq v5.43.0

then ran the following script

using OrdinaryDiffEq


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)
sol = solve(prob, Tsit5())

I got the same error as above.

MethodError: no method matching iterate(::DataStructures.BinaryHeap{Float64,DataStructures.LessThan})
Closest candidates are:
  iterate(!Matched::Base.AsyncGenerator, !Matched::Base.AsyncGeneratorState) at asyncmap.jl:382
  iterate(!Matched::Base.AsyncGenerator) at asyncmap.jl:382
  iterate(!Matched::SimpleTraits.GenerateTypeVars{:lcase}) at /home/khannay/.julia/packages/SimpleTraits/1wYi7/src/SimpleTraits.jl:446
  ...
first(::DataStructures.BinaryHeap{Float64,DataStructures.LessThan}) at abstractarray.jl:341
solve! at solve.jl:445 [inlined]
#__solve#391 at solve.jl:5 [inlined]
__solve at solve.jl:4 [inlined]
#solve_call#456 at solve.jl:65 [inlined]
solve_call at solve.jl:52 [inlined]
#solve_up#458 at solve.jl:86 [inlined]
solve_up at solve.jl:79 [inlined]
#solve#457 at solve.jl:74 [inlined]
solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(lorenz!),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}, ::Tsit5) at solve.jl:72
top-level scope at tmpPkg.jl:14

Thanks so much for your time.

@oxinabox you got any ideas? I can’t recreate this at all.

Only thing I can think is a that somehow the files loaded from ~/.julia/packages/... have somehow got into a weird state.
Like having been editted directly, or somehow overwritten.

you may need to start julia via julia --project inside that new directory as Julia’s environment stacks, so something from your home environment may leak.

you can try to temporarily rename ~/.julia/environment/v1.5 to something like ~/.julia/environment/v1.5_backup and restart Julia and just add those two packages and try again?

@jling I renamed the environment and restarted and now everything is working fine. ??

I guess something was broken in my home environment. It is weird that it never manifested itself in anything being broken within that environment.

The --project tag wasn’t needed for me FYI, it worked either way once I cleared out the home environment.

Thanks everyone for the help.

1 Like

I was suggesting use this if you don’t feel like cleaning the home environment. You need this flag for julia to NOT load your home environment. (switching via ] after launching won’t work since they stack)

1 Like