[R-sig-hpc] Problems Installing Rmpi

Rick B. rab at consolidated.net
Thu May 14 20:24:01 CEST 2009


Hao said:

Rick, please use
        ###################################
        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)
        ###################################
        to replace the original configure.ac completely. It is
        completely bypass
        checking mpi.h and mpi.so. In this way, OS will not append mpi.h
        to
        ${MPI_INCLUDE} (hopefully).
        
        Hao
*******************************

Thanks Hao. I replaced the original configure.ac with your code, created
a new configure using autoconf, but I get the same result:


[root at rab45-1 rick]# CC="mpicc" R CMD INSTALL Rmpi
--configure-args=--with-mpi=/usr/lib64/openmpi
* Installing to library '/usr/lib64/R/library'
* Installing *source* package 'Rmpi' ...
checking for gcc... mpicc
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 mpicc accepts -g... yes
checking for mpicc option to accept ANSI C... none needed
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'



Just to clarify, I'm using CentOS 5.3 and openmpi. To be safe, I've used
softlinks to place bin, etc, include and so forth
under /usr/lib64/openmpi:

[root at rab45-1 Rmpi]# cd /usr/lib64/openmpi
[root at rab45-1 openmpi]# ll
total 32
drwxr-xr-x 8 root root 4096 Apr 28 09:47 1.2.7-gcc
lrwxrwxrwx 1 root root   32 May 13 10:55 bin
-> /usr/lib64/openmpi/1.2.7-gcc/bin
lrwxrwxrwx 1 root root   32 May 13 10:55 etc
-> /usr/lib64/openmpi/1.2.7-gcc/etc
lrwxrwxrwx 1 root root   36 May 13 10:55 include
-> /usr/lib64/openmpi/1.2.7-gcc/include
lrwxrwxrwx 1 root root   32 May 13 10:51 lib
-> /usr/lib64/openmpi/1.2.7-gcc/lib
lrwxrwxrwx 1 root root   32 May 13 10:56 man
-> /usr/lib64/openmpi/1.2.7-gcc/man
lrwxrwxrwx 1 root root   34 May 13 10:56 share
-> /usr/lib64/openmpi/1.2.7-gcc/share


It might be easier if I just installed Ubuntu 9.04 (as Dirk indicated
openmpi and Rmpi are likely to run "out of the box").

Rick B.



More information about the R-sig-hpc mailing list