root/orte/test/mpi/multi_abort.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main

   1 /* -*- C -*-
   2  *
   3  * $HEADER$
   4  *
   5  * The most basic of MPI applications
   6  */
   7 
   8 #include <stdio.h>
   9 #include "mpi.h"
  10 
  11 int main(int argc, char* argv[])
  12 {
  13     int rank, size;
  14 
  15     MPI_Init(&argc, &argv);
  16     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  17     MPI_Comm_size(MPI_COMM_WORLD, &size);
  18 
  19     printf("Hello, World, I am %d of %d\n", rank, size);
  20 
  21     if (0 != rank) MPI_Abort(MPI_COMM_WORLD, rank);
  22 
  23     MPI_Finalize();
  24     return 0;
  25 }

/* [<][>][^][v][top][bottom][index][help] */