Skip to content
Prev 1796 / 2152 Next

Help with doMPI on multiple cores on a cluster

As a note, it is safe to start all of the MPI processes using 'mpirun
-n 32' with the doMPI package because startMPIcluster doesn't spawn
any workers if mpi.comm.size(0) > 1, at least by default.  In that
case, startMPIcluster calls the worker loop function if the rank is
greater than zero so that only rank 0 actually returns from
startMPIcluster in order to execute the rest of the R script.

I usually let mpirun start all of the MPI processes when using doMPI
because it appears that broadcasting is more efficient in that case,
at least when using Open MPI.  It also makes it easy to initialize the
workers in a SPMD style.

- Steve
On Mon, Oct 21, 2013 at 11:56 AM, Lockwood, Glenn <glock at sdsc.edu> wrote: