by Julien Langou » Fri Jan 31, 2014 9:38 am
ZHEEV and ZHEEVD will compute all eigenvalues. With ZHEEVR and ZHEEVX, you can compute a subset of eigenvalues (so for example the 10 smallest say).
ZHEEVR and ZHEEVX are much faster than ZHEEV and ZHEEVD if (1) you want a few of the eigenvalues and (2) you want the eigenvectors as well. "A few" is hard to quantify.
If you only want to compute the eigenvalues (and you do not want the eigenvectors) then all of these four routines will perform about the same. All these routines first reduce the matrix to tridiagonal form and then compute the eigenvalues of the tridiagonal matrix, however computing either all or a few of the eigenvalues of a tridiagonal matrix is kind of negligible time compared to the reduction to tridiagonal form. So if you just want the eigenvalues (and not the eigenvectors) then it does not really matter which subroutines (ZHEEV, ZHEEVX, ZHEEVR, ZHEEVD) you use.
Finally one limitation of LAPACK Hermitian eigensolvers is that they all first reduce the matrix to tridiagonal form. They are some reasons for doing so. However this means that the cost of the eigensolver is O(n^3). If you want a faster eigensolver (O(n^2) per eigenvalue) and just have a few eigenvalues to compute, it might be worse [please read "worth", thanks "bsmile" for correcting me] considering iterative package methods. For example PRIMME, or LOPBCG, or ARPACK, etc. Software package like Trilinos and PETSc also have a complete iterative eigensolver suite.
Julien.
Last edited by
Julien Langou on Fri Jan 31, 2014 6:12 pm, edited 1 time in total.