Hello,
I’m getting this error when I’m trying to deserialize pumas fitted objects. I can deserialize once or twice, and then I have to start a new instance to get it working again.
ERROR: invalid redefinition of constant ##1090
Stacktrace:
[1] deserialize_typename(s::Serializer{IOStream}, number::UInt64)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:1323
[2] deserialize(s::Serializer{IOStream}, #unused#::Type{Core.TypeName})
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:1285
[3] handle_deserialize(s::Serializer{IOStream}, b::Int32)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:962
[4] deserialize(s::Serializer{IOStream})
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:816
[5] handle_deserialize(s::Serializer{IOStream}, b::Int32)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:873
[6] deserialize(s::Serializer{IOStream})
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:816
[7] deserialize_datatype(s::Serializer{IOStream}, full::Bool)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:1409
[8] handle_deserialize(s::Serializer{IOStream}, b::Int32)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:869
[9] deserialize(s::Serializer{IOStream})
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:816
[10] deserialize_datatype(s::Serializer{IOStream}, full::Bool)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:1409
[11] handle_deserialize(s::Serializer{IOStream}, b::Int32)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:869
[12] deserialize(s::Serializer{IOStream})
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:816
[13] handle_deserialize(s::Serializer{IOStream}, b::Int32)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:876
[14] deserialize_fillarray!(A::Vector{Pumas.FittedPumasModel{T1, Vector{Subject{NamedTuple{(:DV,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantInterpolationStructArray{Vector{Float64}, NamedTuple{(:period, :isT, :rep, :input_tr_F, :input_tr_ktr, :target_tr_ratio, :BOV, :target_WSV, :study_design, :scenario), Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Int64}, Vector{String}, Vector{Int64}}}, Symbol}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}, Optim.MultivariateOptimizationResults{Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat}, Vector{Float64}, Float64, Float64, Vector{Optim.OptimizationState{Float64, Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat}}}, Bool, NamedTuple{(:f_limit_reached, :g_limit_reached, :h_limit_reached, :time_limit, :callback, :f_increased), NTuple{6, Bool}}}, FOCE{Optim.NewtonTrustRegion{Float64}, Optim.Options{Float64, Nothing}}, Vector{Vector{Float64}}, NamedTuple{(:optimize_fn, :constantcoef, :omegas, :ensemblealg, :diffeq_options), Tuple{Pumas.DefaultOptimizeFN{Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat}, NamedTuple{(:show_trace, :store_trace, :extended_trace, :g_tol, :allow_f_increases), Tuple{Bool, Bool, Bool, Float64, Bool}}}, Tuple{}, Tuple{}, EnsembleThreads, NamedTuple{(:abstol, :reltol, :alg), Tuple{Float64, Float64, CompositeAlgorithm{Tuple{Vern7{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, Rodas5{1, true, LinearSolve.GenericLUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}}, OrdinaryDiffEq.AutoSwitch{Vern7{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, Rodas5{1, true, LinearSolve.GenericLUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}, Rational{Int64}, Int64}}}}}}, ParamSet{NamedTuple{(:tvtr_F, :tvtr_ktr, :tvCL, :tvQ, :tvVp, :tvVc, :tvFfast, :tvdur, :tvktr, :ωCL_BSV, :ωQ_BSV, :ωVp_BSV, :ωVc_BSV, :ωFfast_logit_BSV, :ωdur_BSV, :ωktr_BSV, :ω²F_BOV, :ω²Ffast_logit_BOV, :ω²ktr_BOV, :σ_prop), Tuple{RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, Float64, Float64}, Vararg{RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, 13}}}}, Pumas.OptimState{NLSolversBase.OnceDifferentiable{Float64, Vector{Float64}, Vector{Float64}}, Optim.BFGSState{Vector{Float64}, Matrix{Float64}, Float64, Vector{Float64}}}} where T1<:PumasModel}, s::Serializer{IOStream})
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:1267
[15] deserialize_array(s::Serializer{IOStream})
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:1259
[16] handle_deserialize(s::Serializer{IOStream}, b::Int32)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:867
[17] deserialize(s::Serializer{IOStream})
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:816
[18] handle_deserialize(s::Serializer{IOStream}, b::Int32)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:922
[19] deserialize
@ /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:816 [inlined]
[20] deserialize(s::IOStream)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:803
[21] open(f::typeof(deserialize), args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base ./io.jl:395
[22] open
@ ./io.jl:392 [inlined]
[23] deserialize(filename::String)
@ Serialization /opt/julia-1.9.3/share/julia/stdlib/v1.9/Serialization/src/Serialization.jl:813
[24] top-level scope