root/orte/test/mpi/nonzero.c

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

DEFINITIONS

This source file includes following definitions.
  1. main

   1 #include <stdlib.h>
   2 #include <unistd.h>
   3 #include <mpi.h>
   4 
   5 int main(int argc, char **argv)
   6 {
   7     int rank;
   8 
   9     if(argc < 2) {
  10         return 0;
  11     }
  12     MPI_Init(&argc, &argv);
  13     MPI_Comm_rank(MPI_COMM_WORLD,&rank);
  14 
  15     int i = atoi(argv[1]);
  16 
  17     MPI_Finalize();
  18 
  19     if (i != rank) {
  20         sleep(1);
  21     }
  22     return i;
  23 }

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