/* $Id: hello.c 1262 2006-11-01 17:08:13Z olau $ */

#include <stdio.h>
#include <mpi.h>

int main(int argc, char *argv[]) {
  int myrank;
  int size;
  char cpu_name[MPI_MAX_PROCESSOR_NAME+1];
  int result_len;

  MPI_Init(&argc, &argv);
  MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
  MPI_Comm_size(MPI_COMM_WORLD, &size);
  MPI_Get_processor_name(cpu_name, &result_len);
  cpu_name[result_len] = 0; // String terminieren
  printf("Hier ist Job %d von %d auf %s\n",
         myrank, size, cpu_name);
  MPI_Finalize();
  return 0;
}
