Re: [eigen] Re: SparseQR crashes on rectangular matrix

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Thank you! Now rows < cols case is working fine.

I.
Regarding AmbiVector, replacing allocations by operator new with malloc, plus a few inplace construct and destruct should do the job.

I thought this too. However the biggest problem I found - is in idea of AmbiVector itself. 

It seems that Scalar* m_buffer is used to store structs of ListEl type in sparse case. 

There are many places with:

ListEl* EIGEN_RESTRICT llElements = reinterpret_cast<ListEl*>(m_buffer);
...

llElements[0].value = Scalar(0);
llElements[0].index = i;
llElements[0].next = -1;

This would work for POD types I guess, but not for objects.

Would appreciate clarification. 

II. 
> I guess you compiled with -DNDEBUG 

Actually, I am using debug mode, asserts are popping up for other cases, but not for the out-of-bounds accesses in SparseQR.
Still out of bounds accesses are detected even for rows >= cols and with recent changes you made. 

Maybe ICC is going crazy or something, but it doesn't show such problems for SparseLU & LDLT. 
***

Thank you for your quick & excellent help,
Pavel.

On Fri, Sep 13, 2013 at 5:37 AM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:

I guess you compiled with -DNDEBUG because all these out of bounds accesses are caught by asserts here. They are fixed in the devel and 3.2 branch, and SparseQR works for me with rows<cols.

Regarding AmbiVector, replacing allocations by operator new with malloc, plus a few inplace construct and destruct should do the job.

cheers,
gael




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/