Dear all,
as you can see here
https://savannah.gnu.org/bugs/?func=detailitem&item_id=53390
Octave is not currently able to perform a sparse LU factorization without
column pivoting (that is L*U=A or L*U=P*A) in a reliable way. The problem is
that the implementation is based on UMFPACK and it is not possible to disable
column pivoting in UMFPACK. This was privately confirmed me by the author of
SuiteSparse. He also agreed to add a note in the next version of SuiteSparse,
since it was not completely clear from the current documentation (and it was the
origin of the wrong implementaion in Octave).
This is not a huge problem, in my opinion, since when the matrix A is sparse,
one should *always* allow for column pivoting (that is L*U=P*A*Q), since this
preserves the sparsity of L and U. And this works in Octave (based on UMFPACK).
Anyway, I think it is not difficult to fix this problem. In fact, the
incomplete LU factorization of 'ilutp' type (and options droptol=0, milu =
"off", udiag = false) is almost what we need for the job. I slightly modified
it (function ilu_tp in __ilu__.cc) and I got a working LU factorization without
column pivoting.
Such a procedure should now be called in libinterp/corefcn/lu.cc around line
205 (when nargout < 4). How to do that is beyond my capabilities and I need
help or advise.