Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which version changed ODESolution interface? #931

Closed
davorh opened this issue Feb 6, 2023 · 1 comment
Closed

Which version changed ODESolution interface? #931

davorh opened this issue Feb 6, 2023 · 1 comment

Comments

@davorh
Copy link

davorh commented Feb 6, 2023

Unfortunately, I have stored a large and time-consuming solution (4D array, size ~ 4GB) from DifferentialEquations.jl package in JLD2 format. Meanwhile, I upgraded Julia and reinstalled the packages. Now when I try to read in a file with jldopen and try to access an object named as original variable "solve", I get this error shown below. To restore it, JLD2 needs the correct package preloaded. Can you tell me what version of DifferentialEquations.j changed the ODESolution interface so I can restore the saved solution?

┌ Warning: read type ODEFunction{false,SciMLBase.AutoSpecialize,Main.#BK,LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing} has a different number of parameters from type ODEFunction in workspace; reconstructing
└ @ JLD2 C:\Users\davorh.julia\packages\JLD2\r5t7Q\src\data\reconstructing_datatypes.jl:457

┌ Warning: read type ODESolution{Float64, 3, Vector{Matrix{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Matrix{Float64}}}, ODEProblem{Matrix{Float64}, Tuple{Float64, Float64}, false, SciMLBase.NullParameters, JLD2.ReconstructedTypes.var"##ODEFunction{false,SciMLBase.AutoSpecialize,Main.#BK,LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}#291", Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, AB3, OrdinaryDiffEq.InterpolationData{JLD2.ReconstructedTypes.var"##ODEFunction{false,SciMLBase.AutoSpecialize,Main.#BK,LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}#291", Vector{Matrix{Float64}}, Vector{Float64}, Vector{Vector{Matrix{Float64}}}, OrdinaryDiffEq.AB3ConstantCache{Matrix{Float64}}}, DiffEqBase.DEStats} is not a leaf type in workspace; reconstructing
└ @ JLD2 C:\Users\davorh.julia\packages\JLD2\r5t7Q\src\data\reconstructing_datatypes.jl:263

MethodError: Cannot convert an object of type
JLD2.ReconstructedTypes.var"##ODESolution{Float64, 3, Vector{Matrix{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Matrix{Float64}}}, ODEProblem{Matrix{Float64}, Tuple{Float64, Float64}, false, SciMLBase.NullParameters, JLD2.ReconstructedTypes.var"##ODEFunction{false,SciMLBase.AutoSpecialize,Main.#BK,LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}#291", Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, AB3, OrdinaryDiffEq.InterpolationData{JLD2.ReconstructedTypes.var"##ODEFunction{false,SciMLBase.AutoSpecialize,Main.#BK,LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}#291", Vector{Matrix{Float64}}, Vector{Float64}, Vector{Vector{Matrix{Float64}}}, OrdinaryDiffEq.AB3ConstantCache{Matrix{Float64}}}, DiffEqBase.DEStats}#292" to an object of type
ODESolution{Float64, 3, Vector{Matrix{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Matrix{Float64}}}, ODEProblem{Matrix{Float64}, Tuple{Float64, Float64}, false, SciMLBase.NullParameters, JLD2.ReconstructedTypes.var"##ODEFunction{false,SciMLBase.AutoSpecialize,Main.#BK,LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}#291", Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, AB3, OrdinaryDiffEq.InterpolationData{JLD2.ReconstructedTypes.var"##ODEFunction{false,SciMLBase.AutoSpecialize,Main.#BK,LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}#291", Vector{Matrix{Float64}}, Vector{Float64}, Vector{Vector{Matrix{Float64}}}, OrdinaryDiffEq.AB3ConstantCache{Matrix{Float64}}}, DiffEqBase.DEStats}

@ChrisRackauckas
Copy link
Member

SciMLBase v1.70.0 would have been the last one before alg_choice was added to the struct.

https://github.com/SciML/SciMLBase.jl/releases/tag/v1.70.0

I would recommend keeping a manifest around if saving a jld2. Though as another note, there aren't any planned changes to the solution struct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants