This source file includes following definitions.
- main
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 #include <stdio.h>
  12 #include <shmem.h>
  13 
  14 int main (void)
  15 {
  16     static int aaa, bbb;
  17     int num_pes, my_pe, peer;
  18 
  19     shmem_init();
  20 
  21     num_pes = shmem_n_pes();
  22     my_pe = shmem_my_pe();
  23 
  24     peer = (my_pe + 1) % num_pes;
  25 
  26     printf("Process %d gets message from %d (%d processes in ring)\n", my_pe, peer, num_pes);
  27     shmem_int_get(&aaa, &bbb, 1, peer);
  28 
  29     shmem_barrier_all();
  30     printf("Process %d exiting\n", my_pe);
  31     shmem_finalize();
  32 
  33     return 0;
  34 }
  35