The openMPIcluster function is used to create an MPI cluster
object in a cluster worker. It is never executed by the master process.
Unlike startMPIcluster, it does not actually launch workers. It
simply creates an MPI cluster object, which is passed to the
workerLoop function. It is used internally in spawn mode, but it
also needs to be used in doMPI scripts that are started in
non-spawn mode.
Indicates if a true MPI broadcast should be used to send
shared “job” data to the workers. If FALSE is specified, the
data is sent by separate messages to each worker, which is sometimes
faster than using a broadcast. So this option really controls whether
to do a real or an emulated broadcast. Defaults to TRUE.
comm
The MPI communicator number. This should always be
0 when called from non-spawn mode.
Defaults to 0.
workerid
The rank of the worker calling openMPIcluster.
verbose
Indicates if verbose messages should be enabled.
Defaults to FALSE.
mtag
Tag to use for messages sent to the master.
Do not use this option unless you know what you're doing, or
your program will very likely hang.
Defaults to 10.
wtag
Tag to use for messages sent to the workers.
Do not use this option unless you know what you're doing, or
your program will very likely hang.
Defaults to 11.
Note
Make sure that openMPIcluster is called consistently with
startMPIcluster, otherwise your program will hang.
In particular, make sure that bcast is set the same, and that
comm is 0, which is the default value.
Examples
## Not run:
# make an MPI cluster object with emulated broadcast:
cl <- openMPIcluster(bcast=FALSE)
## End(Not run)