Skip to content

R on 64-bit Linux machine

9 messages · Vadim Ogranovich, Roger D. Peng, Peter Dalgaard +1 more

#
I've built (and routinely use) 64 bit R on the following platforms:

Red Hat Enterprise Linux AS release 3 (AMD Opteron 848)
Fedora Core 2 x86_64 (AMD Athlon 64 3800+)
SuSE SLES 8 (AMD Opteron 248)

One problem that has come up is that if you want to link R with ATLAS, 
you need to build shared ATLAS libraries (rather than static).  This 
requires some modifications to the configuation files for ATLAS.  But 
my experience shows that R itself builds out of the box on these systems.

-roger
Vadim Ogranovich wrote:

  
    
#
On Fri, 12 Nov 2004, Vadim Ogranovich wrote:

            
That's an R limitation, not a 64-bit version one.
Not RHEL 3: we sent that back for a refund and its compilers are too old 
to work well on AMD64. Fedora Core 3 is fine on AMD64, and is what I would 
recommend.  We also run SuSe 9.1, but for people used to RH, Fedora is 
more familiar.

CRAN will have 64-bit RPMs for x86_64 FC3 come R 2.0.1 (released on 
Monday)
#
On Fri, 12 Nov 2004, Roger D. Peng wrote:

            
However, you will almost certainly get better performance out of the Goto 
BLAS implementations, and they are shared (and easy to use, much more so 
than ATLAS).
#
"Roger D. Peng" <rpeng at jhsph.edu> writes:
Nice to know about the Enterprise variants. FC2/3 and SUSE 9.1 are
known good too (did anyone check 9.2 yet?).
Actually, you can just go through configuration and add -fPIC to the
compiler flags. Then at the end, run

 ld --shared --whole-archive -o libatlas.so libatlas.a

etc. [If you don't accept architectural defaults (as you probably
shouldn't), the compile/optimize is going to take a while. I wouldn't
know how big the difference is, but -fPIC _will_ force code
differences.]

  
    
#
Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
I actually have different experience in the multithreaded case, at
least with my favourite "benchmark suite": inversion of a large 
matrix. I'd do some timings, but I have this ATLAS compile running
just now...
#
Peter Dalgaard <p.dalgaard at biostat.ku.dk> writes:
Specifically, here's what I got:

pd at linux:~/r-devel> echo 'set.seed(1);M<-matrix(rnorm(9e6),3e3);system.time(solve(M))' | BUILD/bin/R -q --vanilla
[1] 218.00   1.27 219.62   0.00   0.00
pd at linux:~/r-devel> echo 'set.seed(1);M<-matrix(rnorm(9e6),3e3);system.time(solve(M))' | BUILD-GOTO/bin/R -q --vanilla
[1] 29.12  1.39 32.21  0.00  0.00
pd at linux:~/r-devel> echo 'set.seed(1);M<-matrix(rnorm(9e6),3e3);system.time(solve(M))' | BUILD-ATLAS/bin/R -q --vanilla
[1]  3.24  1.31 21.45 31.75  0.24
So ATLAS is faster than GOTO by about 10 seconds. It is a bit odd that
the GOTO timings don't seem to include any subprocess time but it
should be the threaded library libgoto_opt64p-r0.93.so (I know;
there's a 0.96 now, will upgrade).
#
On Sat, 13 Nov 2004, Peter Dalgaard wrote:

            
Not on total CPU time (it's slower by about the margin I would expect), 
only on elapsed time.
I get (on a dual Opteron 248 with 0.96-2)

[1] 20.59  1.01 19.10  0.00  0.00

which note is using more than 100% CPU time.  Are you sure you are using
multiple threads with Goto?

I have never built a threaded ATLAS for that machine, as in our 
environment people are normally running multiple jobs and it is total CPU 
time that counts.
#
Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
True, but there's always a penalty on multithreading nontrivial code,
so to minimize total time, use only one CPU...
Fairly sure... I got (dual Opteron 240, now also 0.96-2)

[1] 29.21  1.50 30.97  0.00  0.00

so less than 100% but the timing ratio seems fairly consistent with
the clock speeds (1.4 GHz vs. 2.2 GHz).