Problems Installing Rmpi
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
Rick B. wrote:
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.
_______________________________________________ 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