This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 798

Summary: SparseQR<SparseMatrix<double> >::factorize() hits assertion failure on uncompressed input matrix
Product: Eigen Reporter: renshaw
Component: SparseAssignee: Nobody <eigen.nobody>
Status: NEW ---    
Severity: Unknown    
Priority: Normal    
Version: 3.2   
Hardware: x86 - 64-bit   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
source code to reproduce the problem none

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)
Comment 1 Nobody 2019-12-04 13:15:07 UTC
-- 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/798.