mpi.gather.Robj {Rmpi} | R Documentation |
mpi.gather.Robj
gathers each member's object to the member
specified by the argument root
.
The root member receives the objects as a list.
mpi.allgather.Robj
is the same as mpi.gather.Robj
except that all members receive the result instead of just the root.
mpi.gather.Robj(obj=NULL, root = 0, comm = 1) mpi.allgather.Robj(obj=NULL, comm = 1)
obj |
data to be gathered. Could be different type. |
root |
rank of the gather |
comm |
a communicator number |
For 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
http://www.lam-mpi.org/, http://www-unix.mcs.anl.gov/mpi/www/www3/
## Not run: #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) ## End(Not run)