julia> using KrylovKit, LinearAlgebra
# A is a 71 x 71 matrix, see below for value
julia> eigvals(A)[1:4]
4-element Vector{Float64}:
-1.2525363565095453e-11
-7.872263865818092e-13
8.139934675911611e-14
1.0000000000170322
julia> λs, vs, info = eigsolve(A, Block([randn(71) for _ in 1:20]), 4, :SR, BlockLanczos(tol=1e-8, verbosity=2));
┌ Info: BlockLanczos eigsolve finished after 80 iterations:
│ * 80 eigenvalues converged
│ * norm of residuals = (3.96e-12, 1.58e-12, 1.24e-12, 4.86e-13, 3.17e-13, 1.83e-13, 5.63e-13, 8.00e-12, 7.77e-12, 9.85e-12, 2.45e-12, 2.49e-12, 3.97e-12, 5.70e-12, 5.36e-12, 5.60e-12, 3.16e-12, 4.32e-12, 7.41e-12, 3.63e-12, 1.48e-12, 2.32e-12, 4.59e-12, 3.44e-12, 4.38e-12, 2.63e-12, 2.89e-12, 6.66e-12, 2.45e-12, 3.87e-12, 3.55e-12, 2.42e-12, 2.39e-12, 2.63e-12, 2.66e-12, 2.62e-12, 1.71e-12, 4.28e-12, 4.64e-12, 3.27e-12, 5.20e-12, 3.79e-12, 2.81e-12, 4.38e-12, 2.51e-12, 2.76e-12, 4.18e-12, 4.25e-12, 4.77e-12, 2.90e-12, 3.80e-12, 2.22e-12, 5.63e-12, 3.60e-12, 1.96e-12, 1.68e-12, 5.10e-12, 2.22e-12, 2.31e-12, 2.15e-12, 2.86e-12, 2.94e-12, 2.00e-12, 7.47e-12, 5.11e-12, 9.90e-12, 3.89e-12, 3.25e-12, 4.63e-12, 2.25e-12, 8.82e-12, 5.86e-12, 1.13e-12, 7.15e-12, 4.35e-12, 2.31e-12, 1.60e-11, 3.56e-12, 1.31e-11, 1.50e-11)
└ * number of operations = 81
julia> length(λs)
80
julia> λs[1:4]
4-element Vector{Float64}:
-720.1354392325375
-104.66932170384825
-58.923692045135766
-7.972387256816418
The numerical values of the eigenvalues improve for smaller block sizes. Also, if I rerun the eigsolve a couple of times and each time take as the initial block a few of the found eigenvectors, the result converges after a couple of iterations. This makes me think I am maybe doing something wrong with the initialization of the block?
Hi!
I just ran into a weird issue, where using
BlockLanczoswith large block sizes returns more eigenvalues than a matrix has. Moreover, all of the returned eigenvalues are not converged. I was only able to reproduce this on a few specific matrices; I shared one of these below.The numerical values of the eigenvalues improve for smaller block sizes. Also, if I rerun the
eigsolvea couple of times and each time take as the initial block a few of the found eigenvectors, the result converges after a couple of iterations. This makes me think I am maybe doing something wrong with the initialization of the block?The matrix `A`