eigs with Extended Capabilities

조회 수: 15 (최근 30일)
Marko
Marko 2021년 12월 9일
댓글: Andrew Knyazev 2021년 12월 22일
Hello Community,
Extended Capabilities
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool.
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
Distributed Arrays
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
could either one of this options increase the number of used cores for one eigs calculation?
i have to solve an generalised eigenvalue probem and the size of the eigenvector q is numel(q)=16384
When i use eigs it uses only one core.
Is it possible to increase the number of used cores, with the extended capabilties?
Best Regards,
MJ

답변 (1개)

Christine Tobler
Christine Tobler 2021년 12월 9일
The first of these would only be useful if you need to apply EIGS to many problems in parallel, in which case each of these could be solved in a thread.
The second will usually make sense if you have a parallel cluster over which the matrix could be distributed, which I'd expect only makes sense for a larger matrix than 16384-by-16384.
EIGS isn't always running single-threaded, it depends quite a lot on the problem being passed in. How much time is EIGS taking to solve your problem? Could you run your EIGS command with the "Display" option set to true, and post the results here?
  댓글 수: 2
Marko
Marko 2021년 12월 9일
Hello Christine,
here are the results with the "Display" option
=== Generalized eigenvalue problem A*x = lambda*B*x ===
The eigenvalue problem is real non-symmetric.
Matrix B is symmetric positive (semi-)definite.
Computing 50 eigenvalues closest to 1.
Parameters passed to Krylov-Schur method:
Maximum number of iterations: 500
Tolerance: 1e-14
Subspace Dimension: 150
Find eigenvalues of R*(A - sigma*B)\(R'*y) = mu*y, with y = R*x, B = R'*R.
No need to compute R, as it is only used implicitly.
Compute decomposition of (A - sigma*B)...
--- Start of Krylov-Schur method ---
Iteration 1: 49 of 50 eigenvalues converged. Smallest non-converged residual 1.9e-11 (tolerance 1.0e-14).
Iteration 2: 50 of 50 eigenvalues converged.
solving time: 80.5s, k: 0.000, sigma: -0.222, omega: 0.000
=== Generalized eigenvalue problem A*x = lambda*B*x ===
The eigenvalue problem is complex non-Hermitian.
Matrix B is Hermitian positive (semi-)definite.
Computing 50 eigenvalues closest to 1.
Parameters passed to Krylov-Schur method:
Maximum number of iterations: 500
Tolerance: 1e-14
Subspace Dimension: 150
Find eigenvalues of R*(A - sigma*B)\(R'*y) = mu*y, with y = R*x, B = R'*R.
No need to compute R, as it is only used implicitly.
Compute decomposition of (A - sigma*B)...
--- Start of Krylov-Schur method ---
Iteration 1: 44 of 50 eigenvalues converged. Smallest non-converged residual 1.4e-14 (tolerance 1.0e-14).
Iteration 2: 50 of 50 eigenvalues converged.
solving time: 157.0s, k: 0.125, sigma: -0.077, omega: 1.919
First I have many eigs-calls (in the order of multiple 1000 times), this is used for scanning some parameter space. Before i read about the extended capabilites, i solved that with parfor. (Because they could run independend of each other)
But my next task require to solve eigs as fast as possible. (The calls of eigs are not independend, the results of the future eigs, depend on the previous result)
So when i understand you correctly, the distributed arrays should help me solving the eigs problem in less time than in the usual way. Is this correct?
(in the future the size of the matrix would have at least 32768-by-32768)
Andrew Knyazev
Andrew Knyazev 2021년 12월 22일
Open source https://slepc.upv.es/ is for large-scale parallel MPI/OpenMP eigenvalue computations and has a MATLAB interface.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by