[R-sig-Debian] optimized linear algebra library on Lenny

Dirk Eddelbuettel edd at debian.org
Wed May 28 16:14:03 CEST 2008


On Wed, May 28, 2008 at 10:52:45AM -0300, tyler wrote:
> Hi,
> 
> I'd like to install the optimized libraries on my Thinkpad with an Intel
> Core Solo chip, which apparently supports the following instruction
> sets:  MMX, SSE, SSE2, SSE3 instruction sets, XD-Bit.
> 
> In a recent r-help message, the following was said (by Dirk I think):
> 
> <quote>
> Yes, on Ubuntu, use 'apt-get install atlas3-base' for basic tuned Atlas, or
> 'apt-get install atlas3-sse2' assuming that sse2 is the closest fit to the
> cpu in question.
> </quote>
> 
> However, while atlas3-base is available in Lenny/Testing, none of the
> architecture-dependent extensions are. I did find libatlas3gf-*, is this
> the same thing?

They are, but ...

edd at ron:~$ wajig search libatlas3
libatlas3gf-3dnow - Automatically Tuned Linear Algebra Software,3dnow shared
libatlas3gf-base - Automatically Tuned Linear Algebra Software,generic shared
libatlas3gf-sse - Automatically Tuned Linear Algebra Software,SSE1 shared
libatlas3gf-sse2 - Automatically Tuned Linear Algebra Software,SSE2 shared

... the names changed, finally, to map common practice with other
libraries and commence with 'lib'; the 'gf' denotes the rebuild with
the new default Fortran compiler gfortran (as opposed to the older
g77).

> The information I found in the R Admin manual seems to apply only to
> building R yourself, so I'm not sure what to do with the precompiled
> version from the repository. Is it as simple as:
> 
> apt-get install libatlas3gf-sse2
> 
> And is there anything else that needs doing to tell R to use the new
> libraries?

No, everything else is automatic. See the (Debian-specific) README
below /usr/share/doc/libatlas*/

It's always instructive to run a test such as (taken from README.Atlas
below /usr/share/doc/r-base-core/ -- and I need to update package
names therein)

    $ R --vanilla -q
    > mm <- matrix(rnorm(10^6), ncol = 10^3)
    > system.time(crossprod(mm))
    [1] 28.28  0.08 33.54  0.00  0.00
    >

Try that before and after installing libatlas*.  You may need n=4*10^6
or something similar to scale the times -- the README is dated.

Dirk


> 
> Thanks,
> 
> Tyler
> 
> -- 
> Who is your computer working for?
> 
> http://www.defectivebydesign.org/faq
> 
> _______________________________________________
> R-SIG-Debian mailing list
> R-SIG-Debian at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-debian

-- 
Three out of two people have difficulties with fractions.



More information about the R-SIG-Debian mailing list