Memory used by MUMPS is not being cleaned? #2925
Closed
miguelcoolchips
started this conversation in
General
Replies: 1 comment 3 replies
-
That is intentional. None of the solvers ever go out of scope, so they should not be collected. Basically a solver holds on to all its state for reuse (so in the mumps case, exactly so that the factorisation can be reused if you solve again with the same solver). |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I ran the following example with memray (python -m memray run --native test_multiple_solvers.py)
and the flamegraph looks as follows:
The heap memory goes all the way up to 22 GB (orange line at the top). Most of the memory is consumed by MUMPS, but it seems that is not cleaned? If I delete each solver right after using it (
del solver
), the flamegraph looks cleaner and the heap memory only reaches 8 GB.The calls to
gc.collect()
and the PETSc garbage collector did not make much difference. Is the decision to leave the MUMPS memory untouched intentional? Perhaps it's to allow its reuse for multiple calls to the solver.Beta Was this translation helpful? Give feedback.
All reactions