MPI
Program Lab06, share.c
--Input a number with scanf, broadcast this value to other
"nodes"/processes
uses:
MPI_Send(),
and MPI_Recv()
(Vers. 1)
MPI_Bcast()
(Vers. 2)
also see MPI Data
types
NOTE: Place the call to MPI_Bcast outside of the "if (rank == 0)"
block:
if (rank == 0) {
scanf( ... );
}
MPI_Bcast( ... ); //MPI_Bcast is like a combination send/receive,
//so each process needs it