MPI_BCAST( buffer, count, datatype, root, comm ) | |
INOUT buffer | starting address of buffer (choice) |
IN count | number of entries in buffer (non-negative integer) |
IN datatype | data type of buffer (handle) |
IN root | rank of broadcast root (integer) |
IN comm | communicator (handle) |
int MPI_Bcast(void* buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm )
MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR)
If comm is an intracommunicator,
MPI_BCAST broadcasts a message from
the process with rank root to all processes
of the group, itself included.
It is called by all members of
the
group using the same arguments for
comm
and
root.
On return, the
content of root's buffer is copied to all other processes.
General, derived datatypes are allowed for datatype.
The type signature of count, datatype on any process must
be equal to the type signature of count, datatype at the root.
This implies that the amount of data sent must be equal to the amount received,
pairwise between each process and the root.
MPI_BCAST and all other data-movement collective routines
make this restriction.
Distinct type maps between sender and receiver are still allowed.
The ``in place'' option is not meaningful here.
If comm is an intercommunicator, then the call involves all
processes in the intercommunicator, but with one group (group A) defining the
root process. All processes in the other group (group B) pass the same value
in argument
root, which is the rank of the root in group A. The root
passes the value MPI_ROOT in root.
All other processes in group A pass the value MPI_PROC_NULL in
root.
Data is broadcast from the root to all processes in group B.
The
buffer arguments of the processes in group B must be consistent with
the buffer argument of the root.
<type> BUFFER(*)
INTEGER COUNT, DATATYPE, ROOT, COMM, IERROR
{ void MPI::Comm::Bcast(void* buffer, int count, const MPI::Datatype& datatype, int root) const = 0 (binding deprecated, see Section Deprecated since MPI-2.2
) }
Up: Contents
Next: Example using MPI_BCAST
Previous: Barrier Synchronization
Return to MPI-2.2 Standard Index
Return to MPI Forum Home Page
(Unofficial) MPI-2.2 of September 4, 2009
HTML Generated on September 10, 2009