root/orte/test/mpi/hello_barrier.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_Barrier(MPI_COMM_WORLD);
  17     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  18     MPI_Comm_size(MPI_COMM_WORLD, &size);
  19 
  20     printf("Hello, World, I am %d of %d\n", rank, size);
  21 
  22     MPI_Finalize();
  23     return 0;
  24 }

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