# SLEPc eigensolvers take long time to converge for large sparse symmetric matrices

I am leveraging the SLEPc library for solving the first $k$ (where $k = 3$ or $4$) eigenvalues and their corresponding vectors for a matrix of size 200,000. The matrix is sparse and symmetric. I intend to compute the eigenvalues without using MPI, as a result of which the entire computation takes more than 2 minutes. I have tried many eigensolvers like Krylov-Schur, Jacobi-Davidson, and Rayleigh Quotient CG but it takes an awful amount of time to finish computation for each of them.

The Lanczos/Krylov-Schur returns the extreme eigenvalues of the spectrum quite fast, on the contrary. It would be awesome if I could replicate such behavior for the interior values of the spectrum. But so far I have not met with any success.

Is there any way to accelerate the convergence using a single MPI process? Tweaking the tolerance and maximum iterations does not help.

So far these are what I have tried for a sparse symmetric matrix of size 51309 x 51309:

./RunPart -eps_type gd -st_type precond -st_pc_type ilu -eps_target 0.01 -eps_tol 1e-6 -eps_conv_abs -eps_nev 5


This takes 42.76 seconds to produce the 4 eigenvalues.

./RunPart -st_type sinvert -eps_target 0.001 -st_pc_type ilu -eps_tol 1e-5 -eps_conv_abs -eps_nev 4


This takes around 13.49 seconds but the eigenvalues contain a significant amount of error.

       k       ||Ax-kx||/||kx||
-------------- ----------------
0.087226       0.0797854
0.088502       0.0947138
0.089405       0.0702111
0.091540       0.0483211


Can some please provide some guidance with this issue?

• You say, "I intend to compute the eigenvalues without using MPI" and then you say "using a single MPI process". Do you mean that you want to do the computation on a single cpu/core? If so, why do mention MPI at all? Mar 9, 2017 at 0:13
• What are "the first eigenvalues"? In which order? Apr 8, 2017 at 13:42

I have tried many eigensolvers like Krylov-Schur, Jacobi-Davidson, and Rayleigh Quotient CG but it takes an awful amount of time to finish computation for each of them.

Consider using Arnoldi iteration. It should be included with your SLEPc distribution, and is typically used when only the largest eigenvalues of a sparse matrix are required (or the smallest, if you have an inverse operator available). Also realize that your matrix is somewhat large by most metrics.

The Lanczos/Krylov-Schur returns the extreme eigenvalues of the spectrum quite fast, on the contrary. It would be awesome if I could replicate such behavior for the interior values of the spectrum. But so far I have not met with any success.

I think this problem might be spurious. If your matrix is symmetric, then computing the second largest eigenvalue (after computing the first) is not, in general, more expensive than computing the first largest. This is because you can simply remove any eigenmode from a symmetric matrix once you have computed it.

It is possible that some of your interior eigenvalues are poorly conditioned/highly sensitive. Some discussion on this is detailed here and might prove helpful.