# Why ODE solver so slow?

**URL:** https://discourse.julialang.org/t/why-ode-solver-so-slow/98773
**Category:** General Usage
**Created:** [May 12, 2023, 11:30pm UTC](https://discourse.julialang.org/t/why-ode-solver-so-slow/98773 "2023-05-12T23:30:45Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![soldin](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@soldin](https://discourse.julialang.org/u/soldin)
#### Post date: [May 25, 2023, 3:37pm UTC](https://discourse.julialang.org/t/why-ode-solver-so-slow/98773/21 "2023-05-25T15:37:40Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [May 25, 2023, 3:53pm UTC](https://discourse.julialang.org/t/why-ode-solver-so-slow/98773/22 "2023-05-25T15:53:33Z")

</div>

> [@soldin](#):
>
> I thought of using Python JAX. Couldn’t get Ubuntu’s Python 2.7 to work with it.

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

---

<div class="post-metadata">

### Author: ![goerz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerz/32/3269_2.png) [@goerz](https://discourse.julialang.org/u/goerz)
#### Post date: [May 25, 2023, 4:44pm UTC](https://discourse.julialang.org/t/why-ode-solver-so-slow/98773/23 "2023-05-25T16:44:08Z")

</div>

> [@soldin](#):
>
> Could you plz lemme know a way to run a file from REPL

```julia
julia> include("file.jl")

```

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

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

```

---

<div class="post-metadata">

### Author: ![soldin](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@soldin](https://discourse.julialang.org/u/soldin)
#### Post date: [May 26, 2023, 2:53am UTC](https://discourse.julialang.org/t/why-ode-solver-so-slow/98773/24 "2023-05-26T02:53:29Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![soldin](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@soldin](https://discourse.julialang.org/u/soldin)
#### Post date: [May 26, 2023, 2:55am UTC](https://discourse.julialang.org/t/why-ode-solver-so-slow/98773/25 "2023-05-26T02:55:05Z")

</div>

Thanks a lot.

[Previous page](https://discourse.julialang.org/t/why-ode-solver-so-slow/98773.md?page=1)
