#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include "mpi.h"

int main (int argc, char * argv[])
{
  int size;
  int rank;
  char myhostname[256];

  MPI_Init (&argc, &argv);
  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
  MPI_Comm_size (MPI_COMM_WORLD, &size);

  gethostname(myhostname, sizeof(myhostname));
  printf ("(Rank:%d) Size:%d PID:%ld hostname:%s\n",
          rank, size, (long int) getpid(), myhostname); 

  MPI_Finalize ();
  return 0;
}
