bcast-method {pbdMPI} | R Documentation |
This method lets a rank broadcast an object to every rank in the same communicator. The default return is the object.
bcast(x, rank.source = .pbd_env$SPMD.CT$rank.source, comm = .pbd_env$SPMD.CT$comm)
x |
an object to be broadcast from all ranks. |
rank.source |
a rank of source where |
comm |
a communicator number. |
The same copy of x
is sent to all ranks.
Every rank has x
returned.
For calling spmd.bcast.*
:
signature(x = "ANY")
signature(x = "integer")
signature(x = "numeric")
signature(x = "raw")
Wei-Chen Chen wccsnow@gmail.com, George Ostrouchov, Drew Schmidt, Pragneshkumar Patel, and Hao Yu.
Programming with Big Data in R Website: http://r-pbd.org/
scatter()
.
## Not run: ### Save code in a file "demo.r" and run with 2 processors by ### SHELL> mpiexec -np 2 Rscript demo.r ### Initial. suppressMessages(library(pbdMPI, quietly = TRUE)) init() ### Examples. x <- matrix(1:5, nrow = 1) y <- bcast(x) comm.print(y) ### Finish. finalize() ## End(Not run)