[R] doMPI: script hangs on closeCluster
Loris Bennett
|or|@@bennett @end|ng |rom |u-ber||n@de
Tue Jul 3 09:09:23 CEST 2018
Loris Bennett <loris.bennett using fu-berlin.de> writes:
> 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?
Having come across the following link:
https://www.sharcnet.ca/help/index.php/Using_R_and_MPI
I rebuilt with OpenMPI 1.8.6 and the problem disappeared.
Cheers,
Loris
--
This signature is currently under construction.
More information about the R-help
mailing list