#include "mpi.h" #include int main (int nargs, char** args) { int size, rank; char message[100]; MPI_Init (&nargs, &args); MPI_Comm_size (MPI_COMM_WORLD, &size); MPI_Comm_rank (MPI_COMM_WORLD, &rank); sprintf(message,"Hello world, I've rank %d out of %d procs.\n",rank, size); if (rank>0) MPI_Send (message, strlen(message)+1, MPI_CHAR, 0, 100, MPI_COMM_WORLD); else { MPI_Status status; int i; printf (message); for (i=1; i