#include #include #include int main(int argc, char *argv[]) { int rank, size; //Arguments to main() made available to every MPI process MPI_Init(&argc, &argv); //Find out the current process's rank MPI_Comm_rank(MPI_COMM_WORLD, &rank); //Find out the total number of processes in the communicator MPI_Comm_size(MPI_COMM_WORLD, &size); //Everyone prints out who they are printf("Hello, world! I am %d of %d\n", rank, size); //Clean up MPI_Finalize(); return 0; }