/********************************************************************** * A simple "hello world" program for MPI/C * * Andreas Kähäri * 1999-12-29 **********************************************************************/ #include #include int main(int argc, char *argv[]) { int size, rank; MPI_Init(&argc, &argv); /* Initialize MPI */ MPI_Comm_size(MPI_COMM_WORLD, &size); /* Get the number of processors */ MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* Get my number */ printf("Hello World!\n"); /* Print a message */ MPI_Finalize(); /* Shut down and clean up MPI */ return 0; }