#include <iostream>
#include <mpi.h>

int main(int argc, char *argv[])
{
  int rank,nproc;

  MPI_Init(&argc,&argv);

  MPI_Comm_size(MPI_COMM_WORLD,&nproc);
  MPI_Comm_rank(MPI_COMM_WORLD,&rank);

  std::cout << "Hello C++ parallel world, I am process " << rank <<
    " out of " << nproc << "\n";

  MPI_Finalize(); return 0;
}
