Skip to content
Prev 22374 / 63424 Next

Installing Rmpi on 64-bit Linux Athlon

Many thanks for help on this. Using Hin-Tak's (offline) suggestion, I
was able to get Rmpi to compile on R 2.4.0 by manually linking the
offending code using a different shared library (which didn't seem to be
picked up with any of the command-line arguments), and then
re-installing the usual way.

setenv LDFLAGS "-L$prefix/lib -L$prefix/lib64"
R CMD INSTALL ~/code/Rmpi --configure-args="--with-mpi=$prefix
--prefix=$prefix CC=mpicc" -l $R_LIBS
cd ~/code/Rmpi/src
gcc -shared -L$prefix/lib -o Rmpi.so RegQuery.o Rmpi.o conversion.o
internal.o -lmpi -llam -lutil -lpthread   
R CMD INSTALL ~/code/Rmpi --configure-args="--with-mpi=$prefix CC=mpicc"
-l $R_LIBS

Once the package was installed, I quickly found out that Rmpi simply
does not work under R 2.4.0 (for me at least), partly because of a
change in the serialize function in R 2.4.0 (affecting bin.nchar()), and
partly for reasons I haven't been able to figure out. (Looks like a
failure in the mpi_allgather function in Rmpi.c, but am not sure). So
for now, I'm retaining R 2.3.1 for parallel processing work.

If anyone succeeds in compiling Rmpi on 2.4.0, please pass along any
necessary changes to the package maintainer.
Best,
Robert

-----Original Message-----
From: Hin-Tak Leung [mailto:hin-tak.leung at cimr.cam.ac.uk] 
Sent: Tuesday, October 10, 2006 6:10 AM
To: c.farrow at compserv.gla.ac.uk
Cc: McGehee, Robert; r-devel at stat.math.ethz.ch
Subject: Re: [Rd] Installing Rmpi on 64-bit Linux Athlon

No, both of you are not doing it correctly - you are confused about 
linker problem with runtime issue. LD_LIBRARY_PATH is a runtime
flag. You want to set the linker flag to influence the linker behavior:

setenv LDFLAGS="-L$prefix/lib -L$prefix/lib64"

or edit the makefile or Makevars do the equivalent with PKG_LDFLAGS
in the Rmpi package.

BTW, the syntax for using LD_LIBRARY_PATH is also wrong - to use it the 
way it is intended, you need:

setenv LD_LIBRARY_PATH "$prefix/lib:$prefix/lib64"
c.farrow at compserv.gla.ac.uk wrote:
Red
data
2.4.0
not
on
lam-mpi
--prefix=$prefix
conversion.o
-DPACKAGE_VERSION=\"\"
us...{{dropped}}