Skip to content

Problems Installing Rmpi on openSUSE 11.1 x86_64

5 messages · Melwin, Martin Morgan, Hao Yu

#
Thanks to Hao, Brian and Martin (offlist) for their suggestions.

I tried them all:
- setting LD_LIBRARY_PATH
- using "--configure-args=--with-mpi=/path_to_lam"
- using mpicc
-> all without success when trying to install Rmpi (same error message as  
before)

Since I cannot accept using OpenMPI using 100% CPU power in idle mode, I
still need to get LAM working.
Martin suggested modifiying "configure.ac":

   tar xzf Rmpi_0.5-7.tar.gz
   vim Rmpi/configure.ac

I added
after line 67:      MPITYPE="LAM"
after line 128:
	elif test -f ${MPI_ROOT}/lib64/libmpi.so; then #Till
	        echo "Found libmpi in ${MPI_ROOT}/lib64"
	        MPI_LIBS="-L${MPI_ROOT}/lib64 -lmpi"
		MPI_INCLUDE="${MPI_INCLUDE} ${MPI_INCLUDE}/64"

followed by
   cd Rmpi && autoconf && cd ..
   R CMD INSTALL --clean Rmpi

compiles without errors (see snippet 1 below).
However, when tryinig to load Rmpi in R I get an error:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   kann shared library  
'/home/francke/R/x86_64-unknown-linux-gnu-library/2.8/Rmpi/libs/Rmpi.so'  
nicht laden:
  /usr/lib64/libmpi.so.0: undefined symbol: lam_ssi_cr_did
