Registered Member
|
Hi,
I am trying to permute large sparse matrix, program aborts with std::bad_alloc, it works for smaller dimensions, unable to figure out the problem
Edit: It is failing at SparseMatrix.h --> reserveInnerVectors --> m_data.reserve(totalReserveSize); Trying to reserve 426,182,269,500 bytes! (totalReserveSize = 426182269500)! How can I overcome this? I am basically trying to convert rank deficient matrix to full column rank matrix Thanks |
Moderator
|
|
Registered Member
|
G.nonZeros() = 2352081.
I have debugged further and this line at SparsePermutation.h --> sizes[((Side==OnTheLeft) ^ Transposed) ? jp : j] = m_matrix.innerVector(((Side==OnTheRight) ^ Transposed) ? jp : j).size(); always returns the row size of matrix, so sizes[] object has same number (row size) in all cells. |
Moderator
|
Indeed, it should be nonZeros() instead of size(). Fixed.
Devel: https://bitbucket.org/eigen/eigen/commits/1d72cb9b08c1/ 3.2: https://bitbucket.org/eigen/eigen/commits/1775926d6206/ |
Registered Member
|
Great. I have the same problem. Thank you
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]