-
-
Notifications
You must be signed in to change notification settings - Fork 60
Pardiso leaks memory #593
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
Comments
I think we need to set the finalizer? Not after each solve but on gc? |
For small problems that should be sufficient. However, if one solves larger linear systems with some bandwidth we potentially leak in the order of 50mb per solve call (due to the fill-in). If we use this inside a Newton for DAE solvers, then the memory consumption gets out of hand quite quickly if the time interval is not small. Maybe a compromise is to add some flag to the constructor to decide on the release frequency? |
Well we should free immediately when we can, but if say someone's REPL stays open or something, it should still have a finalizer trigger. |
May be this can be done on the Pardiso.jl side ? Let us see how the discussion plays out there. It seems that multiple pardiso call with RELEASE_ALL don't harm, but not sure if we can rely on this. |
Describe the bug 🐞
Pardiso leaks memory. This is an issue for long-running simulations with potentially thousands of linear solve calls.
Expected behavior
Pardiso should not leak memory.
Minimal Reproducible Example 👇
See this comment in the extension
LinearSolve.jl/ext/LinearSolvePardisoExt.jl
Line 150 in 6f8c1cf
Additional context
I am pretty sure we should call phase -1 after each solve (or at least phase 0) to release the internal buffers.
The text was updated successfully, but these errors were encountered: