You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a program where I factorize a matrix once, and apply it many times to different rhs vectors (they are generated sequentially, in a time-stepping loop). I noticed that the memory usage grows linearly.
I noticed that every time I call associate_rhs!(), another entry is added to the mumps._gc_haven(), but I think the real culprit is that these two lines make copies of the rhs
I think that way at least if you pass a Vector or Matrix, there would be no copy - you'd end up with y pointing to the same memory as the original rhs that the user passed in.
The text was updated successfully, but these errors were encountered:
Is it not possible to replace y = convert(Matrix{T}, rhs)[:] by y = vec(convert(Matrix{T}, rhs))?
We developed the interface a few years ago and didn’t optimize it.
We have not been careful with the allocations.
Can you open a PR?
I can review it before the end of the week.
I have a program where I factorize a matrix once, and apply it many times to different rhs vectors (they are generated sequentially, in a time-stepping loop). I noticed that the memory usage grows linearly.
I noticed that every time I call
associate_rhs!()
, another entry is added to themumps._gc_haven()
, but I think the real culprit is that these two lines make copies of the rhsMUMPS.jl/src/interface.jl
Line 248 in 09313ba
MUMPS.jl/src/interface.jl
Line 240 in 09313ba
Is there a reason for this? Am I using the wrong calls for this use case?
Is an easy fix to replace those lines with:
and
I think that way at least if you pass a
Vector
orMatrix
, there would be no copy - you'd end up withy
pointing to the same memory as the originalrhs
that the user passed in.The text was updated successfully, but these errors were encountered: