Skip to content

DGESDD from Lapack for R-1.4.0?

5 messages · Keith Richards-Dinger, Douglas Bates, A.J. Rossini +1 more

#
Hi,

I'm just wondering if it is planned to include the Lapack
routine DGESDD (and friends) in R-1.4.0?  This is faster
(supposedly by a factor of ~6 for large matrices) than
DGESVD which is currently (R-1.3.1) called by La.svd.

And if it is not in the plans yet, is there a chance it
could be?  I've added it to my local version of R-1.3.1 and
so far see a factor of 4 improvement over La.svd and a
factor of 3 over svd (see output below).  I'd be glad to
hand off what I've done so far to someone else or to work
more on it (make it behave as svd and La.svd do if you don't
want all the singular vectors; and add ZGESDD also).  
Though what I've done so far would probably be trivial for
someone who knew what they were doing...

Mac G4, 450 MHz, LinuxPPC, pre-compiled ATLAS-3.2.1
libraries for G4 from www.netlib.org, R-1.3.1:
[1] 22.31  0.10 23.01  0.00  0.00
[1] 29.60  0.10 29.78  0.00  0.00
[1] 7.28 0.12 8.00 0.00 0.00



Thanks, Keith Richards-Dinger

P.S.  I would have checked if DGESDD is in r-devel but I
could not figure out how to check r-devel out of CVS.  
<http://developer.R-project.org/CVStips.html> says "This
info is for reference to the core developers. Use of
anonymous CVS for outsiders is not yet covered here, but may
be in the future.", and my knowledge of CVS is almost
non-existent.  I tried:
 
cvs -d:pserver:anonymous@cvs.r-project.org:/home/rdevel/CVS-ARCHIVE login

and tried both an empty password and my email address as
password and both times got: 

cvs [login aborted]: authorization failed: server
cvs.r-project.org rejected access


---------------------------------------------------------------------------
Keith Richards-Dinger
U.S. Geological Survey, MS-977          Office 1-650-329-5519
345 Middlefield Road                    Fax    1-650-329-5143
Menlo Park, CA  USA  94025              e-mail dinger@usgs.gov
---------------------------------------------------------------------------




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Keith Richards-Dinger <dinger@mchinji.wr.usgs.gov> writes:
The best way to get copies of r-devel is through rsync from
rsync.r-project.org:: (see www.rsync.org for the rsync software if you
don't have it available).  You can also download a tar.gz or tar.bz2
snapshot from ftp://ftp.stat.math.ethz.ch/Software/R

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
>> 
    >> cvs
    >> -d:pserver:anonymous@cvs.r-project.org:/home/rdevel/CVS-ARCHIVE
    >> login
    >> 
    >> and tried both an empty password and my email address as
    >> password and both times got:
    >> 
    >> cvs [login aborted]: authorization failed: server
    >> cvs.r-project.org rejected access

    DB> The best way to get copies of r-devel is through rsync from
    DB> rsync.r-project.org:: (see www.rsync.org for the rsync
    DB> software if you don't have it available).  You can also
    DB> download a tar.gz or tar.bz2 snapshot from
    DB> ftp://ftp.stat.math.ethz.ch/Software/R

Note that the anon-CVS archive still exists and works (I just
checked), but Doug's comment re: rsync should be heeded -- if you
don't know why you want CVS (a meaningful "why"), then rsync should be
perfectly suited!

best,
-tony
#
On 16 Nov 2001, A.J. Rossini wrote:

            
Yes, rsync is indeed more than adequate for my purposes,
somehow I managed to miss the mention of rsync on the
website.

The src/modules/lapack/double.f in r-devel appears to be
identical to that in R-1.3.1, i.e. no DGESDD.  So the answer
to my main question is "no".   What about my secondary
questions - whether it might be done later, or if I should
somehow contribute what I've done and/or continue to work on
it?

Thanks, Keith

---------------------------------------------------------------------------
Keith Richards-Dinger
U.S. Geological Survey, MS-977          Office 1-650-329-5519
345 Middlefield Road                    Fax    1-650-329-5143
Menlo Park, CA  USA  94025              e-mail dinger@usgs.gov
---------------------------------------------------------------------------





-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Fri, 16 Nov 2001, Keith Richards-Dinger wrote:

            
No plans.
If you want to contribute tested code to do this it could be incorporated,
but the timescale for 1.4.0 is short: if that is to be released before
Christmas feature-freeze is imminent (but not yet announced).

We don't see R as a linear algebra system, and the aim of introducing
La.svd was accuracy not speed (the LINPACK version of svd having some
algorithmic limitations, as well as some problems on machines with
extra-precision FPU registers).
I'd want to see a wider comparison, including on non-ATLAS systems.
In particular, without ATLAS my 1GHZ PIII gives
[1] 22.76  0.06 22.80  0.00  0.00
[1] 16.32  0.15 16.95  0.00  0.00

and on Doug Bates' franz (with ATLAS)
[1] 14.70  0.03 17.96  0.00  0.00
[1] 15.00  0.03 17.71  0.00  0.00

which suggests something peculiar on your system, the only one I have ever
seen that has La.svd appreciably slower than svd.  We've had a couple of
instances where changing to use BLAS slowed down the code on the basic
system, so we know that the precise BLAS is important.