/************************************************************************ * Write an MPI "hello World!" program using the appropriate MPI calls. ************************************************************************/ /************************** 1.Include the header **************************/ #include #include void main(int argc, char *argv[]) { char message[20]; MPI_Status status; int i,rank, size, tag=11; /************************** 2.Initialize MPI **************************/ MPI_Init(&argc, &argv); /************************** 3.Find out my rank in the global communicator MPI_COMM_WORLD **************************/ MPI_XXXX_XXXX(MPI_COMM_WORLD, &rank); /************************** 4.Find out the size of the global communicator MPI_COMM_WORLD **************************/ MPI_XXXX_XXXX(MPI_COMM_WORLD,&size); /************************** 5.Check the rank, and **************************/ if(XXXXXXXXX) { /************************** a.if the process is the master, then send a "Hello,World!" message, in characters, to each of the workers. **************************/ strcpy(message, "Hello,World!"); for (i=1; i