SciML / DifferentialEquations.jl

Multi-language suite for high-performance solvers of differential equations and scientific machine learning (SciML) components. Ordinary differential equations (ODEs), stochastic differential equations (SDEs), delay differential equations (DDEs), differential-algebraic equations (DAEs), and more in Julia.
https://docs.sciml.ai/DiffEqDocs/stable/
Other
2.87k stars 230 forks source link

Update Doesn't Even work with Tutorial 1 #404

Closed taliaborofsky closed 5 years ago

taliaborofsky commented 5 years ago

I just now updated the package. Then as a test I tried out the first example from the tutorials. It didn't work. Here's the code:

using DifferentialEquations
f(u,p,t) = 1.01*u
u0=1/2
tspan = (0.0,1.0)
prob = ODEProblem(f,u0,tspan)
sol = solve(prob,Tsit5(),reltol=1e-8,abstol=1e-8)
using Plots
plot(sol,linewidth=5,title="Solution to the linear ODE with a thick line",
     xaxis="Time (t)",yaxis="u(t) (in μm)",label="My Thick Line!") # legend=false
plot!(sol.t, t->0.5*exp(1.01t),lw=3,ls=:dash,label="True Solution!")

And here's the first part of the error message.

MethodError: no method matching similar(::Float64) Closest candidates are: similar(!Matched::ZMQ.Message, !Matched::Type{T}, !Matched::Tuple{Vararg{Int64,N}} where N) where T at /Users/taliaborofsky/.julia/packages/ZMQ/ABGOx/src/message.jl:93 similar(!Matched::DataStructures.IntSet) at deprecated.jl:53 similar(!Matched::Sundials.NVector) at /Users/taliaborofsky/.julia/packages/Sundials/AL2Km/src/nvector_wrapper.jl:69 ...

By playing around, I found the error message happens in the solve step.

ChrisRackauckas commented 5 years ago

Something is really wrong with the setup here since it shouldn't be calling into Sundials at all. Can I see your Project.toml and Manifest.toml? Or your ]st? What operating system? I assume this is Julia v1.0.3?

taliaborofsky commented 5 years ago

Yes, this is Julia v1.0.3, run on a Mac OS Mojave operating system.

I’m new to Julia so figuring out how to access Project.toml and Manifest.toml. When I went into Pkg REPL-mode and entered st, this was my result:

(v1.0) pkg> st
    Status `~/.julia/environments/v1.0/Project.toml`
  [7c4d4715] AmplNLWriter v0.4.2
  [a076750e] CPLEX v0.4.2
  [34da2185] Compat v1.4.0
  [a93c6f00] DataFrames v0.15.2
  [225cb15b] DiffEqTutorials v0.0.0 #master (https://github.com/JuliaDiffEq/DiffEqTutorials.jl)
  [0c46a032] DifferentialEquations v5.3.1
  [31c24e10] Distributions v0.16.4
  [89b67f3b] ExcelFiles v0.6.1
  [2e9cd046] Gurobi v0.5.7
  [7073ff75] IJulia v1.14.1
  [4076af6c] JuMP v0.18.5
  [23fbe1c1] Latexify v0.6.0
  [58dd65bb] Plotly v0.2.0
  [91a5bcdd] Plots v0.22.0
  [438e738f] PyCall v1.18.5
  [d330b81b] PyPlot v2.6.3
  [6f49c342] RCall v0.13.0
  [ce6b1742] RDatasets v0.6.1
  [3646fa90] ScikitLearn v0.5.0
  [276daf66] SpecialFunctions v0.7.2
  [60ddc479] StatPlots v0.8.2
  [789caeaf] StochasticDiffEq v5.10.4
  [9a3f8284] Random 
  [10745b16] Statistics 

Then for the manifest:

    Status `~/.julia/environments/v1.0/Manifest.toml`
  [621f4979] AbstractFFTs v0.3.2
  [7c4d4715] AmplNLWriter v0.4.2
  [7d9fca2a] Arpack v0.3.0
  [bf4720bc] AssetRegistry v0.1.0
  [13072b0f] AxisAlgorithms v0.3.0
  [aae01518] BandedMatrices v0.8.0
  [9e28174c] BinDeps v0.8.10
  [b99e7846] BinaryProvider v0.5.3
  [a134a8b2] BlackBoxOptim v0.4.0
  [ad839575] Blink v0.9.0
  [764a87c0] BoundaryValueDiffEq v2.2.1
  [a076750e] CPLEX v0.4.2
  [a9c8d775] CPUTime v0.1.0
  [336ed68f] CSV v0.4.3
  [49dc2e85] Calculus v0.4.1
  [324d7699] CategoricalArrays v0.5.2
  [8bab3169] ChunkedArrays v0.1.1
  [aaaa29a8] Clustering v0.12.1
  [944b1d66] CodecZlib v0.5.1
  [3da002f7] ColorTypes v0.7.5
  [5ae59095] Colors v0.9.5
  [bbf7d656] CommonSubexpressions v0.2.0
  [34da2185] Compat v1.4.0
  [8f4d0f93] Conda v1.1.1
  [d38c429a] Contour v0.5.1
  [a93c6f00] DataFrames v0.15.2
  [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
  [225cb15b] DiffEqTutorials v0.0.0 #master (https://github.com/JuliaDiffEq/DiffEqTutorials.jl)
  [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
  [b4f34e82] Distances v0.7.4
  [31c24e10] Distributions v0.16.4
  [ffbed154] DocStringExtensions v0.6.0
  [da5c29d0] EllipsisNotation v0.3.0
  [89b67f3b] ExcelFiles v0.6.1
  [c04bee98] ExcelReaders v0.10.2
  [d4d017d3] ExponentialUtilities v1.3.0
  [8f5d6c58] EzXML v0.9.0
  [7a1cc6ca] FFTW v0.2.4
  [5789e2e9] FileIO v1.0.4
  [1a297f60] FillArrays v0.4.0
  [53c48c17] FixedPointNumbers v0.5.3
  [f6369f11] ForwardDiff v0.9.0
  [069b7b12] FunctionWrappers v1.0.0
  [de31a74c] FunctionalCollections v0.5.0
  [28b8d3ca] GR v0.36.0
  [01680d73] GenericSVD v0.2.1
  [2e9cd046] Gurobi v0.5.7
  [cd3eb016] HTTP v0.7.1
  [9fb69e20] Hiccup v0.2.2
  [7073ff75] IJulia v1.14.1
  [83e8ac13] IniFile v0.5.0
  [a98d9a8b] Interpolations v0.11.0
  [c8e1da08] IterTools v1.1.1
  [1c8ee90f] IterableTables v0.10.0
  [82899510] IteratorInterfaceExtensions v0.1.1
  [97c1335a] JSExpr v0.5.0
  [682c06a0] JSON v0.20.0
  [4076af6c] JuMP v0.18.5
  [5ab0869b] KernelDensity v0.5.1
  [b964fa9f] LaTeXStrings v1.0.3
  [23fbe1c1] Latexify v0.6.0
  [50d2b5c4] Lazy v0.13.2
  [5078a376] LazyArrays v0.5.1
  [7f8f8fb0] LearnBase v0.2.2
  [f8899e07] LinQuadOptInterface v0.4.3
  [d3d80556] LineSearches v7.0.1
  [2fda8390] LsqFit v0.6.0
  [1914dd2f] MacroTools v0.4.4
  [b8f27783] MathOptInterface v0.6.4
  [fdba3010] MathProgBase v0.7.7
  [739be429] MbedTLS v0.6.6
  [442fdcdd] Measures v0.3.0
  [e1d29d7a] Missings v0.3.1
  [78c3b35d] Mocking v0.5.7
  [46d2c3a1] MuladdMacro v0.2.1
  [f9640e96] MultiScaleArrays v1.3.1
  [ffc61752] Mustache v0.5.8
  [a975b10e] Mux v0.5.3
  [d41bc354] NLSolversBase v7.1.2
  [2774e3e8] NLsolve v3.0.1
  [77ba4419] NaNMath v0.3.2
  [b8a86587] NearestNeighbors v0.4.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
  [65888b18] ParameterizedFunctions v4.0.0
  [d96e819e] Parameters v0.10.3
  [69de0a69] Parsers v0.2.15
  [06bb1623] PenaltyFunctions v0.1.2
  [fa939f87] Pidfile v1.1.0
  [ccf2f8ad] PlotThemes v0.3.0
  [995b91a9] PlotUtils v0.5.5
  [58dd65bb] Plotly v0.2.0
  [a03496cd] PlotlyBase v0.2.5
  [f0f68f2c] PlotlyJS v0.12.1
  [91a5bcdd] Plots v0.22.0
  [e409e4f3] PoissonRandom v0.3.0
  [85a6dd25] PositiveFactorizations v0.2.1
  [438e738f] PyCall v1.18.5
  [d330b81b] PyPlot v2.6.3
  [1fd47b50] QuadGK v2.0.3
  [6f49c342] RCall v0.13.0
  [df47a6cb] RData v0.5.0
  [ce6b1742] RDatasets v0.6.1
  [e6cf234a] RandomNumbers v1.0.3
  [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
  [89212889] ReverseDiffSparse v0.8.4
  [79098fc4] Rmath v0.5.0
  [f2b01f46] Roots v0.7.4
  [3646fa90] ScikitLearn v0.5.0
  [6e75b9c4] ScikitLearnBase v0.4.1
  [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
  [60ddc479] StatPlots v0.8.2
  [90137ffa] StaticArrays v0.10.0
  [2913bbd2] StatsBase v0.27.0
  [4c63d2b9] StatsFuns v0.7.0
  [3eaba693] StatsModels v0.3.1
  [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
  [f269a46b] TimeZones v0.8.2
  [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
  [104b5d7c] WebSockets v1.1.1
  [cc8bc4a8] Widgets v0.4.4
  [1b915085] WinReg v0.3.1
  [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 
  [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 

Thanks,

Talia

ChrisRackauckas commented 5 years ago

Interesting, nothing looks wrong with your setup. It looks like the standard one and I can't seem to reproduce it (it essentially matches https://travis-ci.org/JuliaDiffEq/DifferentialEquations.jl/jobs/436167836 ). Just to double check, this is what happens in a brand new REPL session? Can I get the full error message that occurs when ran in a fresh REPL session?

taliaborofsky commented 5 years ago

Well this is interesting. I already tried it on two different REPL sessions (including a fresh one today), but when I just tried it again after opening this email, it finally worked. I did just update a lot of the packages you listed as necessary for StochasticDiffEq. Perhaps that’s why. Thank you for the help!

On Dec 27, 2018, at 11:36 PM, Christopher Rackauckas notifications@github.com wrote:

Interesting, nothing looks wrong with your setup. It looks like the standard one and I can't seem to reproduce it (it essentially matches https://travis-ci.org/JuliaDiffEq/DifferentialEquations.jl/jobs/436167836 https://travis-ci.org/JuliaDiffEq/DifferentialEquations.jl/jobs/436167836 ). Just to double check, this is what happens in a brand new REPL session? Can I get the full error message that occurs when ran in a fresh REPL session?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JuliaDiffEq/DifferentialEquations.jl/issues/404#issuecomment-450288357, or mute the thread https://github.com/notifications/unsubscribe-auth/Ar-4omIe0I6AG2yM2OUGTGrHRHxbAP5cks5u9Z_ogaJpZM4ZjXXi.