/* This is a simple MPI program. It uses the six basic MPI functions to make */ /* a complete MPI program. */ /* Classroom demonstration */ /* Xianong Meng UTPA-CS */ /* modified sep-5-2000 */ #include #include #include "mpi.h" main(int argc, char **argv ) { char message[20]; int i,rank, id, size, type=99; MPI_Status status; MPI_Init(&argc, &argv); /* start MPI */ MPI_Comm_size(MPI_COMM_WORLD,&size); /* get communicator size */ MPI_Comm_rank(MPI_COMM_WORLD, &rank);/* get my own rank */ if(rank == 0) { /* parent process */ strcpy(message, "Hello, world"); for (i=1; i