mpi.bcast.cmd {Rmpi}R Documentation

Extension of MPI_Bcast API

Description

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.

Usage

mpi.bcast.cmd(cmd=NULL, rank = 0, comm = 1)

Arguments

cmd a command to be sent for master.
rank the sender
comm a communicator number

Details

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.

Value

mpi.bcast.cmd returns no value for the sender and an expression of the transmitted command for others.

Author(s)

Hao Yu

See Also

mpi.remote.exec


[Package Rmpi version 0.5-5 Index]