You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running sparse.linalg.eigs for small eigenvalues of 100 x 100 sparse.rand matrices,
shift-invert mode which='LM', sigma=0 converges in 10 of 10 cases, seed 0 .. 10; which='SM' converges in 0 of 10 with e.g.
ARPACK error -1: No convergence (1001 iterations, 0/6 eigenvectors converged) [ARPACK error -14: DNAUPD did not find any eigenvalues to sufficient accuracy.]
tol=1e-5 doesn't change the picture
nor does OPENBLAS_NUM_THREADS=1 .
It would be easy to always use shift-invert for small eigenvalues --
if which == "SM":
print( "eigs: using shift-invert mode for small eigenvalues, "
"because it's more robust than SM on large non-symmetric problems" )
which = "LM"
sigma = 0
what do you think ?
(Does anyone use 'SM' for small eigenvalues on real problems ?
Cf. Bai, Day, Demmel, Dongarra, "A test matrix collection for non-Hermitian eigenvalue problems", 1996.)
The testbench for this is 99 % the same as in #11198,
shall I put it up again, here or gist.github ?
Yes that's right, but some people who want small eigenvalues may not know that,
and use which='SM' (small) instead of LM (large) -- confusing and wrong.
The above 5 lines are an attempt to help them.
Is the sentence ""eigs: using shift-invert mode ... because ..." clear ?
Right, don't think we need it either: it's confusing and sometimes plain doesn't work.
The suggestion is to turn SR --> LM, sigma=0 (with a message), then both ways work.
For 100 x 100 sparse matrices it's likely faster and surely reliable just to convert them into a dense array and use a dense solver to compute all eigenvalues.
Running sparse.linalg.eigs for small eigenvalues of 100 x 100 sparse.rand matrices,
shift-invert mode
which='LM', sigma=0
converges in 10 of 10 cases, seed 0 .. 10;which='SM'
converges in 0 of 10 with e.g.tol=1e-5
doesn't change the picturenor does OPENBLAS_NUM_THREADS=1 .
It would be easy to always use shift-invert for small eigenvalues --
what do you think ?
(Does anyone use 'SM' for small eigenvalues on real problems ?
Cf. Bai, Day, Demmel, Dongarra, "A test matrix collection for non-Hermitian eigenvalue problems", 1996.)
The testbench for this is 99 % the same as in #11198,
shall I put it up again, here or gist.github ?
Versions: numpy 1.17.4 scipy 1.3.3 python 3.7.3 macos 10.10.5
The text was updated successfully, but these errors were encountered: