Diagonal Preconditioner's factorize() routine causes seg fault for (square) SparseMatrix of size 128 and greater
Submitted by Patrick
Assigned to Nobody
Link to original bugzilla bug (#485)
Version: 3.1
Operating system: Linux
Description
I've been getting segfaults while attempting to use the ConjugateGradient solver for a sparse system. gdb traces the fault back to the it.value() call near line 83 of in the factorize() method in BasicPreconditioners.h , when attempting to compute a new ConjugateGradient solver. Strangely this seems to happen exactly when the problem size is 128 or greater.
----This works:
int n = 127;
SparseMatrix<double> A(n,n);
// ...
Eigen::ConjugateGradient< SparseMatrix<double> > cg(A);
----This works:
int n = 128;
SparseMatrix<double> A(n,n);
// ...
Eigen::ConjugateGradient< SparseMatrix<double>, Eigen::Lower, Eigen::IdentityPreconditioner > cg(A);
-----This induces a seg fault:
int n = 128;
SparseMatrix<double> A(n,n);
// ...
Eigen::ConjugateGradient< SparseMatrix<double> > cg(A);