[R-sig-hpc] Problems Installing Rmpi

Rick B. rab at consolidated.net
Tue May 12 19:44:13 CEST 2009


On Tue, 2009-05-12 at 09:51 -0400, Hao Yu wrote:
> Can you change configure.ac with
> ###################################
> AC_INIT(DESCRIPTION)
> 
> AC_PROG_CC
> 
> AC_ARG_WITH(mpi,
> [   --with-mpi=/opt/lib32/usr/lib          Location of MPI library.],
> [   if test "${withval}" != no; then
>         MPI_ROOT=${withval}
>         MPI_INCLUDE="-I${MPI_ROOT}/include"
>         LDFLAGS="$LDFLAGS -L${withval}/lib"
>         CFLAGS="$CFLAGS -I${withval}/include"
>     fi  ]
> )
> MPITYPE="OPENMPI"
> MPI_DEPS="-DMPI2"
> AC_CHECK_LIB(util, openpty, [ MPI_LIBS="$MPI_LIBS -lutil" ])
> AC_CHECK_LIB(pthread, main, [ MPI_LIBS="$MPI_LIBS -lpthread" ])
> 
> PKG_LIBS="${MPI_LIBS} -fPIC"
> PKG_CPPFLAGS="${MPI_INCLUDE} ${MPI_DEPS} -D${MPITYPE} -fPIC"
> 
> AC_SUBST(PKG_LIBS)
> AC_SUBST(PKG_CPPFLAGS)
> AC_SUBST(DEFS)
> 
> AC_OUTPUT(src/Makevars)
> ###################################
> Then, run "autoconf" to generate a new "configure" file. Use build to
> build a new tgz file and install again.
> 
> If you look the original configure.ac, there is no place where mpi.h is
> appended to ${MPI_INCLUDE}. I don't know why the OS does such a way.
> 
> Hao
> 

I've tried to follow your instructions, but the best I can do is:

[root at rab45-1 rick]# R CMD INSTALL Rmpi
--configure-args=--with-mpi=/usr/lib64/openmpi/1.2.7-gcc
* Installing to library '/usr/lib64/R/library'
* 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 ANSI C... none needed
Try to find mpi.h ...
Found in /usr/lib64/openmpi/1.2.7-gcc/include
Try to find libmpi.so or libmpich.a
Found libmpi in /usr/lib64/openmpi/1.2.7-gcc/lib
checking for openpty in -lutil... yes
checking for main in -lpthread... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -I/usr/lib64/R/include -I/usr/lib64/openmpi/1.2.7-gcc/include/mpi.h
-I/usr/local/include    -fpic  -O3 -g -std=gnu99 -c conversion.c -o
conversion.o
cc1: error: /usr/lib64/openmpi/1.2.7-gcc/include/mpi.h: not a directory
make: *** [conversion.o] Error 1
chmod: cannot access `/usr/lib64/R/library/Rmpi/libs/*': No such file or
directory
ERROR: compilation failed for package 'Rmpi'
** Removing '/usr/lib64/R/library/Rmpi'


mpi.h is always appended to -I/usr/lib64/openmpi/1.2.7-gcc/include when
compiling with gcc. If I go into src and run:

gcc -I/usr/lib64/R/include -I/usr/lib64/openmpi/1.2.7-gcc/include/mpi.h
-I/usr/local/include    -fpic  -O3 -g -std=gnu99 -c conversion.c -o
conversion.o

It compiles without errors or warnings. I cannot find where mpi.h is
being appended and the compile command is being generated.

Is there some 64-bit Linux that I can install so that Rmpi will install
and run out of the box? All I need is the ability to run R and Rmpi.

Thanks.

Rick B.



More information about the R-sig-hpc mailing list