Why ODE solver so slow?

Sorry, but I had one more query on this. Yes, on REPL the time is really low. But in this case, the code could be copy/pasted, as it was a single line. Could you plz lemme know a way to run a file from REPL, or some other way in which everything doesn’t get compiled again?

P.S.: In the meantime, I thought of using Python JAX. Couldn’t get Ubuntu’s Python 2.7 to work with it. Also found python to be a bit strange (odeint’s (lsoda) code is slightly different from that of dopri5).

Python 2.7 is ancient. Jax only supports newer versions of Python 3. Probably 3.8->, I think.

1 Like
julia> include("file.jl")

If you want to avoid global variables in file.jl polluting your workspace, you can do

julia> module TEMP; include("file.jl"); end
1 Like

Yes, Ubuntu suggested that I should create a virtual environment. Me being averse to tech., could not get myself to learn how to create such environment.

Thanks a lot.