[R-sig-hpc] Problems Installing Rmpi

Rick B. rab at consolidated.net
Wed May 13 20:59:01 CEST 2009


On Wed, 2009-05-13 at 10:53 -0400, Rowe, Brian Lee Yung (Portfolio
Analytics) wrote:
> Hi Rick,
> 
> I just got Rmpi installed on a 16 CPU RHEL 4 box with OpenMPI. It took
> quite a bit of fiddling of environment variables, but I did manage to
> get it to work using mpicc (which incidentally does make life a bit
> easier than trying to use gcc directly).
> 
> For the error below, what I had to do was explicitly add my MPI
> include library to C_INCLUDE_PATH. The other thing I had to do was set
> MPI_ROOT explicitly to the location of my OpenMPI installation. I only
> figured this out by looking at Rmpi's configure.ac and looking at the
> configure output at the 'Try to find mpi.h ...' stage, no echo was
> output meaning that it was falling back to the default. I think this
> has to do with the behavior/interoperability of mpicc and Rmpi.
> 
> In short, if you set your C_INCLUDE_PATH and MPI_ROOT (and
> LD_LIBRARY_PATH if you haven't done that), you should be able to get
> it to compile.
> 
> HTH, 
> Brian
> 
> 
> On Mon, 2009-05-11 at 10:09 -0400, Sean Davis wrote:
> > Did you try:
> >
> > # assumes that mpicc is in the PATH
> > CC=mpicc R CMD INSTALL Rmpi_0.5-7.tar.gz
> >
> > This has worked for me on openSUSE in the past.
> >
> > Sean
> 
> 
> Thanks. mpicc is in the path, but this fails -  it cannot find mpi.h.
> If
> I include "--configure-args=--with-mpi=/usr/lib64/openmpi/1.2.7-gcc"
> it
> fails the same way as before.
> 
> Why is the Rmpi script asking for a directory but passing a file name?
> 
> Rick B.


It had no problem finding mpi.h. The problem now is that the configure
generates an incorrect compile command:

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 appendend to the -I/usr/lib64/openmpi/1.2.7-gcc/include and the
compile fails because it just wants the folder, not the file.

Rick B.



More information about the R-sig-hpc mailing list