mpi.bcast.cmd {Rmpi} | R Documentation |
mpi.bcast.cmd
is an extension of mpi.bcast
.
It is mainly used to transmit a command from master to all R slaves
spawned by using slavedaemon.R script.
mpi.bcast.cmd(cmd=NULL, rank = 0, comm = 1)
cmd |
a command to be sent for master. |
rank |
the sender |
comm |
a communicator number |
deparse
is used to convert a command into a char vector.
Some syntax errors of the command will be automatically detected by
deparse
. Then the char vector is broadcasted to all members. After
receiving the char vector, the receivers use parse
to convert
the char vector into an expression. Finally slavedaemon.R script will evaluate
this expression. Hence mpi.bcast.cmd
is only used by slavedaemon.R,
or by whatever a R script based on slavedaemon.R. Please use
mpi.remote.exec
if you want the executed results returned from R
slaves.
mpi.bcast.cmd
returns no value for the sender and an expression
of the transmitted command for others.
Hao Yu