Skip to content

Error in makeMPIcluster(spec, ...): how to get a minimal example for parallel computing with doSNOW to run?

1 message · Marius Hofert

#
Dear all,

I received the following feedback from the maintainers of the cluster "Brutus". 

## begin quotation 

All MPI processes are launched by mpirun when your job starts. Rmpi simply queries
those processes to find out their number and ranks. In other words, the R
"cluster" is already up and running when Rmpi (or doMPI, doSNOW) starts. That is
the reason you cannot spawn slaves or create a new cluster using
mpi.spawn.Rslaves(), startMPIcluster() or makeCluster().

The proof is that the "hello world" example runs without error on Brutus if you
remove the mpi.spawn.Rslaves() statement.

I believe the problem in the present case is that registerDoMPI(cl) and
registerDoSNOW(cl) require a "cluster" (cl) as argument. Unlike Rmpi, they are
unable to use the pre-existing (and unnamed) cluster started by mpirun.