New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 798 - SparseQR<SparseMatrix<double> >::factorize() hits assertion failure on uncompressed input matrix
Summary: SparseQR<SparseMatrix<double> >::factorize() hits assertion failure on uncomp...
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.2
Hardware: x86 - 64-bit Linux
: Normal Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-18 16:14 UTC by renshaw
Modified: 2014-04-18 16:14 UTC (History)
0 users



Attachments
source code to reproduce the problem (342 bytes, text/x-c++src)
2014-04-18 16:14 UTC, renshaw
no flags Details

Description renshaw 2014-04-18 16:14:19 UTC
Created attachment 454 [details]
source code to reproduce the problem

When I compile and run the attached program, which constructs a 2x2 sparse matrix of doubles and attempts to perform a QR factorization, I get the following output:

Nonzero entries:
(_,_) (_,_) (0.5,1) (_,_) 

Outer pointers:
0 2  $
Inner non zeros:
0 1  $

0 0 
0 0.5 

a.out: eigen/Eigen/src/Core/DenseCoeffsBase.h:412: Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator()(Eigen::DenseCoeffsBase<Derived, 1>::Index) [with Derived = Eigen::Matrix<int, -0x00000000000000001, 1>, Eigen::DenseCoeffsBase<Derived, 1>::Scalar = int, Eigen::DenseCoeffsBase<Derived, 1>::Index = long int]: Assertion `index >= 0 && index < size()' failed.
Aborted (core dumped)



If I run the program under valgrind, I get some reports about uninitialized memory:

==20561== Conditional jump or move depends on uninitialised value(s)
==20561==    at 0x515C8A8: sqrt (w_sqrt.c:28)
==20561==    by 0x404D84: Eigen::SparseMatrixBase<Eigen::Block<Eigen::SparseMatrix<double, 0, int>, -1, 1, true> >::norm() const (SparseDot.h:90)
==20561==    by 0x402B18: Eigen::SparseQR<Eigen::SparseMatrix<double, 0, int>, Eigen::NaturalOrdering<int> >::factorize(Eigen::SparseMatrix<double, 0, int> const&) (SparseQR.h:332)
==20561==    by 0x401FC3: Eigen::SparseQR<Eigen::SparseMatrix<double, 0, int>, Eigen::NaturalOrdering<int> >::compute(Eigen::SparseMatrix<double, 0, int> const&) (SparseQR.h:87)
==20561==    by 0x400FCB: main (bug135.cpp:19)

Note You need to log in before you can comment on or make changes to this bug.