Calculating eigenvalues of an all-zero matrix and querying the info() method yields NoConvergence. Progam to reproduce the bug (on Debian testing): --- #include <eigen3/Eigen/Dense> #include <iostream> using namespace std; using Eigen::MatrixXd; using Eigen::EigenSolver; int main() { size_t size = 5; MatrixXd allzeros(size,size); allzeros = MatrixXd::Zero(size,size); EigenSolver<MatrixXd> eigensolver(allzeros); if( eigensolver.info() != Eigen::Success ) cerr << "Eigenvalue calculation not successful (error code " << eigensolver.info() << ")" << endl; cout << eigensolver.eigenvalues() << endl; } --- Output: --- Eigenvalue calculation not successful (error code 2) (0,0) (0,0) (0,0) (0,0) (0,0) ---
Thanks for the report. https://bitbucket.org/eigen/eigen/changeset/0c1b3329762c/ changeset: 0c1b3329762c user: ggael date: 2012-06-20 10:08:32 summary: fix bug 478: RealSchur failed on a zero matrix. https://bitbucket.org/eigen/eigen/changeset/e31c45aff2a5/ changeset: e31c45aff2a5 branch: 3.0 user: ggael date: 2012-06-20 10:08:32 summary: fix bug 478: RealSchur failed on a zero matrix. (transplanted from 0c1b3329762c1c7c709282004bae9a2ddda12c07)
This bug seems to have reappeared in Eigen 3.3 (at least 3.3.1 and 3.3.2). 3.2.10 does not seem to reproduce this bug. Using the exact same test code as the original bug, I now get Output (Windows 10, Visual Studio 12): --- Eigenvalue calculation not successful (error code 2) (-4.8367e-026,-4.8367e-026) (-4.8367e-026,-4.8367e-026) (-4.8367e-026,-4.8367e-026) (-4.8367e-026,-4.8367e-026) (-4.8367e-026,-4.8367e-026) --- Output (RHEL 6.6, GCC 5.2.1) --- Eigenvalue calculation not successful (error code 2) (0,0) (0,0) (0,0) (0,0) (0,0) ---
Fixed with unit tests this time! https://bitbucket.org/eigen/eigen/commits/db4fef573c20/
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/478.