This function is used to broadcast an array to all group members. The syntax for its use
B = mpibcast(A,root,comm)
where A
is the array to broadcast, root
is the rank
of the root of the broadcast, and comm
is the communicator
to do the broadcast on. If no communicator is provided, it
defaults to MPI_COMM_WORLD
. Note that in practice, the process
running at the root will use the syntax:
mpibcast(A,root,comm),
while the remaining processes will use the syntax
B = mpibcast([],root,comm).