Locally Optimal Block Preconditioned Conjugate Gradient

LOBPCG solves Hermitian partial generalized eigenvalue problems using preconditioning, as well as PCA


Updated 3 Dec 2021

From GitHub

View License on GitHub

Source : https://github.com/lobpcg/blopex/ in blopex_tools/matlab/lobpcg/lobpcg.m

This main function LOBPCG is a version of the preconditioned conjugate gradient method (Algorithm 5.1) described in A. V. Knyazev, Toward the Optimal Preconditioned Eigensolver: Locally Optimal Block Preconditioned Conjugate Gradient Method, SIAM Journal on Scientific Computing 23 (2001), no. 2, pp. 517-541. http://dx.doi.org/10.1137/S1064827500366124
A C-version of this code is a part of the https://github.com/lobpcg/blopex
package and is available, e.g., in SLEPc and HYPRE. A scipy version is https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.lobpcg.html
Tested in MATLAB 6.5-7.13-R2019a and available Octave 3.2.3-3.4.2.

Cite As

Andrew Knyazev (2023). Locally Optimal Block Preconditioned Conjugate Gradient (https://github.com/lobpcg/blopex), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2019a
Compatible with R2007b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes

Revision 4.18 removes the check for the size of operatorA apparently not working for function handles


Revision 4.17 adds support for single precision


Revision 4.16 adds support for distributed or codistributed arrays available in MATLAB BigData toolbox, e.g.,:

A = codistributed(diag(1:100)); B = codistributed(diag(101:200));


updated description on MathWorks, fixed Project Website link


Linearly depended directions 1-time restart, not failure:

1) Orthogonalization of directions P moved to a different spot.
2) Linearly depended directions P now result in a 1-time restart, where the whole P is dropped once, not failure as before


Connected to GitHub


added a conversion to a toolbox
A minor update. Functions can now be called using also function handles. Updated comments and examples.
added a toolbox format

Editorial changes to make the code Octave-compatible.

License update to free software (BSD). Comments update.

minor update to remove mlint messages

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.