[R-sig-hpc] Rmpi installation with openmpi (on local directory)
Hao Yu
hyu at stats.uwo.ca
Tue Feb 28 18:50:53 CET 2012
R cannot find libmpi.so in /usr/lib64/openmpi/1.4-gcc/lib. You have to
tell R where to find it. There are two ways to do it:
1. Modify the env var LD_LIBRARY_PATH to include
/usr/lib64/openmpi/1.4-gcc/lib.
2. Modify R in R/bin to add a line (at third line) like
LD_LIBRARY_PATH=/usr/lib64/openmpi/1.4-gcc/lib
Recompile Rmpi or load Rmpi to see if this works.
Hao
Rodney Sparapani wrote:
> Brian Smith wrote:
>> Hi,
>>
>> I was trying to install the Rmpi package on a cluster (running SGE). I
>> first installed the openmpi package in my directory, and then installed
>> the
>> Rmpi package (after downloading tarball from cran) by an interactive R
>> session.
>>
>> If I load Rmpi within an R interactive session everything seems to be
>> fine.
>> However, if I try to use the SGE then I get errors:
>>
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>> unable to load shared object
>> '/home/bs/R/x86_64-unknown-linux-gnu-library/2.14/Rmpi/libs/Rmpi.so':
>> libmpi.so.0: cannot open shared object file: No such file or directory
>> Error: package/namespace load failed for ?Rmpi?
>> Execution halted
>>
>> Other details of my attempts at the installation are given below. Any
>> help
>> would be greatly appreciated!
>>
>> many thanks!
>>
>> PS: I have read the previous threads on difficulties in installation of
>> Rmpi and have tried to follow the advice/example...
>>
>>
>
> Hi Brian et al.:
>
> I'm seeing pretty much the same thing with R 2.14.0 on RHEL 5.7 with GCC
> 4.4.4 20100726 (Red Hat 4.4.4-13). I didn't see a solution in this
> thread. Any ideas? Thanks in advance.
>
> /opt/local/src/R/Rmpi:$ R CMD INSTALL Rmpi_0.5-9.tar.gz \
> --configure-args=--with-mpi=/usr/lib64/openmpi/1.4-gcc
>
> * installing to library '/opt/local/lib64/R/library'
> * installing *source* package 'Rmpi' ...
> checking for gcc... gcc44 -std=gnu99
> 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 gcc44 -std=gnu99 accepts -g... yes
> checking for gcc44 -std=gnu99 option to accept ISO C89... none needed
> Trying to find mpi.h ...
> Found in /usr/lib64/openmpi/1.4-gcc/include
> Trying to find libmpi.so or libmpich.a ...
> Found libmpi in /usr/lib64/openmpi/1.4-gcc/lib
> checking for openpty in -lutil... yes
> checking for main in -lpthread... yes
> configure: creating ./config.status
> config.status: creating src/Makevars
> ** Creating default NAMESPACE file
> ** libs
> gcc44 -std=gnu99 -I/opt/local/lib64/R/include -DPACKAGE_NAME=\"\"
> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
> -DPACKAGE_BUGREPORT=\"\" -I/usr/lib64/openmpi/1.4-gcc/include -DMPI2
> -DOPENMPI -I/usr/local/include -fpic -g -c RegQuery.c -o RegQuery.o
> gcc44 -std=gnu99 -I/opt/local/lib64/R/include -DPACKAGE_NAME=\"\"
> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
> -DPACKAGE_BUGREPORT=\"\" -I/usr/lib64/openmpi/1.4-gcc/include -DMPI2
> -DOPENMPI -I/usr/local/include -fpic -g -c Rmpi.c -o Rmpi.o
> gcc44 -std=gnu99 -I/opt/local/lib64/R/include -DPACKAGE_NAME=\"\"
> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
> -DPACKAGE_BUGREPORT=\"\" -I/usr/lib64/openmpi/1.4-gcc/include -DMPI2
> -DOPENMPI -I/usr/local/include -fpic -g -c conversion.c -o
> conversion.o
> gcc44 -std=gnu99 -I/opt/local/lib64/R/include -DPACKAGE_NAME=\"\"
> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
> -DPACKAGE_BUGREPORT=\"\" -I/usr/lib64/openmpi/1.4-gcc/include -DMPI2
> -DOPENMPI -I/usr/local/include -fpic -g -c internal.c -o internal.o
> gcc44 -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so RegQuery.o Rmpi.o
> conversion.o internal.o -L/usr/lib64/openmpi/1.4-gcc/lib -lmpi -lutil
> -lpthread
> installing to /opt/local/lib64/R/library/Rmpi/libs
> ** R
> ** demo
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices ...
> ** testing if installed package can be loaded
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
> unable to load shared object
> '/opt/local/lib64/R/library/Rmpi/libs/Rmpi.so':
> libmpi.so.0: cannot open shared object file: No such file or directory
> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing '/opt/local/lib64/R/library/Rmpi'
>
> /opt/local/src/R/Rmpi:# yum info openmpi openmpi-devel
> Loaded plugins: rhnplugin, security
> Installed Packages
> Name : openmpi
> Arch : i386
> Version : 1.4
> Release : 4.el5
> Size : 300 k
> Repo : installed
> Summary : Open Message Passing Interface
> URL : http://www.open-mpi.org/
> License : BSD
> Description: Open MPI is an open source, freely available implementation
> of both the
> : MPI-1 and MPI-2 standards, combining technologies and
> resources from
> : several other projects (FT-MPI, LA-MPI, LAM/MPI, and
> PACX-MPI) in
> : order to build the best MPI library available. A
> completely new MPI-2
> : compliant implementation, Open MPI offers advantages for
> system and
> : software vendors, application developers, and computer
> science
> : researchers. For more information, see
> http://www.open-mpi.org/ .
>
> Name : openmpi
> Arch : x86_64
> Version : 1.4
> Release : 4.el5
> Size : 316 k
> Repo : installed
> Summary : Open Message Passing Interface
> URL : http://www.open-mpi.org/
> License : BSD
> Description: Open MPI is an open source, freely available implementation
> of both the
> : MPI-1 and MPI-2 standards, combining technologies and
> resources from
> : several other projects (FT-MPI, LA-MPI, LAM/MPI, and
> PACX-MPI) in
> : order to build the best MPI library available. A
> completely new MPI-2
> : compliant implementation, Open MPI offers advantages for
> system and
> : software vendors, application developers, and computer
> science
> : researchers. For more information, see
> http://www.open-mpi.org/ .
>
> Name : openmpi-devel
> Arch : i386
> Version : 1.4
> Release : 4.el5
> Size : 3.9 M
> Repo : installed
> Summary : Development files for openmpi
> URL : http://www.open-mpi.org/
> License : BSD
> Description: Contains development headers and libraries for openmpi
>
> Name : openmpi-devel
> Arch : x86_64
> Version : 1.4
> Release : 4.el5
> Size : 3.9 M
> Repo : installed
> Summary : Development files for openmpi
> URL : http://www.open-mpi.org/
> License : BSD
> Description: Contains development headers and libraries for openmpi
>
> --
> Rodney Sparapani, PhD Center for Patient Care and Outcomes Research
> Sr. Biostatistician http://www.mcw.edu/pcor
> 4 wheels good, 2 wheels better! Medical College of Wisconsin (MCW)
> WWLD?: What Would Lombardi Do? Milwaukee, WI, USA
>
> _______________________________________________
> 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
Office Phone#:(519)-661-3622
Fax Phone#:(519)-661-3813
The University of Western Ontario
London, Ontario N6A 5B7
http://www.stats.uwo.ca/yu
More information about the R-sig-hpc
mailing list