#include #include #include "mpi.h" /* Root sends out a msg to every proc and receives answers back */ int main(int argc, char **argv ){ char message[20]; int i; int rank; int worker; int size; int tag = 0; MPI_Status status; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD,&size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); if(rank == 0) { printf("Welcome to MPI\n"); printf("The number of processes :: %d\n", size); strcpy(message, "Hello, world"); /* Root sends out a msg to every proc */ for (i=1; i