Dear list, I am trying without success to install the Rmpi package on our large computing cluster but it keeps failing at compilation time. The machine is: bash-3.2$ uname -a Linux cluster04 2.6.18-53.el5 x86_64 x86_64 x86_64 GNU/Linux I have downloaded and successfully installed LAM-MPI under $HOME. If I try to install the Rmpi package by $ R CMD INSTALL Rmpi --configure-args=--with-mpi=$HOME I am getting the following error at compilation time (I also put the full transcript of the instalation at the end of this message). /usr/bin/ld: /home/mab/lib/libmpi.a(recv.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /home/mab/lib/libmpi.a: could not read symbols: Bad value Any help to resolve that issue would be greatly appreciated. Thanks Marco ---Instalation transcript --- mab cluster04 ~/src$ R CMD INSTALL Rmpi --configure-args=--with-mpi=$HOME * Installing to library '/home/mab/RLibrary' * Installing *source* package 'Rmpi' ... checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed Try to find mpi.h ... Found in /home/mab/include Try to find libmpi.so or libmpich.a checking for main in -lmpi... yes Try to find liblam.so ... checking for main in -llam... yes checking for openpty in -lutil... yes checking for main in -lpthread... yes configure: creating ./config.status config.status: creating src/Makevars ** libs gcc -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so RegQuery.o Rmpi.o conversion.o internal.o -L/home/mab/lib -lmpi -llam -lutil -lpthread -fPIC -L/n/site/inst/Linux-x86_64/bioinfo/R/2.8.0/lib64/R/lib -lR /usr/bin/ld: /home/mab/lib/libmpi.a(recv.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /home/mab/lib/libmpi.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [Rmpi.so] Error 1 chmod: cannot access `/home/mab/RLibrary/Rmpi/libs/*': No such file or directory ERROR: compilation failed for package 'Rmpi' ** Removing '/home/mab/RLibrary/Rmpi' -- Marco Blanchette, Ph.D. Assistant Investigator Stowers Institute for Medical Research 1000 East 50th St. Kansas City, MO 64110 Tel: 816-926-4071 Cell: 816-726-8419 Fax: 816-926-2018
Problem compiling Rmpi on Linux
4 messages · Blanchette, Marco, Hao Yu, Dirk Eddelbuettel
Make sure when you are compiling LAM to use --enable-shared in configure. Somehow LAM creates static lib as default and Rmpi needs dynamic lib to work. Hao
Blanchette, Marco wrote:
Dear list, I am trying without success to install the Rmpi package on our large computing cluster but it keeps failing at compilation time. The machine is: bash-3.2$ uname -a Linux cluster04 2.6.18-53.el5 x86_64 x86_64 x86_64 GNU/Linux I have downloaded and successfully installed LAM-MPI under $HOME. If I try to install the Rmpi package by $ R CMD INSTALL Rmpi --configure-args=--with-mpi=$HOME I am getting the following error at compilation time (I also put the full transcript of the instalation at the end of this message). /usr/bin/ld: /home/mab/lib/libmpi.a(recv.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /home/mab/lib/libmpi.a: could not read symbols: Bad value Any help to resolve that issue would be greatly appreciated. Thanks Marco ---Instalation transcript --- mab cluster04 ~/src$ R CMD INSTALL Rmpi --configure-args=--with-mpi=$HOME * Installing to library '/home/mab/RLibrary' * Installing *source* package 'Rmpi' ... checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed Try to find mpi.h ... Found in /home/mab/include Try to find libmpi.so or libmpich.a checking for main in -lmpi... yes Try to find liblam.so ... checking for main in -llam... yes checking for openpty in -lutil... yes checking for main in -lpthread... yes configure: creating ./config.status config.status: creating src/Makevars ** libs gcc -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so RegQuery.o Rmpi.o conversion.o internal.o -L/home/mab/lib -lmpi -llam -lutil -lpthread -fPIC -L/n/site/inst/Linux-x86_64/bioinfo/R/2.8.0/lib64/R/lib -lR /usr/bin/ld: /home/mab/lib/libmpi.a(recv.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /home/mab/lib/libmpi.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [Rmpi.so] Error 1 chmod: cannot access `/home/mab/RLibrary/Rmpi/libs/*': No such file or directory ERROR: compilation failed for package 'Rmpi' ** Removing '/home/mab/RLibrary/Rmpi' -- Marco Blanchette, Ph.D. Assistant Investigator Stowers Institute for Medical Research 1000 East 50th St. Kansas City, MO 64110 Tel: 816-926-4071 Cell: 816-726-8419 Fax: 816-926-2018
_______________________________________________ R-sig-hpc mailing list R-sig-hpc at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
Department of Statistics & Actuarial Sciences Fax Phone#:(519)-661-3813 The University of Western Ontario Office Phone#:(519)-661-3622 London, Ontario N6A 5B7 http://www.stats.uwo.ca/faculty/yu
Hi Marco,
On 8 December 2008 at 12:15, Blanchette, Marco wrote:
| I am trying without success to install the Rmpi package on our large computing cluster but it keeps failing at compilation time. The machine is: | bash-3.2$ uname -a | Linux cluster04 2.6.18-53.el5 x86_64 x86_64 x86_64 GNU/Linux | | I have downloaded and successfully installed LAM-MPI under $HOME. Just checking -- are you aware that 'sudo apt-get install r-cran-rmpi' gives a pre-built and working Rmpi (albeit based off Open MPI) ? By the same token, do you know that 'sudo apt-get install lam4-dev' gets you a working LAM implementation ... for which Rmpi should automatically find headers and libraries. | If I try to install the Rmpi package by | $ R CMD INSTALL Rmpi --configure-args=--with-mpi=$HOME | | I am getting the following error at compilation time (I also put the full transcript of the instalation at the end of this message). | /usr/bin/ld: /home/mab/lib/libmpi.a(recv.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC | /home/mab/lib/libmpi.a: could not read symbols: Bad value | | Any help to resolve that issue would be greatly appreciated. As Hoa indicated in the earlier reply, this error seems to stem from the fact that your local libmpia.a is statically built wheresas R needs it as a dynamic library. But as suggested above, maybe you can use the prebuilt packages? Cheers, Dirk
Three out of two people have difficulties with fractions.
Thanks Dirk for the suggestions. I am just starting to experiment with our large Linux computation cluster and I am not completely familiar with alternative strategies for installing libraries. (I have been running on a Mac workstation for the past 10 years...). In addition I don't have sudo privileges and I wanted to test whether this would be a valuable solution before bugging our sys admin. Hoa solution fixed all my problems. Here is the final strategy that gave me satisfactory results ./configure prefix=$HOME/lam-mpi --enable-shared make -j 8 make -j 8 install R CMD INSTALL Rmpi --configure-args=--with-mpi=$HOME/lam-mpi Thanks all, Marco
On 12/8/08 12:43 PM, "Dirk Eddelbuettel" <edd at debian.org> wrote:
Hi Marco,
On 8 December 2008 at 12:15, Blanchette, Marco wrote:
| I am trying without success to install the Rmpi package on our large computing cluster but it keeps failing at compilation time. The machine is: | bash-3.2$ uname -a | Linux cluster04 2.6.18-53.el5 x86_64 x86_64 x86_64 GNU/Linux | | I have downloaded and successfully installed LAM-MPI under $HOME. Just checking -- are you aware that 'sudo apt-get install r-cran-rmpi' gives a pre-built and working Rmpi (albeit based off Open MPI) ? By the same token, do you know that 'sudo apt-get install lam4-dev' gets you a working LAM implementation ... for which Rmpi should automatically find headers and libraries. | If I try to install the Rmpi package by | $ R CMD INSTALL Rmpi --configure-args=--with-mpi=$HOME | | I am getting the following error at compilation time (I also put the full transcript of the instalation at the end of this message). | /usr/bin/ld: /home/mab/lib/libmpi.a(recv.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC | /home/mab/lib/libmpi.a: could not read symbols: Bad value | | Any help to resolve that issue would be greatly appreciated. As Hoa indicated in the earlier reply, this error seems to stem from the fact that your local libmpia.a is statically built wheresas R needs it as a dynamic library. But as suggested above, maybe you can use the prebuilt packages? Cheers, Dirk -- Three out of two people have difficulties with fractions. -- Marco Blanchette, Ph.D. Assistant Investigator Stowers Institute for Medical Research 1000 East 50th St. Kansas City, MO 64110 Tel: 816-926-4071 Cell: 816-726-8419 Fax: 816-926-2018