registerDoMPI {doMPI} | R Documentation |
The registerDoMPI
function is used to register doMPI
with the foreach package. Specifically, you register a particular
cluster object which will be used when executing the %dopar% operator.
The cluster object is created using startMPIcluster
.
registerDoMPI(cl)
cl |
The cluster object to use for parallel execution. |
## Not run:
# start and register an MPI cluster with two workers:
cl <- startMPIcluster(2)
registerDoMPI(cl)
## End(Not run)