text: /*
   * mpi1.c
   *
   *  Created on: 2011-11-08
   *      Author: francis
   */
  
  #include <stdio.h>
  #include <mpi.h>
  
  int main(int argc, char **argv)
  {
  	int numprocs, rank, namelen;
  	char processor_name[MPI_MAX_PROCESSOR_NAME];
  
  	MPI_Init(&argc, &argv);
  	MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
  	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  	MPI_Get_processor_name(processor_name, &namelen);
  	printf("Process %d on %s out of %d\n", rank, processor_name, numprocs);
  	MPI_Finalize();
  	return 0;
  }
  