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

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

*To*: "eigen@xxxxxxxxxxxxxxxxxxx" <eigen@xxxxxxxxxxxxxxxxxxx>*Subject*: Re: [eigen] Re: SparseQR crashes on rectangular matrix*From*: Pavel Holoborodko <pavel@xxxxxxxxxxxxxxx>*Date*: Fri, 13 Sep 2013 19:21:11 +0900

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

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.

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

**References**:**[eigen] SparseQR crashes on rectangular matrix***From:*Pavel Holoborodko

**[eigen] Re: SparseQR crashes on rectangular matrix***From:*Pavel Holoborodko

**Re: [eigen] Re: SparseQR crashes on rectangular matrix***From:*Gael Guennebaud

**Re: [eigen] Re: SparseQR crashes on rectangular matrix***From:*Pavel Holoborodko

**Re: [eigen] Re: SparseQR crashes on rectangular matrix***From:*Pavel Holoborodko

**Re: [eigen] Re: SparseQR crashes on rectangular matrix***From:*Gael Guennebaud

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] arm64 support** - Next by Date:
**[eigen] Initial implementation of tensor support** - Previous by thread:
**Re: [eigen] Re: SparseQR crashes on rectangular matrix** - Next by thread:
**Re: [eigen] Patch to AlignedBox**

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