Description Usage Arguments Note Examples
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.
1 2 | openMPIcluster(bcast=TRUE, comm=0, workerid=mpi.comm.rank(comm), verbose=FALSE,
mtag=10, wtag=11)
|
bcast |
Indicates if a true MPI broadcast should be used to send
shared “job” data to the workers. If |
comm |
The MPI communicator number. This should always be
|
workerid |
The rank of the worker calling |
verbose |
Indicates if verbose messages should be enabled.
Defaults to |
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 |
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 |
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.
1 2 3 4 5 | ## Not run:
# make an MPI cluster object with emulated broadcast:
cl <- openMPIcluster(bcast=FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.