I would like to solve a generalized eigenproblem of real sparse symmetric matrices. Is there an efficient library which utilizes OpenCL in order to find a limited amount of the smallest eigenvalues in magnitude?


1 Answer 1


One possibility is to use a combination of ARPACK and ViennaCL:

  • ARPACK is an eigensolver. It works with a callback interface (you supply a function that computes $Ax$ for a given $x$ and it computes the eigenvalues by invoking this function multiple times). If you want to solve a generalized eigenvalue problem ($ Ax = \lambda Bx$) you need to provide a callback for computing $x \rightarrow Bx$ as well.
  • These callback functions can be implemented in the GPU (and it will work with ARPACK), now the way to implement it will depend on the structure of your matrices $A$ and $B$. You will use a different implementation if your matrix is full, diagonal or sparse. ViennaCL proposes several functions for different matrix structures.



Besides ARPACK, the same method can be applied any eigensolver that has a reverse communication API (i.e. with a callback that computes matrix-vector products), for instance SLEPc (see comments by Daniel Shapero below).

  • $\begingroup$ You can also install PETSc so that it uses ViennaCL under the hood, and then use SLEPc as an eigensolver instead of ARPACK. For some unusual problems I've had better luck with SLEPc than ARPACK. $\endgroup$ Commented Jul 25, 2015 at 16:50
  • $\begingroup$ Yes you are right, I'm editing the post. $\endgroup$
    – BrunoLevy
    Commented Jul 27, 2015 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.