mpi.gather.Robj gathers each member's object to the member
specified by the argument
The root member receives the objects as a list.
mpi.allgather.Robj is the same as
except that all members receive the result instead of just the root.
1 2 3
data to be gathered. Could be different type.
rank of the gather
a communicator number
optional arugments to
Since sapply is used to gather all results, its default option "simplify=TRUE" is to simplify outputs. In some situations, this option is not desirable. Using "simplify=FALSE" as in the place of ... will tell sapply not to simplify and a list of outputs will be returned.
mpi.gather.Robj, it returns a list, the gathered message
for the root member. For
mpi.allgatherv.Robj, it returns a list, the gathered message
for all members.
Hao Yu and Wei Xia
1 2 3 4 5 6 7 8 9 10 11 12
#Assume that there are some slaves running mpi.bcast.cmd(id<-mpi.comm.rank()) mpi.bcast.cmd(x<-rnorm(id)) mpi.bcast.cmd(mpi.gather.Robj(x)) x<-"test mpi.gather.Robj" mpi.gather.Robj(x) mpi.bcast.cmd(obj<-rnorm(id+10)) mpi.bcast.cmd(nn<-mpi.allgather.Robj(obj)) obj<-rnorm(5) mpi.allgather.Robj(obj) mpi.remote.exec(nn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.