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

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

[Octave-bug-tracker] [bug #53719] eigs delivers wron result in case of c


From: Marco Caliari
Subject: [Octave-bug-tracker] [bug #53719] eigs delivers wron result in case of complex valued general eigenvalue problem
Date: Mon, 23 Apr 2018 09:31:59 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0

Follow-up Comment #3, bug #53719 (project octave):

The matrix B is not Hermitian positive definite, as required in the
documentation, and this is the main problem here. Looking for small
eigenvalues does not require explicit inversion of B by cholesky, and
therefore this problem is not detected. Matlab succeeds when asking 5
eigenvalues, but returns an error with 4 (ill-conditioned problem). I believe
that Matlab uses eig when asking 5 eigenvalues. This is reasonable: since the
default choice is to double the number of eigenvalues for the Krylov space,
when the Krylov space has the same dimension of the problem, we should use
eig. This is possible by replacing


if (rows (a) - k < 3)


with


if (2 * k >= rows (a))


in eigs.m. It seems that ARPACK does not detect problems in convergence and
therefore Octave silently returns wrong eigenvalues (when asking 4
eigenvalues). I will implement the example in fortran, to be 100% sure it is a
not-detected-problem in ARPACK.

For the crash, there is a problem in eigs-base:make_cholb. For the sparse
versions, when the factorization fails, it seems that fact.P () is not
available. The test should be as in the full case


if (info != 0)
  return false;
else


fact.P() (which is the second output of chol) is probably set later, I don't
know. I attach a diff (not yet a changeset): I had to change a lot of tests,
otherwise call_eig was used. Morever, I fixed some conditions in eigs.m.

To summarize:

1) the diff fixes the problem by calling eig (which is reasonable for this
example)
2) the diff fixes in general the crash when B is not SPD, but maybe a bug in
sparse_chol is now hidden (is it correct that fact.P() does not exist when
info != 0?)
3) the diff does not detect that the original problem is ill-conditioned (this
is probably a defect in ARPACK, I will check).


(file #43992)
    _______________________________________________________

Additional Item Attachment:

File name: eigs.diff                      Size:9 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53719>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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