Does Octave 4.2.1 use SPQR or CXSparse for sparse QR factorizations?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Does Octave 4.2.1 use SPQR or CXSparse for sparse QR factorizations?

Joseph Young
    Does Octave 4.2.1 use SPQR or CXSparse for sparse QR factorizations?
Looking at the code sparse-qr.cc, it appears as though the QR
factorization from CXSparse is used.  If this is the case, my next
question is why is this routine preferred over those from SPQR?  Looking
at the changelog, it looks like there used to be routines for spqr, but
they were removed on Octave 3.6.  My impression was that these routines
were just merged into the qr routine, but I'm not sure if they used SPQR
or CXSparse when they were implemented.  Part of the reason I'm asking
is that I believe that SPQR should give superior performance.  More than
that, the current sparse implementation of qr disallows permutation,
[Q R P]=qr(A).  This is pretty useful in a number of contexts such as
extracting rank information as well as various low rank solves and
factorizations.  I believe that MATLAB already leans on the SPQR
routines and allows the factorization with permutations.

    That said, I don't understand the backstory here, so I'm writing to
better understand what's currently being done and why.  Thanks for the
help!

Joe

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Does Octave 4.2.1 use SPQR or CXSparse for sparse QR factorizations?

Dmitri A. Sergatskov
On Tue, Sep 5, 2017 at 10:27 PM, Joseph Young <[hidden email]> wrote:
    Does Octave 4.2.1 use SPQR or CXSparse for sparse QR factorizations?
Looking at the code sparse-qr.cc, it appears as though the QR
factorization from CXSparse is used.  If this is the case, my next
question is why is this routine preferred over those from SPQR?  Looking
at the changelog, it looks like there used to be routines for spqr, but
they were removed on Octave 3.6.  My impression was that these routines
were just merged into the qr routine, but I'm not sure if they used SPQR
or CXSparse when they were implemented.  Part of the reason I'm asking
is that I believe that SPQR should give superior performance.  More than
that, the current sparse implementation of qr disallows permutation,
[Q R P]=qr(A).  This is pretty useful in a number of contexts such as
extracting rank information as well as various low rank solves and
factorizations.  I believe that MATLAB already leans on the SPQR
routines and allows the factorization with permutations.

    That said, I don't understand the backstory here, so I'm writing to
better understand what's currently being done and why.  Thanks for the
help!


​David Bateman ​was a key contributor to the sparse matrix code for octave.
I believe he was also the person to the CSparse -> CXSparse translator
(for the actual SuiteSparse library).
Here is a paper you may find interesting:


Unfortunately David does not work on octave any more.

 

Joe


​Sincerely,

Dmitri.
--


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave