6

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

Ken Bloom
  • 57,498
  • 14
  • 111
  • 168
Open the way
  • 26,225
  • 51
  • 142
  • 196

2 Answers2

4

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.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • do you think ARPACK can be applied to the case of dense matrices? IF so, could you point to some example? thanks – Open the way Mar 20 '12 at 17:40
  • It makes no assumptions on the type of matrices. Read about the reverse passing interface and you will understand why this is so. – David Heffernan Mar 20 '12 at 18:04
  • you deserve to win the bounty, not only because your inspiring answer but also given your excellent picture, thanks – Open the way Mar 24 '12 at 18:40
  • Ha ha. You really gave a big laugh there! ;-) Did you give arpack a go yet? Any luck with it. I found it pretty tricky to get on top of but once I got it working its performance blew me away. – David Heffernan Mar 24 '12 at 18:55
2

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.

mmisu
  • 393
  • 2
  • 8
  • I had a look but I did not see any information related with implementations of the generalized eigenvalue problem. Only information about the simple eigenvalue problem is reported there, am I right? – Open the way Mar 22 '12 at 11:04
  • 2
    @flow You are right. I've used CULA only for solving a symmetric eigenvalue problem not for the generalized problem. Sorry the misunderstanding. – mmisu Mar 22 '12 at 15:18