Re: [R] Installing Rmpi on hpc

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon, 14 Mar 2011 17:53:51 +0000 (GMT)

On Mon, 14 Mar 2011, Brian Smith wrote:

> Hi,
>
> I was trying to install the package Rmpi on a hpc cluster running SGE. The

Which is what? (If Sun Grid Engine, not relevant and it is your unstated OS that we needed to know. Not just 'Linux', but the precise distro.))

Please do note the posting guide: your R is several versions old, for example, and this was an R-devel question (most questions about installing wrapper packages will be, since they are almost nothing to do with the R language).

The symptoms you post are those of finding a 32-bit libmpi on a 64-bit install. Please consult the documentation for Rmpi and set the RMPI* environment variables appropriately for your installed 64-bit libmpi (regratably Rmpi does not use the recommended methods and so often needs to be overridden). Also, most modern OSes use OpenMPI and not lam, so see if you can use the former.

One guess is that it needs to be told to look in /usr/lib64/lam. OTOH, for x86_64 Fedora 14 I am using

setenv RMPI_INCLUDE /usr/include/openmpi-x86_64
setenv RMPI_LIB_PATH /usr/lib64/openmpi/lib
setenv RMPI_TYPE OPENMPI


> command, and the sessionInfo() is as follows:
>
> ===========================================
>> install.packages("Rmpi",dependencies=TRUE)
> also installing the dependency ?rsprng?
>
> trying URL '
> http://www.ibiblio.org/pub/languages/R/CRAN/src/contrib/rsprng_1.0.tar.gz'
> Content type 'application/x-gzip' length 35916 bytes (35 Kb)
> opened URL
> ==================================================
> downloaded 35 Kb
>
> trying URL '
> http://www.ibiblio.org/pub/languages/R/CRAN/src/contrib/Rmpi_0.5-9.tar.gz'
> Content type 'application/x-gzip' length 87953 bytes (85 Kb)
> opened URL
> ==================================================
> downloaded 85 Kb
>
> * installing *source* package ?rsprng? ...
> 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 ANSI C... none needed
> Try to find sprng.h ...
> checking how to run the C preprocessor... gcc -E
> checking for egrep... grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking sprng.h usability... no
> checking sprng.h presence... no
> checking for sprng.h... no
> Cannot find sprng 2.0 header file.
> ERROR: configuration failed for package ?rsprng?
> * removing ?/home/bs/R_home/R-2.11.1/library/rsprng?

Well, first you need to install sprng-2.0b

> * installing *source* package ?Rmpi? ...
> checking for gcc... gcc -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 gcc -std=gnu99 accepts -g... yes
> checking for gcc -std=gnu99 option to accept ISO C89... none needed
> I am here /usr/lib/lam and it is LAM
> Trying to find mpi.h ...
> Found in /usr/lib/lam/include
> Trying to find libmpi.so or libmpich.a ...
> Found libmpi in /usr/lib/lam/lib
> Try to find liblam.so ...
> Found liblam in /usr/lib/lam/lib
> 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/home/bs/R_home/R-2.11.1/include -DPACKAGE_NAME=\"\"
> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
> -DPACKAGE_BUGREPORT=\"\" -I/usr/lib/lam/include -DMPI2 -DLAM
> -I/usr/local/include -fpic -g -O2 -c RegQuery.c -o RegQuery.o
> gcc -std=gnu99 -I/home/bs/R_home/R-2.11.1/include -DPACKAGE_NAME=\"\"
> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
> -DPACKAGE_BUGREPORT=\"\" -I/usr/lib/lam/include -DMPI2 -DLAM
> -I/usr/local/include -fpic -g -O2 -c Rmpi.c -o Rmpi.o
> gcc -std=gnu99 -I/home/bs/R_home/R-2.11.1/include -DPACKAGE_NAME=\"\"
> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
> -DPACKAGE_BUGREPORT=\"\" -I/usr/lib/lam/include -DMPI2 -DLAM
> -I/usr/local/include -fpic -g -O2 -c conversion.c -o conversion.o
> gcc -std=gnu99 -I/home/bs/R_home/R-2.11.1/include -DPACKAGE_NAME=\"\"
> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
> -DPACKAGE_BUGREPORT=\"\" -I/usr/lib/lam/include -DMPI2 -DLAM
> -I/usr/local/include -fpic -g -O2 -c internal.c -o internal.o
> gcc -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so RegQuery.o Rmpi.o
> conversion.o internal.o -L/usr/lib/lam/lib -lmpi -llam -lutil -lpthread
> /usr/bin/ld: skipping incompatible /usr/lib/lam/lib/libmpi.so when searching
> for -lmpi
> /usr/bin/ld: skipping incompatible /usr/lib/lam/lib/libmpi.a when searching
> for -lmpi
> /usr/bin/ld: cannot find -lmpi
> collect2: ld returned 1 exit status
> make: *** [Rmpi.so] Error 1
> ERROR: compilation failed for package ?Rmpi?
> * removing ?/home/bs/R_home/R-2.11.1/library/Rmpi?
>
> The downloaded packages are in
> ?/tmp/RtmpShmM5e/downloaded_packages?
> Updating HTML index of packages in '.Library'
> Warning messages:
> 1: In install.packages("Rmpi", dependencies = TRUE) :
> installation of package 'rsprng' had non-zero exit status
> 2: In install.packages("Rmpi", dependencies = TRUE) :
> installation of package 'Rmpi' had non-zero exit status
>>
>
>
>
>
>> sessionInfo()
> R version 2.11.1 (2010-05-31)
> x86_64-unknown-linux-gnu
>
> locale:
> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
> [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8
> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> loaded via a namespace (and not attached):
> [1] tools_2.11.1
>>
>
>
> Is there something else that I need to do to install this, and other
> parallel R packages?
>
> thanks!
>
> [[alternative HTML version deleted]]
>
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 14 Mar 2011 - 17:58:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 14 Mar 2011 - 18:20:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive