-
Notifications
You must be signed in to change notification settings - Fork 55
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
High memory allocation when using preconditioners #219
Comments
The culprit is here : https://github.com/JuliaSmoothOptimizers/Krylov.jl/blob/master/src/variants.jl#L3-L13 |
I understand that there's a lot of legacy decisions in play, but... from what I gather, parts of the code rely on the convention that products of the form Currently this is effectively enforced for matrix input, because they are automatically wrapped in a IMO, it would be more natural to have Krylov methods use |
We should add in the documentation that the user must follow the convention that |
I have noticed some higher-than-expected memory allocations when using a preconditioner other than
opEye()
.I only tested
minres
andcg
so far, and the culprit seems to be a matrix-vector product withM
, namely, in cg and minres.If I replace, e.g.,
v = M * r2
inminres
bymul!(v, M, r2)
, the allocations are more reasonable (see example below).Current version
and if I replace with
mul!(v, M, r2)
Same behavior with
cg
.EDIT: making the above modification to
minres
causes some tests to failThe text was updated successfully, but these errors were encountered: