[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix |
Date: |
Fri, 20 Nov 2020 11:21:44 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36 |
Follow-up Comment #8, bug #59488 (project octave):
The issue of interacting with Fortran and BLAS/LAPACK libraries when the
matrices contain non-finite values is a large one. If we want to tackle that,
we should develop a strategy first. Right now we have patched things up in
various ways as problems have arisen (such as in inverse routines). The
danger here is that the code base grows substantially (more maintenance
burden) to contain a lot of if/elseif checking for specific conditions. And
we may forget to port each case over to a newly discovered example of a bad
C++/Fortran interaction.
I'm not even particularly in love with the "solution" we have for the inverse
of a matrix. Our current approach is to calculate the condition number and
check it for Inf/NaN before calling the main inversion routines. This is a
performance hit if all the user wanted was the inverse. If try/catch blocks
are cheap in C++ maybe we should just be wrapping the external library calls
in them and using the catch block to translate the undecipherable message
"parameter number 4 is invalid" to something nice like "non-finite value
encountered in matrix".
For empty matrices, it probably makes sense to have a shortcut path in the
code. Besides generating the correct result, it will be a performance win as
well. eigs() is designed to be called on sparse matrices and the nnz()
function is cheap on sparse matrices. So
if (nnz () == 0)
...
endif
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59488>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, JD, 2020/11/19
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, Rik, 2020/11/19
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, JD, 2020/11/20
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, Philip Nienhuis, 2020/11/20
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, Markus Mützel, 2020/11/20
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, JD, 2020/11/20
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, John W. Eaton, 2020/11/20
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, John W. Eaton, 2020/11/20
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix,
Rik <=
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, Rik, 2020/11/20
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, JD, 2020/11/20
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, John W. Eaton, 2020/11/20
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, Rik, 2020/11/20
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, JD, 2020/11/25
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, Rik, 2020/11/25
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, Rik, 2020/11/25
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, Rik, 2020/11/25
- [Octave-bug-tracker] [bug #59488] eigs error in dsaupd for zero matrix, Kai Torben Ohlhus, 2020/11/26