Hello World:C Example of Send and Receive
# All processes execute this program
main( int argc, char **argv )
{
- char message[20];
- int i, rank, size, tag=137; # Any value of tag allowed
- MPI_Status status;
- MPI_Init (&argc, &argv);
- MPI_Comm_size(MPI_COMM_WORLD, &size) # Number of Processes
- MPI_Comm_rank(MPI_COMM_WORLD, &rank); # Who is this process