View Full Version : Routine selection for eigenvectors

09-15-2008, 12:59 PM
In my application, I have a frequent need to find eigenvalues of real matrices. The matrices (companion matrices for finding the roots of Chebyshev polynomial expansions) are essentially tridiagonal but with a complete bottom row, and range in size from 8x8 to ~200x200, so that the bigger matrices probably qualify as 'sparse'. I'm only interested in the real eigenvalues, not the complex eigenvalues or any of the eigenvectors. Performance is however crucial, as in 'production use' it will be necessary to solve hundreds or maybe thousands of these matrices in each run of the application.

The IMSL library seems to contain at least three routines that look, on the fact of it, applicable: LIN_EIG_GEN, EVLRG and EIG. How do I choose between them? I'm running V6.0 of the IMSL library with Intel Visual Fortran 10.1, but I don't have VTune and would rather not have to evaluate each one in detail, so is there guidance available on this topic? Thank you.

09-16-2008, 06:17 AM
I will chime in here, though I'm not the expert on these functions. Unfortunately our Houston office is still recovering from hurricane Ike, and this is where most of our experts are.

From the functions and requirements you list, I think EVLRG (http://www.vni.com/products/imsl/documentation/fort06/math/NetHelp/default.htm?turl=evlrg.htm) is probably going to show the best performance if you are building against the version of IMSL Fortran that uses the high performance vendor BLAS. EVLRG will use the appropriate routine from those vendor libraries behind the scenes and should be the fastest.

EIG (http://www.vni.com/products/imsl/documentation/fort06/math/NetHelp/default.htm?turl=eig.htm) is best function if MPI is an option to distribute the calculations.

LIN_EIG_GEN (http://www.vni.com/products/imsl/documentation/fort06/math/NetHelp/default.htm?turl=lineiggen.htm) with the F90 interface is the most flexible of the group, but if you just need the eigenvectors of a real matrix, EVLRG is likely going to be faster.

09-16-2008, 10:48 AM
Thank you, this is very helpful. I'll stick with EVLRG for the time being and consider using EIG if I need to move towards more processors and use MPI instead of OpenMP for the parallelization.