#include #include int main(int argc, char** argv) { int rank, size; /* initialize MPI */ MPI_Init(&argc, &argv); /* get the rank (process id) and size (number of processes) */ MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); /* print a hello message */ printf("Hello from process %d of %d!\n", rank, size); /* quit MPI */ MPI_Finalize(); return 0; }