Crash on AMD ordering (called by SimplicialLDLT::analyzePattern)
Submitted by Roberto Toldo
Assigned to Nobody
Link to original bugzilla bug (#1696)
Version: 3.3 (current stable)
Operating system: Windows
Description
Crash on the sparse simplicial LDLT factorization. The crash is probably rare and related to a particular matrix configuration (the ldlt decomposition has been used a lot of times, and never caused problems). Building with the x64 VS2017 compiler. Since the data matrix is large, I've zipped and uploaded it here:
https://shared.3dflow.net/index.php/s/BZ91PVhuKxXaIHu
Here's the snippet to read the matrix and reproduce the problem:
std::ifstream file( "jtj.mat", std::ios::binary );
Eigen::SparseMatrix< double > matrix;
{
// deserialization
int rows, cols, nnz, inSz, outSz;
file.read( ( char * ) &rows, sizeof( int ) );
file.read( ( char * ) &cols, sizeof( int ) );
file.read( ( char * ) &nnz, sizeof( int ) );
file.read( ( char * ) &inSz, sizeof( int ) );
file.read( ( char * ) &outSz, sizeof( int ) );
unsigned char compressedFlag;
file.read( ( char * ) &( compressedFlag ), sizeof( unsigned char ) );
matrix.resize( rows, cols );
if ( compressedFlag > 0 )
matrix.makeCompressed();
matrix.resizeNonZeros( nnz );
file.read( ( char * ) ( matrix.valuePtr() ), sizeof( double ) * nnz );
file.read( ( char * ) ( matrix.outerIndexPtr() ), sizeof( int ) * outSz );
file.read( ( char * ) ( matrix.innerIndexPtr() ), sizeof( int ) * nnz );
matrix.finalize();
}
Eigen::SimplicialLDLT< Eigen::SparseMatrix< double > > ssldlt;
ssldlt.analyzePattern( matrix ); // Crash here
Please let me know if you need more information. Thanks!