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

Drastic difference in the mean running times of Julia and Python #23

Open
dinskid opened this issue Jun 6, 2020 · 8 comments
Open

Drastic difference in the mean running times of Julia and Python #23

dinskid opened this issue Jun 6, 2020 · 8 comments

Comments

@dinskid
Copy link
Collaborator

dinskid commented Jun 6, 2020

The benchmarking (if it is correct) shows results where Julia's version of solveSystem is really slow when compared to Python's version of the same

Python results
image

Julia results
image

@ChrisRackauckas
Copy link
Collaborator

Do you want me to take a look? What are you running?

@dinskid
Copy link
Collaborator Author

dinskid commented Jun 6, 2020

Sure, the code has been merged in the last commit. I am running Tsit5() on it (if that is what you asked).

@ChrisRackauckas
Copy link
Collaborator

what integrator are you using in SciPy?

@dinskid
Copy link
Collaborator Author

dinskid commented Jun 7, 2020

I don't have a great understanding about these, but I think it is RK23.
This is the corresponding python code.

out = integrate.solve_ivp(
            fun = lambda t,y: dydt_Complete(t,y, **kwargs),
            t_span=(0.,total_days),
            y0 = cur_stateTensor,
            method='RK23',
            t_eval=range(total_days),
            rtol = 1e-3, #default 1e-3
            atol = 1e-3, # default 1e-6
        )

Sorry about the previous comment, the code is in the PR ( it hasn't been merged yet ).

@ChrisRackauckas
Copy link
Collaborator

Alright. I'll follow the benchmark and when you merge it I'll take a look.

@vollmersj
Copy link
Owner

I have just reviewed the PR and merged it. Maybe the issue is #6 the einsum hack is allocating arrays at every step - this might explain the 637mb allocation for the solving the ODE (the transition tensor should be less < 1MB).

@ChrisRackauckas
Copy link
Collaborator

Alright, I'll take a look and see what can be done. Indeed, 637mb is far too much.

@ChrisRackauckas
Copy link
Collaborator

Accelerated by 36,000x in #24

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

3 participants