Loris Bennett <loris.benn...@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.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to