Skip to content
Prev 26297 / 63424 Next

Rmpi_0.5-4 and OpenMPI questions

Hi Dirk,

Thank for pointing out additional flags needed in order to compile Rmpi
correctly. Those flags can be added in configure.ac once openmpi dir is
detected. BTW -DMPI2 flag was missed in your Rmpi since the detection of
openmpi was not good. It should be
####
        if test -d  ${MPI_ROOT}/lib/openmpi; then
                echo "Found openmpi dir in ${MPI_ROOT}/lib"
                MPI_DEPS="-DMPI2"
        fi
####

I tried to run Rmpi under snow and got the same error messenger. But after
checking makeMPIcluster, I found that n=3 was a wrong argument. After
makeMPIcluster finds that count is missing,
count=mpi.comm.size(0)-1 is used. If you start R alone, this will return
count=0 since there is only one member (master). I do not know why snow
did not use count=mpi.universe.size()-1 to find total nodes available.
Anyway after using
cl=makeMPIcluster(count=3),
I was able to run parApply function.

I tried
R -> library(Rmpi) -> library(snow) -> c1=makeMPIcluster(3)

Also
mpirun -host hostfile -np 1 R --no-save
library(Rmpi) -> library(snow) -> c1=makeMPIcluster(3)

Hao

PS: hostfile contains all nodes info so in R mpi.universe.size() returns
right number and will spawn to remote nodes.

Rmp under Debian 3.1 and openmpi 1.2.4 seems OK. I did find some missing
lib under Debian 4.0.
Dirk Eddelbuettel wrote: