Eigs in multinode cluster

조회 수: 11 (최근 30일)
Wister Huang
Wister Huang 2016년 5월 18일
편집: Andrew Knyazev 2019년 6월 12일
I am new to high performance computing and I am now trying to reconfigure one of my matlab code to a HPC.(I know it is probably not preferred, but I kind of need it in urgent.)
The task is to solve the lowest 6 eigen values for a 42500*42500 complex sparse Hermician matrix.
I have access to minimum 4 nodes and each node have more than 16GB memory.
I tried to submit this job but get an error
Out of memory. Type HELP MEMORY for your options.
Error in eigs/checkInputs/LUfactorAminusSigmaB (line 987)
[L,U,pp] = lu(AsB,'vector');
Error in eigs/checkInputs (line 809)
[L,U,pp,qq,dgAsB] = LUfactorAminusSigmaB;
Error in eigs (line 96)
checkInputs(varargin{:});
Error in TwoDsolve (line 65)
[psi,E]=eigs(H,NOS,'sm');
Error in Loop_Main (line 9)
[psi,En] = TwoDsolve( V,m2Dx,m2Dy,Grd,'eigs',NOS);
Apparently it only use My question is: is there a way to configure eigs so that it can use all the memory I required from different nodes? I attach my submission file here as well.
#SBATCH --mail-user=wister.huang@student.unsw.edu.au
#SBATCH --mail-type=ALL
#SBATCH --time=00:60:00
#SBATCH --nodes=4
#SBATCH --mem=16384
#SBATCH --ntasks=4
#SBATCH --cpus-per-task=4
echo "myjob.sub"
hostname
module load matlab/2016a
cd $PBS_O_WORKDIR
unset DISPLAY
matlab -nodisplay -r Control
Thanks, Wister

채택된 답변

Andrew Knyazev
Andrew Knyazev 2018년 8월 11일
편집: Andrew Knyazev 2019년 6월 12일
EIGS has limited support for distributed memory, so you can run it only on a single node, but see the answer from Christine Tobler below.
Google, e.g., for LOBPCG implementations in BLOPEX, SLEPc, Trilinos, hypre, MAGMA for parallel MPI-based eigensolvers that scale to thousands of nodes and run on GPUs.
https://www.mathworks.com/matlabcentral/fileexchange/48-locally-optimal-block-preconditioned-conjugate-gradient
Revision 4.16 adds support for distributed or codistributed arrays available in MATLAB BigData toolbox, e.g.,:
A = codistributed(diag(1:100)); B = codistributed(diag(101:200));
[blockVectorX,lambda]=lobpcg(randn(100,2),A,1e-5,5,2)

추가 답변 (1개)

Christine Tobler
Christine Tobler 2018년 8월 13일
The eigs function is supported for codistributed matrices in the Parallel Toolbox (see help codistributed/eigs. However, this version of eigs does not support the 'sm' / 'smallestabs' option (except for the case of a diagonal or triangular input matrix).
You could try to use the 'smallestreal' option instead, but this often has convergence issues, as it does not compute a decomposition of A, and also doesn't use a preconditioner, as LOBPCG typically does. However, this should be quick enough to try out, as it is just a one-liner.
  댓글 수: 1
Christine Tobler
Christine Tobler 2018년 8월 13일
Sorry, I realize I started out with the details when I should have started more generally: To distribute a MATLAB array over several compute nodes, use the Parallel Toolbox, and its distributed or codistributed classes (<https://www.mathworks.com/products/parallel-computing.html Parallel Toolbox Documentation>).

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

카테고리

Help CenterFile Exchange에서 Distributed Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by