> 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
> cl <- startMPIcluster(count=2)
> 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)
>  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?