|Subject:||Re: LAPACK problem affecting full SVD, xGESDD (Octave 4.4)|
|Date:||Thu, 24 Jan 2019 10:11:43 -0800|
On 01/24/2019 09:00 AM, address@hidden wrote:
Could you also file a bug report about this at bugs.octave.org? This is an upstream issue, but when users have trouble with Octave's SVD they are likely to start searching Octave's bug tracker, rather than LAPACK's bug tracker.
The specific driver to use for SVD in Octave is controlled by the svd_driver() function for which I quote the help text:
-- VAL = svd_driver ()
-- OLD_VAL = svd_driver (NEW_VAL)
-- svd_driver (NEW_VAL, "local")
Query or set the underlying LAPACK driver used by 'svd'.
Currently recognized values are "gesdd" and "gesvd". The default
When called from inside a function with the "local" option, the
variable is changed locally for the function and any subroutines it
calls. The original variable value is restored when exiting the
Algorithm Notes: The LAPACK library provides two routines for
calculating the full singular value decomposition (left and right
singular matrices as well as singular values). When calculating
just the singular values the following discussion is not relevant.
The default routine use by Octave is the newer 'gesdd' which is
based on a Divide-and-Conquer algorithm that is 5X faster than the
alternative 'gesvd', which is based on QR factorization. However,
the new algorithm can use significantly more memory. For an MxN
input matrix the memory usage is of order O(min(M,N) ^ 2), whereas
the alternative is of order O(max(M,N)). In general, modern
computers have abundant memory so Octave has chosen to prioritize
In addition, there have been instances in the past where some input
matrices were not accurately decomposed by 'gesdd'. This appears
to have been resolved with modern versions of LAPACK. However, if
certainty is required the accuracy of the decomposition can always
be tested after the fact with
[U, S, V] = svd (X);
norm (X - U*S*V', "fro")
See also: svd.
It appears that the last paragraph, "in the past some input matrices were not accurately decomposed by 'gesdd'", has returned.
Assuming, that the bug is verified to be real on the LAPACK site, a fix is unlikely to be available in distributions anytime soon (time to code fix, time to make a new LAPACK release, time for distributions to incorporate new library, time for desktop users to upgrade OS).
Octave itself is about to produce a 5.0 release. We might minimize problems going forward by changing the default SVD calculation routine to the, apparently more stable, 'gesvd'.
|[Prev in Thread]||Current Thread||[Next in Thread]|