PVM.scatter {rpvm} | R Documentation |
Sends to each member of a group a section of a vector from a specified member of the group (the root).
.PVM.scatter (x, count, msgtag, group, rootginst = 0)
x |
an integer or double vector on the root which are to be
distributed to the members of the group. If n is the number
of members in the group, then this vector should be of length at
least n * count. This argument is
meaningful only on the root. |
count |
an integer specifying the number of elements to be sent to each member of the group from the root. |
msgtag |
an integer message tag supplied by the user. |
group |
a character string naming the group |
rootginst |
an integer instance number of group member who performs the scatter of its array to the members of the group. |
.PVM.scatter
performs a scatter of data from the specified
root member of the group to each of the members of the group,
including itself. All group members must call .PVM.scatter
,
each receives a portion of the data array from the root in their
local result array. It is as if the root node sends to the
ith member of the group count elements from its array data
starting at offset i * count from the
beginning of the data array. And, it is as if, each member of the
group performs a corresponding receive of count values of datatype
into its result array. The root task is identified by its instance
number in the group.
x
has to be a vector of storage mode integer or double. The
.PVM.scatter
function just calls stop ()
.
a vector of length count
Na (Michael) Li nali@umn.edu and A.J. Rossini rossini@u.washington.edu
PVM documentation
.PVM.joingroup
, .PVM.gather
,
.PVM.reduce
, .PVM.bcast
gname <- "pvmtest" ## Not run: myrow <- .PVM.scatter(as.integer (1:100), 10, msgtag = 11, group = gname, root = 0) ## End(Not run)