Skip to content

Trouble using Rmpi after successful installation

8 messages · Paul Geeleher, Brian G. Peterson, Sean Davis +3 more

#
Hi guys,

I'm trying to install Rmpi on the slave nodes of my cluster. The
installation seems to work with no errors or warnings using this
command:

R CMD INSTALL --configure-args="--with-Rmpi-include=/usr/lib64/openmpi/1.3.2-gcc/include
--with-Rmpi-libpath=/usr/lib64/openmpi/1.3.2-gcc/lib
--with-Rmpi-type=OPENMPI" Rmpi_0.5-8.tar.gz

But when I attempt to load Rmpi I get the following error:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
 unable to load shared library '/usr/lib64/R/library/Rmpi/libs/Rmpi.so':
 libmpi.so.0: cannot open shared object file: No such file or directory
Error in library(Rmpi) : .First.lib failed for 'Rmpi'
Error in dyn.unload(file.path(libpath, "libs", paste("Rmpi",
.Platform$dynlib.ext,  :
 dynamic/shared library '/usr/lib64/R/library/Rmpi/libs/Rmpi.so' was not loaded

I wonder does anybody have an ideas as to what might be wrong here?

It seemed to install just fine on my master node by the way.

Thanks,

Paul.


--
Paul Geeleher
School of Mathematics, Statistics and Applied Mathematics
National University of Ireland
Galway
Ireland
--
www.bioinformaticstutorials.com
#
Hi guys,

I'm trying to install Rmpi on the slave nodes of my cluster. The
installation seems to work with no errors or warnings using this
command:

R CMD INSTALL --configure-args="--with-Rmpi-include=/usr/lib64/openmpi/1.3.2-gcc/include
--with-Rmpi-libpath=/usr/lib64/openmpi/1.3.2-gcc/lib
--with-Rmpi-type=OPENMPI" Rmpi_0.5-8.tar.gz

But when I attempt to load Rmpi I get the following error:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
?unable to load shared library '/usr/lib64/R/library/Rmpi/libs/Rmpi.so':
?libmpi.so.0: cannot open shared object file: No such file or directory
Error in library(Rmpi) : .First.lib failed for 'Rmpi'
Error in dyn.unload(file.path(libpath, "libs", paste("Rmpi",
.Platform$dynlib.ext, ?:
?dynamic/shared library '/usr/lib64/R/library/Rmpi/libs/Rmpi.so' was not loaded

I wonder does anybody have an ideas as to what might be wrong here?

It seemed to install just fine on my master node by the way.

Thanks,

Paul.


--
Paul Geeleher
School of Mathematics, Statistics and Applied Mathematics
National University of Ireland
Galway
Ireland
--
www.bioinformaticstutorials.com
#
On 04/27/2010 06:24 AM, Paul Geeleher wrote:
The error is likely telling you something.

Does the

libmpi.so.0

file exist in the directory specified?

is the directory readable by the user R is running as?

etc...
#
On Tue, Apr 27, 2010 at 7:23 AM, Paul Geeleher <paulgeeleher at gmail.com> wrote:
This has worked for me in the past:

CC=mpicc R CMD INSTALL --clean Rmpi_.....

However, I haven't tried it very recently.

Sean
#
Okay I've actually managed to sort this error by creating a simlink to
libmpi.so.0 in another directory:

ln -s /usr/lib64/openmpi/1.3.2-gcc/lib/libmpi.so.0 /usr/lib64/R/lib/

Unfortunately this has led to another error:
[syd:25489] mca: base: components_open: component timer / linux open
function failed
[syd:25583] mca: base: components_open: component timer / linux open
function failed
librdmacm: couldn't read ABI version.
librdmacm: assuming: 4
libibverbs: Fatal: couldn't read uverbs ABI version.
CMA: unable to open /dev/infiniband/rdma_cm
--------------------------------------------------------------------------
WARNING: Failed to open "OpenIB-cma" [DAT_INTERNAL_ERROR:].
This may be a real error or it may be an invalid entry in the uDAPL
Registry which is contained in the dat.conf file. Contact your local
System Administrator to confirm the availability of the interfaces in
the dat.conf file.
--------------------------------------------------------------------------


I think this has something to do with the fact that I'm trying to
install Rmpi on the slave image, i.e. I do a "chroot
/cm/images/default-image" before running the installation. I do need
to install this on the slave image also right? As I said it installed
fine on the master node?

Thanks,

Paul
On Tue, Apr 27, 2010 at 12:40 PM, Sean Davis <sdavis2 at mail.nih.gov> wrote:

  
    
#
On 27 April 2010 at 13:16, Paul Geeleher wrote:
| Okay I've actually managed to sort this error by creating a simlink to
| libmpi.so.0 in another directory:
| 
| ln -s /usr/lib64/openmpi/1.3.2-gcc/lib/libmpi.so.0 /usr/lib64/R/lib/
| 
| Unfortunately this has led to another error:
| > library(Rmpi)
| [syd:25489] mca: base: components_open: component timer / linux open
| function failed
| [syd:25583] mca: base: components_open: component timer / linux open
| function failed
| librdmacm: couldn't read ABI version.
| librdmacm: assuming: 4
| libibverbs: Fatal: couldn't read uverbs ABI version.
| CMA: unable to open /dev/infiniband/rdma_cm
| --------------------------------------------------------------------------
| WARNING: Failed to open "OpenIB-cma" [DAT_INTERNAL_ERROR:].
| This may be a real error or it may be an invalid entry in the uDAPL
| Registry which is contained in the dat.conf file. Contact your local
| System Administrator to confirm the availability of the interfaces in
| the dat.conf file.
| --------------------------------------------------------------------------
| 
| 
| I think this has something to do with the fact that I'm trying to
| install Rmpi on the slave image, i.e. I do a "chroot
| /cm/images/default-image" before running the installation. I do need
| to install this on the slave image also right? As I said it installed
| fine on the master node?

I think you should go back a step and see if you can run a standard 'hello,
world' MPI example.  If and when you can, then try installing Rmpi.  

Some of us work reasonably hard to provide all this via a simple apt-get
without further ado, hassles or worries. You don't have to tear your hair out
over this, depending on the platform you choose.
#
Try
R CMD ldd path_to_Rmpi.so

to see if Rmpi can find libs in /usr/lib64/openmpi/1.3.2-gcc/lib.
Otherwise you have to modify env LD_LIBRARY_PATH or modify R script to add
at third line

LD_LIBRARY_PATH=/usr/lib64/openmpi/1.3.2-gcc/lib

Hao
Paul Geeleher wrote:

  
    
#
I appreciate that you say it compiled cleanly but are you sure that
the Rmpi library was actually compiled against the OpenMPI compiler
driver wrappers?

I found that I needed to explicity set the following in

~/.R/Makevars

before I ran the R CMD INSTALL upon my School's NetBSD platform:

$cat ~/.R/Makevars
CC=mpicc
SHLIB_LD=mpicc

I am now seeing other issues with invoking Rmpi (detailed elsewhere
on this list) but there was a point where I thought I had installed
the Rmpi.so correctly only to find that it was installed but not
seemingly linked against any OpenMPI libs.

Forcing the compiler and linker through the use of the ~/.R/Makevars
mechanism seemed to, at least, cure that issue - for some reason all
my other attempts pass stuff via the R command line did not seem to
percolate through to the actual build.