[R] doMPI: script hangs on closeCluster
Loris Bennett
lori@@bennett @ending from fu-berlin@de
Mon Jul 2 14:28:31 CEST 2018
Hi,
On Linux with R 3.5.1 and OpenMPI 2.1.0 I have built Rmpi and can run a
simple example just using Rmpi and printing out the rank of each worker.
However, when I try to use doMPI by running the following
library(Rmpi)
library(doMPI)
cl <- startMPIcluster(count=2)
registerDoMPI(cl)
clusterSize(cl)
closeCluster(cl)
mpi.quit()
with
mpirun -np 1 --mca mpi_warn_on_fork 0 R --no-save -f mwe.r
I get the following output
> library("Rmpi")
> library(doMPI)
Loading required package: foreach
Loading required package: iterators
> cl <- startMPIcluster(count=2)
2 slaves are spawned successfully. 0 failed.
> registerDoMPI(cl)
> clusterSize(cl)
[1] 2
> closeCluster(cl)
but the program hangs and I have to end it with Ctl-C.
Can anyone shed any light on what might be wrong?
Cheers,
Loris
--
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.bennett using fu-berlin.de
More information about the R-help
mailing list