[R-sig-hpc] Problems Installing Rmpi on openSUSE 11.1 x86_64

Melwin win at comets.de
Thu Jul 9 15:47:55 CEST 2009


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:

> library("Rmpi")
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:
> library("Rmpi")
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>:
> Hi Melwin,
>
> Did you try
>
> R CMD INSTALL Rmpi_0.5-7.tar.gz --configure-args=--with-mpi=/path_to_lam
>
> Your system may have several mpi and Rmpi did not find a right mpi.
>
> BTW, when you are installing lam, make sure to turn dynamic lib on. The
> default one is static one and Rmpi needs libmpi.so to work.
>
> Hao
>
> Melwin wrote:
>> Thanks for the reply.
>>
>> 2009/6/24 Rowe, Brian Lee Yung (Portfolio Analytics) <B_Rowe at ml.com>:
>>> Did you confirm that your MPI installation is working? That is the
>>> probably the first step.
>> LAM seems to work ok:
>>    johnson at linuxmodel:~> lamboot -v
>>
>>    LAM 7.1.4/MPI 2 C++/ROMIO - Indiana University
>>
>>    n-1<4165> ssi:boot:base:linear: booting n0 (localhost)
>>    n-1<4165> ssi:boot:base:linear: finished
>>    johnson at linuxmodel:~> lamexec C hostname
>>    linuxmodel
>>
>>
>>> Regarding LD_LIBRARY_PATH, since I don't know what your configuration
>>> is, make sure you export it to your environment and also don't  
>>> overwrite
>>> any existing values.
>>>  i.e. This is better:
>>>  $ export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
>>> since it looks like you're on a 64 bit platform.
>>
>> Tried that. Same results as before:
>>    johnson at linuxmodel:~>     R CMD INSTALL Rmpi_0.5-7.tar.gz
>>    * Installing to library
>> '/home/johnson/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
>>    checking for main in -lmpi... no
>>    libmpi not found. exiting...
>>    ERROR: configuration failed for package 'Rmpi'
>>    ** Removing  
>> '/home/johnson/R/x86_64-unknown-linux-gnu-library/2.8/Rmpi'
>>
>>> I use OpenMPI and it include an mpi-based compiler which I found to  
>>> work
>>> better than gcc directly. You might try that. Just make sure you export
>>> your MPI_ROOT.
>> I would love to use OpenMPI, but I gather the slave spawning from  
>> within R
>> is not yet possible - which is what I need in interactive mode
>> (https://stat.ethz.ch/pipermail/r-sig-hpc/2009-February/000104.html).  
>> I'd
>> love to hear that this has changed.
>>
>>> It would also probably help to include a bit more output
>>> from the compilation process.
>> The dump above contains the entire output, I hope that helps.
>>
>> thanks again,
>> Melwin
>>
>> _______________________________________________
>> 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



More information about the R-sig-hpc mailing list