#include #include #include "mpi.h" /* MPI Send and Recv Example */ int main(int argc, char **argv ) { char message[20]; int i, rank, size, tag=0; MPI_Status status; /* MPI pre-defined status struc */ MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); strcpy(message, "Empty"); /* Initialize the string array */ if(rank == 0) { printf("Welcome to MPI\n"); printf("The number of processes :: %d\n", size); strcpy(message, "Hello, world"); /* Root overwrites its string array */ for (i=1; i