Memory requirements of lobpcg: Matlab and hypre implementation differences
3 次查看(过去 30 天)
显示 更早的评论
Hi,
until recently i used lobpcg.m from http://www.mathworks.com/matlabcentral/fileexchange/48-lobpcg-m to solve an eigenvalue problem A x = lambda*x. A is large, symmetric, complex and sparse. To compute several eigenpairs (lambda, x) inside the spectrum i use the folded spectrum method: folding the original matrix around the desired value AA = ( A -value)^2, solve the resulting eigenproblem for AA and backtransform the eigenvalues.
This worked fine until i added some small modifications to the off-diagonal entries of the original matrix A. These modifications resulted in very poor convergence.
To solve this problem i call lobpcg via mpirun in the ij-interface of hypre, where i can use the BoomerAMG preconditioner. With this the convergence is okay again, but:
Compared to the lobpcg.m-version, the memory requirements using hypre are several times higher (lets say by a factor of 4 or 5 approximately). In both cases i use the same number of processors. Of course, with mpirun several small parts of the matrix to diagonalize are additionally stored locally, but this is not the origin of the high memory requirements.
Maybe somebody can help me with this.
Thanks
0 个评论
采纳的回答
Andrew Knyazev
2011-6-15
The lobpcg code in hypre is very similar to the MATLAB code, and uses about the same memory. The BoomerAMG preconditioner requires extra memory. You can check this by tracing the memory use while running the code and looking at the screen output. BoomerAMG preconditioner is constructed first. The lobpcg starts when you see the actual screen output from the iterations.
You can alternatively check this by running the lobpcg in hypre without the BoomerAMG preconditioner - these runs should be very similar to MATLAB runs in all respects.
You may be able to reduce the memory use in BoomerAMG preconditioner without slowing it down too much, by using some non-default options. The BoomerAMG preconditioner is a part of hypre, which is not related to , although can be used by, lobpcg. Please contact hypre technical support if you have any questions concerning the BoomerAMG preconditioner.
One thing surprises me in your post: "A is complex" - to my recollection, hypre currently does not support complex arithmetic.
0 个评论
更多回答(6 个)
Andrew Knyazev
2011-7-24
Please try adding the following options to the ij driver: "-hmis -agg_nl 1 -interptype 6 -Pmx 4" These are proposed by a member of the hypre team. They make the preconditioner a bit worse, but, at the same time, not so memory-hungry.
I am still uneasy about your use of a complex matrix in the ij driver. You may want to send a email to hypre support to ask about it. If you do, please let me know their answer.
Since you actually use BLOPEX in hypre, rather then MATLAB, you may want to post your further comments at our BLOPEX site at http://code.google.com/p/blopex/issues/list
0 个评论
Andrew Knyazev
2011-7-31
The development version of SLEPc incorporates BLOPEX now, see http://code.google.com/p/blopex/wiki/PETScInstallDevel so that you can easily give it a try (without preconditioning). If you do, please let me know how it runs. We have not yet tested it for complex matrices.
0 个评论
Andrew Knyazev
2011-8-1
Have you actually tried the development version of SLEPc? The one that one gets by
If so, could you please be very specific and report the complete setup and the error message?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio Processing Algorithm Design 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!