-
Notifications
You must be signed in to change notification settings - Fork 102
Description
We currently employ the lobpcg
solver from this Julia package in our DFTK.jl electronic structure theory code. In our observations, the current Cholesky-QR-based LOBPCG implementation can become numerically unstable and sometimes even produce spurious eigenvalues.
As an illustrative example, run the following julia code
A = [1.25, 1.5, 1.5, 1.25, 1.5, 1.25, 1.5, 0, 1.13, 1.13, 1.5, 1.13, 1.5, 1.5, 1.13]
res = lobpcg(Diagonal(A), false, 5)
In my experiments with this simple test problem, it fails about each 2nd time with a PosDefException
from the Cholesky factorization. In the remaining cases, it returns two approximations to the zero eigenvalue at res.λ[1]
and res.λ[2]
. In all such instances I further observed the first two eigenvectors to be non-orthogonal. That is to say, that
dot(res.X[:, 1], res.X[:, 2])
returns a numerically non-zero answer, order of magnitude 0.0001
.
A couple of strategies to improve the numerical stability of LOBPCG have been discussed in the literature, e.g. in https://arxiv.org/abs/1704.07458. As far as I can judge from reading through the code, the suggested basis truncation and selection strategies are not yet present and it might be advantageous to take a look at implementing them.