MPI_Bcast:
distribute to all processes witnin the communicator an identical piece of data.
Function Call Syntax:
int MPI_Bcast(void *buffer, /*starting address of the send buffer*/
int count, /*number of elements in the send buffer*/
MPI_Datatype datatype,
int root, /*rank of the process brocasting its data*/
MPI_Common comm);
example1:
/**
* MPI_Bcast.
*/
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#define N 3
int main(int argc, char *argv[])
{
int i, myrank, nprocs;