#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 */ std::cout << "Hello from process " << rank << " of " << size << "!" << std::endl; /* quit MPI */ MPI_Finalize(); return 0; }