[eigen] SparseLU - crash on singular matrix

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


Hope everybody had a nice weekend.

When I test SparseLU on simple singular matrix (one column is zero) - it crashes on line #92 in SparseLU_pivotL.h.

 // Test for singularity
90  if ( pivmax == 0.0 ) {
91    pivrow = lsub_ptr[pivptr];
92    perm_r(pivrow) = jcol;
93    return (jcol+1);
94  }

At the time of crash we have pivptr = nsupc = nsupr = 0
lsub_ptr[pivptr] gives some crazy number (lsub_ptr points to incorrect location as nsupr = 0?).

I propose to remove 91 and 92 lines. We don't use these values anyway as we return control to user immediately.

The only strange thing is nsupr = 0 (no rows in supenode). May this happen at all?

Thank you.
Pavel. 




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