Differential Equations General Questions

Hi there -

I had some complete package to work with differential equations montecarlo simulations.
It seems that differentialequations montecarlo is not longer supported?
Is differentialequations enesmble a replacement for it?
Is this just a renaming or will programing needs syntax also change?

Thanks,

Ale

It’s mostly a renaming. There is a slight syntax change for how the choice of parallelism is done though, and it was structurally required to allow dispatching.

1 Like

Another update related question:

When I worked with DifferentialEquations 6.3.0 and DiffEqParamEstim 1.6.0, DiffEqSensitivity 6.0.1

I could easily do:

using Distributed
addprocs(8)
@everywhere using DifferentialEquations 
@everywhere using DiffEqSensitivity
@everywhere using DiffEqParamEstim

and everything will load in my 8 processes

Now if I do the same with DifferentialEquations 6.9.0 and DiffEqParamEstim 1.12.0 and DiffEqSensitivity 6.0.1, this doesn’t work and I get the following messages below.
For the time being I am reverting to the old versions, but I’d like to be able to move to the last functions. Am I doing something wrong? or is there something that needs to be fixed? in the new versions?

Thanks,

Ale

using Distributed
addprocs(8)
@everywhere using DifferentialEquations 
@everywhere using DiffEqParamEstim

I get (showing only worker 2)

Info: Precompiling SeagenPKPD [top-level]
└ @ Base loading.jl:1186

From worker 2: ERROR: LoadError: LoadError: syntax: invalid function name “eFAST <: GSAMethod”
From worker 2: Stacktrace:

  From worker 2:	 [1] include at ./boot.jl:317 [inlined]
  From worker 2:	 [2] include_relative(::Module, ::String) at ./loading.jl:1038
  From worker 2:	 [3] include at ./sysimg.jl:29 [inlined]
  From worker 2:	 [4] include(::String) at /opt/julia/packages/DiffEqSensitivity/jlWf7/src/DiffEqSensitivity.jl:1
  From worker 2:	 [5] top-level scope at none:0
  From worker 2:	 [6] include at ./boot.jl:317 [inlined]
  From worker 2:	 [7] include_relative(::Module, ::String) at ./loading.jl:1038
  From worker 2:	 [8] include(::Module, ::String) at ./sysimg.jl:29
  From worker 2:	 [9] top-level scope at none:2
  From worker 2:	 [10] eval at ./boot.jl:319 [inlined]
  From worker 2:	 [11] eval(::Expr) at ./client.jl:389
  From worker 2:	 [12] top-level scope at ./none:3
  From worker 2:	in expression starting at /opt/julia/packages/DiffEqSensitivity/jlWf7/src/global_sensitivity/eFAST_sensitivity.jl:1
  From worker 2:	in expression starting at /opt/julia/packages/DiffEqSensitivity/jlWf7/src/DiffEqSensitivity.jl:25

