From gb@stat.umu.se  Thu Mar  2 14:43:50 2000
From: gb@stat.umu.se (gb@stat.umu.se)
Date: Thu, 2 Mar 2000 15:43:50 +0100 (CET)
Subject: [Rd] R and lapack/linpack
In-Reply-To: <qxpzoshscn2.fsf@verdi.stat.wisc.edu>
Message-ID: <Pine.LNX.4.10.10003021516240.11160-100000@pc16.stat.umu.se>

On 2 Mar 2000, Saikat DebRoy wrote:

> >>>>> "gb" == gb  <gb@stat.umu.se> writes:
> 
>   >> I can't help noticing that you are configuring for a RISC
>   >> optimized BLAS library on an Intel x86 processor.  I have no idea
>   >> if this is serious, but it seems a bit odd.
> 
>   gb> Talking about that, is there an x86 optimized (for Linux and/or
>   gb> NT) BLAS around somewhere?
> 
> You can try atlas (http://www.netlib.org/atlas/). You will have to
> download the source and build it on your machine if you want it to
> work optimally. The problem with that is that it does not build the
> shared libraries by default and the whole build process is rather
> complicated. Also, you will have to patch the R-1.0.0 configure.in file
> (I am attaching the patch below) and then run autoconf to generate the
> configure file.
> 
> Even after you do all these, the performance benefit is not great. R
> currently uses only level 1 blas and the most significant atlas
> optimizations are for level 3 (and level 2 to some extant). I do not
> think that it is worth the effort.
[snip]

Thank you for the information. It looks as if it is of no big concern.
However, I can report that I found BLAS and LAPACK rpms as contribs for
RedHat, which is my brand of Linux. Maybe they are optimized.

That leads to a follow-up question about LAPACK. I am maintaining 
a larger, standalone  C  program, which uses (C)LAPACK and (C)BLAS 
(for a Newton-Raphson algorithm). I am currently working with 
transforming the  C  program into an  R  package. As I understands it,
R uses LINPACK and not LAPACK (why? historical reasons?), and I have
two options: (1) throw out LAPACK and use LINPACK supplied with  R,
or (2) keep the clapack routines I need in the C code of the  R 
library. 

I have tried (2), and it works, of course, but I am somehow tempted
by (1). Any recommendations?

Gran
----------------------------------------------------------
 Gran Brostrm                      tel: +46 90 786-5223
 Department of Statistics            fax: +46 90 786-6614
 Ume University                                         
 SE-90187 Ume, Sweden              email: gb@stat.umu.se
                                                        
 http://www.stat.umu.se/egna/gb    ftp://capa.stat.umu.se
----------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] R and lapack/linpack
gb@stat.umu.se