Learn R Programming

doMPI (version 0.2.2)

registerDoMPI: registerDoMPI

Description

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.

Usage

registerDoMPI(cl)

Arguments

cl
The cluster object to use for parallel execution.

See Also

startMPIcluster

Examples

Run this code
## Not run: ------------------------------------
# # start and register an MPI cluster with two workers:
# cl <- startMPIcluster(2)
# registerDoMPI(cl)
## ---------------------------------------------

Run the code above in your browser using DataLab