On worker 2:
Failed to precompile DiffEqSensitivity [41bf760c-e81c-5289-8e54-58b1f1f8abe2] to /opt/julia/compiled/v1.0/DiffEqSensitivity/02xYn.ji.
error at ./error.jl:33
macro expansion at ./logging.jl:313 [inlined]
compilecache at ./loading.jl:1184
macro expansion at ./logging.jl:311 [inlined]
_require at ./loading.jl:941
require at ./loading.jl:852
macro expansion at ./logging.jl:311 [inlined]
require at ./loading.jl:834
eval at ./boot.jl:319
#116 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/process_messages.jl:276
run_work_thunk at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/process_messages.jl:56
run_work_thunk at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/process_messages.jl:65
#102 at ./task.jl:259
#remotecall_wait#154(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Function, ::Distributed.Worker, ::Module, ::Vararg{Any,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/remotecall.jl:407
remotecall_wait(::Function, ::Distributed.Worker, ::Module, ::Vararg{Any,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/remotecall.jl:398
#remotecall_wait#157(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Function, ::Int64, ::Module, ::Vararg{Any,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/remotecall.jl:419
remotecall_wait(::Function, ::Int64, ::Module, ::Vararg{Any,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/remotecall.jl:419
(::getfield(Distributed, Symbol("##163#165")){Module,Expr})() at ./task.jl:259

…and 8 more exception(s).

Stacktrace:
[1] sync_end(::Array{Any,1}) at ./task.jl:226
[2] remotecall_eval(::Module, ::Array{Int64,1}, ::Expr) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/macros.jl:207
[3] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/macros.jl:190
[4] top-level scope at In[74]:1

Similar results for ParamEstim:

using Distributed
addprocs(8)
@everywhere using DifferentialEquations 
@everywhere using DiffEqParamEstim

Info: Precompiling DiffEqParamEstim [1130ab10-4a5a-5621-a13d-e4788d82bd4c]
└ @ Base loading.jl:1186
From worker 2: ERROR: LoadError: LoadError: syntax: invalid function name “eFAST <: GSAMethod”

From worker 2: Stacktrace:
From worker 2: [1] include at ./boot.jl:317 [inlined]

From worker 2: [2] include_relative(::Module, ::String) at ./loading.jl:1038

From worker 2: [3] include at ./sysimg.jl:29 [inlined]
From worker 2: [4] include(::String) at /opt/julia/packages/DiffEqSensitivity/jlWf7/src/DiffEqSensitivity.jl:1
From worker 2: [5] top-level scope at none:0
From worker 2: [6] include at ./boot.jl:317 [inlined]
From worker 2: [7] include_relative(::Module, ::String) at ./loading.jl:1038
From worker 2: [8] include(::Module, ::String) at ./sysimg.jl:29
From worker 2: [9] top-level scope at none:2
From worker 2: [10] eval at ./boot.jl:319 [inlined]
From worker 2: [11] eval(::Expr) at ./client.jl:389
From worker 2: [12] top-level scope at ./none:3
From worker 2: in expression starting at /opt/julia/packages/DiffEqSensitivity/jlWf7/src/global_sensitivity/eFAST_sensitivity.jl:1
From worker 2: in expression starting at /opt/julia/packages/DiffEqSensitivity/jlWf7/src/DiffEqSensitivity.jl:25

On worker 2: Failed to precompile DiffEqParamEstim [1130ab10-4a5a-5621-a13d-e4788d82bd4c] to /opt/julia/compiled/v1.0/DiffEqParamEstim/nWq0E.ji. error at ./error.jl:33 macro expansion at ./logging.jl:313 [inlined] compilecache at ./loading.jl:1184 macro expansion at ./logging.jl:311 [inlined] _require at ./loading.jl:941 require at ./loading.jl:852 macro expansion at ./logging.jl:311 [inlined] require at ./loading.jl:834 eval at ./boot.jl:319 #116 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/process_messages.jl:276 run_work_thunk at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/process_messages.jl:56 run_work_thunk at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/process_messages.jl:65 #102 at ./task.jl:259 #remotecall_wait#154(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Function, ::Distributed.Worker, ::Module, ::Vararg{Any,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/remotecall.jl:407 remotecall_wait(::Function, ::Distributed.Worker, ::Module, ::Vararg{Any,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/remotecall.jl:398 #remotecall_wait#157(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Function, ::Int64, ::Module, ::Vararg{Any,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/remotecall.jl:419 remotecall_wait(::Function, ::Int64, ::Module, ::Vararg{Any,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/remotecall.jl:419 (::getfield(Distributed, Symbol("##163#165")){Module,Expr})() at ./task.jl:259 …and 8 more exception(s). Stacktrace: [1] sync_end(::Array{Any,1}) at ./task.jl:226 [2] remotecall_eval(::Module, ::Array{Int64,1}, ::Expr) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/macros.jl:207 [3] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/macros.jl:190 [4] top-level scope at In[77]:1

Try a new REPL session: looks like some processes may have been on the old package?

I’m out of office,

Will do and I’ll let you know as soon as I have the chance.

Thanks

Ale

It did not work, but I am working on a remote computer (where I am only user) where my only interface to Julia is through Jupyter… I restarted the kernel and got the same errors… I wonder if this can be an issue with IJulia.

Thanks,

Ale

Quite possibly. What version of Julia is this kernel running?

Oh, from the error message I see that it’s running v1.0(.5?). I believe the lower bound on the ensemble stuff was probably around Julia v1.2. I assume you’re running this for the LTS?

yes trying to run fro ensemble - I’ll ask admin to update to 1.2 or would you recommend 1.3?

Thanks and take care,

ale

I would highly recommend v1.3. Remember that v1.3. is what introduced the new multithreading, so it’s just much better behaved with this stuff. The pre-v1.3 ensembles/MonteCarlo was multithreaded, but was using the very experimental form and had somewhat difficult hard edges because of that (for example, printing would cause segfaults :man_shrugging:, which was fixed in v1.3 and makes debugging easier!).

will 1,3 also be the better option for Pumas?
that I run from my computer with 1.2 (PRO)

Thanks,

ale

The new JuliaPro is Julia v1.3 and the next Pumas release will require v1.3.

1 Like