Fehler in library("Rmpi") : .First.lib fehlgeschlagen f?r 'Rmpi'
Error in dyn.unload(file.path(libpath, "libs", paste("Rmpi",  
.Platform$dynlib.ext,  :
   shared library  
'/home/francke/R/x86_64-unknown-linux-gnu-library/2.8/Rmpi/libs/Rmpi.so'  
wurde nicht geladen
Translation:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   could not load shared library  
'/home/francke/R/x86_64-unknown-linux-gnu-library/2.8/Rmpi/libs/Rmpi.so':
  /usr/lib64/libmpi.so.0: undefined symbol: lam_ssi_cr_did
Error in library("Rmpi") : .First.lib failed for 'Rmpi'
Error in dyn.unload(file.path(libpath, "libs", paste("Rmpi",  
.Platform$dynlib.ext,  :
   shared library  
'/home/francke/R/x86_64-unknown-linux-gnu-library/2.8/Rmpi/libs/Rmpi.so'  
not loaded
"Rmpi.so" exists, so I dunno what's wrong. Any help is appreciated,

Melwin



####snippet: installation of RMPI
* Installing to library
'/home/francke/R/x86_64-unknown-linux-gnu-library/2.8'
* 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
I am here /usr
Try to find mpi.h ...
Found in /usr/include
Try to find libmpi.so or libmpich.a
Found libmpi in /usr/lib64
Try to find liblam.so ...
checking for main in -llam... no
liblam not found. Probably not LAM-MPI
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 -I/usr/lib64/R/include -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -I/usr/include -I/usr/include/64 -DMPI2 -DLAM
-fPIC -I/usr/local/include    -fpic  -fmessage-length=0 -O2 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -c conversion.c -o conversion.o
gcc -std=gnu99 -I/usr/lib64/R/include -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -I/usr/include -I/usr/include/64 -DMPI2 -DLAM
-fPIC -I/usr/local/include    -fpic  -fmessage-length=0 -O2 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -c internal.c -o internal.o
gcc -std=gnu99 -I/usr/lib64/R/include -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -I/usr/include -I/usr/include/64 -DMPI2 -DLAM
-fPIC -I/usr/local/include    -fpic  -fmessage-length=0 -O2 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -c RegQuery.c -o RegQuery.o
gcc -std=gnu99 -I/usr/lib64/R/include -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -I/usr/include -I/usr/include/64 -DMPI2 -DLAM
-fPIC -I/usr/local/include    -fpic  -fmessage-length=0 -O2 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -c Rmpi.c -o Rmpi.o
gcc -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so conversion.o
internal.o RegQuery.o Rmpi.o -L/usr/lib64 -lmpi -lutil -lpthread -fPIC
-L/usr/lib64/R/lib -lR
** R
** demo
** inst
** preparing package for lazy loading
** help
   >>> Building/Updating help pages for package 'Rmpi'
    [...]
** building package indices ...
* DONE (Rmpi)
####end snippet






2009/6/26 Hao Yu <hyu at stats.uwo.ca>:
#
Melwin <win at comets.de> writes:
My guess is that you have successfully told R how to find LAM during
compile, but that your system needs to be configured so that R can
find LAM when it is running. I guess that

  R CMD ldd /home/francke/R/x86_64-unknown-linux-gnu-library/2.8/Rmpi/libs/Rmpi.so

lists something like 'libmpi.so.0 => not found' (I'm just guessing at
the missing library name; there may be several). What you need to do
is to tell R where to look, e.g., temporarily with

  LD_LIBRARY_PATH=/path/to/lib64 R

and more permanently by ldconfig or the like.

Martin

  
    
#
If Rmpi is compiled successfully but cannot be loaded into R, it may  be
due to lam's mpi.so not in ld path. Normally I would modify the R script
and add a line like (right after the first line)
LD_LIBRARY_PATH=/usr/local/lam/lib

In this way, Rmpi knows where to find mpi.so and lam.so.

Hao
Melwin wrote:

  
    
#
Sorry. I forgot to say that Rmpi needs liblam.so as well. So use
Once compiled, use

         ldd path_to_Rmpi.so

to check if all libs are properly set. Again the following line in R script
LD_LIBRARY_PATH=/usr/local/lam/lib
is  useful in case ldd reports libmpi.so.0 or liblam.so.0 are not found.

Hao
Melwin wrote:

  
    
#
Thanks, Martin and Hao, for the quick response.
Following Martin's suggestions, I tried
	R CMD ldd  
/home/francke/R/x86_64-unknown-linux-gnu-library/2.8/Rmpi/libs/Rmpi.so
which yields no apparent problem:
         linux-vdso.so.1 =>  (0x00007fff641fe000)
         libmpi.so.0 => /usr/lib64/libmpi.so.0 (0x00007f955bb40000)
         libutil.so.1 => /lib64/libutil.so.1 (0x00007f955b93c000)
         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f955b720000)
         libR.so => /usr/lib64/R/lib/libR.so (0x00007f955b1e5000)
         libc.so.6 => /lib64/libc.so.6 (0x00007f955ae8b000)
         /lib64/ld-linux-x86-64.so.2 (0x00007f955c026000)
         libRblas.so => /usr/lib64/R/lib/libRblas.so (0x00007f955ac5d000)
         libgfortran.so.3 => /usr/lib64/libgfortran.so.3  
(0x00007f955a981000)
         libm.so.6 => /lib64/libm.so.6 (0x00007f955a72a000)
         libreadline.so.5 => /lib64/libreadline.so.5 (0x00007f955a4e8000)
         libdl.so.2 => /lib64/libdl.so.2 (0x00007f955a2e4000)
         libncurses.so.5 => /lib64/libncurses.so.5 (0x00007f955a09b000)
although "liblam.so.0" is not listed. Is this a problem?

Nevertheless I attempted setting

	export LD_LIBRARY_PATH=/usr/lib64
(because thats where "libmpi.so" is) and
	export MPI_LIBS="-Lusr/lib64 -lmpi -lam"
(because thats where "liblam.so" is)

Running
	ldd /home/francke/R/x86_64-unknown-linux-gnu-library/2.8/Rmpi/libs/Rmpi.so
still gives the same output as above.

Nevertheless, loading Rmpi after starting R still prints the same error.

Please let me know if you've got an idea what else I could do.

gratefully,

Melwin


Am 09.07.2009, 16:44 Uhr, schrieb Hao Yu <hyu at stats.uwo.ca>:
--