octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty s


From: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix.
Date: Wed, 15 May 2019 16:59:33 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36

Follow-up Comment #59, bug #56232 (project octave):

@Marco: Thanks for the patch.

Same observation with "make check" and opinion regarding Matlab compatibility
as Rik in comment #58. 

Regarding comment #57 1): Do you mean, when this branch is used?

https://hg.savannah.gnu.org/hgweb/octave/file/9326c2258e60/liboctave/array/CSparse.cc#l1005

By inserting a std::cout "YEAH sparse!!!", I could verify, that this branch is
taken for the following matrix A:


N = 100;                                     # dimension
A = sprand(N, N, 4/N) + sprand(N, N, 4/N)*i; # complex randomness
A(1:(N+1):end) = 1:N;                        # set diagonal real > 0
A = sparse (triu (A) + triu (A, 1)');        # Hermitian

# Properties of A
matrix_type (A), ishermitian (A), iscomplex (A), issparse (A)
ans = Positive Definite
ans = 1
ans = 1
ans = 1

inv(A);

YEAH sparse!!!


Does this help?  I think you cannot enter this branch by using a singular
matrix, when stepping through MatrixType

https://hg.savannah.gnu.org/hgweb/octave/file/9326c2258e60/liboctave/array/MatrixType.cc#l235

the necessary value "maybe_hermitian = true;" is only set in the "if (!
singular)" branch.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56232>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]