[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53390] lu factorization of large sparse matri
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #53390] lu factorization of large sparse matrices often fails |
Date: |
Sat, 7 Apr 2018 16:59:14 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #17, bug #53390 (project octave):
@Marco, @Cristiano: Using 'test bicg' I now get a warning due to this bug
report.
test bicg
warning: lu: function may fail when called with less than 4 output arguments
and a sparse input
PASSES 13 out of 13 tests
The problem seems to be this BIST test
## Preconditioned technique
%!testif HAVE_UMFPACK
%! A = sparse (toeplitz ([2, 1, 0, 0, 0], [2, -1, 0, 0, 0]));
%! b = sum (A, 2);
%! [M1, M2] = lu (A + eye (5));
%! [x, flag] = bicg (A, b, [], 1, M1, M2);
%! ## b has two columns!
%! [y, flag] = bicg (M1 \ A / M2, [M1 \ b, M2' \ b], [], 1);
%! assert (x, M2 \ y, 8 * eps);
Could you take a look at how to resolve this? I have a couple of ideas on how
to fix it. First, if this matrix is simple enough then lu() will succeed. In
that case you could turn off the warning locally. Alternatively, you could
convert the matrix to full, calculate lu, and then use sparse() to turn M1 and
M2 to sparse matrices. As a third possibility, use the 4-output form of lu()
and use P and Q appropriately to transform M1 and M2 before usage.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53390>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53390] lu factorization of large sparse matrices often fails,
Rik <=