Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Poor performance for calculating eigenvalues and eigenvectors on GPU

In some code we need to get auto vectors and auto values for the generalized eigenvalue problem with symmetric real matrices (Ax=lamba Bx). This code uses DSPGVX from LACPACK. We wanted to speed it up on GPU using a MAGMA function. We asked on this forum and got the answer about this

http://icl.cs.utk.edu/magma/docs/zhegvx_8cpp.html

The size of our matrices (N) goes from 100 to 50000 and even more, related to the number of atoms in a molecule. We observe:

a) for N bigger than 2500 (approx), MAGMA just does not work; segmentation fault b) MAGMA runs always slower than LAPACK sequential, around 10 times slower

Is this behavior normal and could we overcome it? Can anybody report any reference where anybody working on this similar problems gets a decent speedup?

Thanks

like image 819
Open the way Avatar asked Mar 16 '12 18:03

Open the way


2 Answers

In my experience you may be able to gain greater performance benefits by switching to a better eigensolver. The best solver that I know of is ARPACK. You will gain most benefit it your matrices have some structure, for example if they are sparse. This solver is also most efficient if you only need to extract a small fraction of the total number of eigenpairs.

I would start off by trying this solver on your problems running just on the CPU. You may find that this alone gives sufficient performance for your needs. If not then it is relatively easy to move the calculation core for ARPACK to the GPU. Or, there are parallel versions of ARPACK available.

like image 99
David Heffernan Avatar answered Nov 10 '22 13:11

David Heffernan


Have you tried CULA http://www.culatools.com/ ? CULA is Lapack converted for CUDA by NVIDIA, so at least in theory it should have one of the best implementation for the generalized eigenvalue problem. I think the single precision version is free so you could give it a try.

like image 32
mmisu Avatar answered Nov 10 '22 11:11

mmisu