-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Solve extremely slow on first run #303
Comments
The first run includes compilation which is what the time increase is. I think this is hitting a Julia bug similar to JuliaLang/julia#22255 which is due to an inference recursion limit in v0.6 JuliaLang/julia#26092 . Or it may be due to ForwardDiff.jl compilation time issues like JuliaDiff/ForwardDiff.jl#278 . To check if it's a ForwardDiff thing, try using |
Wow, thanks for the super quick response! Trying it with autodiff=false results in much faster compilation, around 8 seconds, so it definitely seems to be related to that. |
I isolated the issue and reported it upstream. Hopefully this gets fixed there. |
Hello,
I'm solving some stiff DAEs with a mass-matrix solver in the following code:
and for smaller systems (even a similar system with fewer equations, ~26), compilation takes just a few seconds, around 10 seconds with .01 seconds of execution time.
However, for systems which are slightly larger, I get extremely long first-run times relative to subsequent execution times:
519.003612 seconds (664.19 M allocations: 18.791 GiB, 0.98% gc time)
2.769820 seconds (1.96 M allocations: 170.898 MiB, 8.22% gc time)
This doesn't seem like normal behavior. The calculations are all in-place, and the functions are in the attached file. This happens both in Linux and Windows with the following package status:
model.jl can be found below:
Sorry for all the huge code snippets!
The text was updated successfully, but these errors were encountered: