This source file includes following definitions.
- main
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 #include <stdio.h>
  15 #include <stdbool.h>
  16 #include <sys/types.h>
  17 #include <unistd.h>
  18 #include <stdlib.h>
  19 #include <time.h>
  20 #include <sys/time.h>
  21 
  22 #include <mpi.h>
  23 
  24 int main(int argc, char* argv[])
  25 {
  26     int nppn;
  27     struct timeval tv;
  28     char *cmd;
  29 
  30     
  31     if (2 < argc) {
  32         printf("usage: ziatest <#procs/node>\n");
  33         exit(1);
  34     }
  35 
  36     nppn = strtol(argv[1], NULL, 10);
  37 
  38     
  39 
  40     
  41     gettimeofday(&tv, NULL);
  42 
  43     
  44     opal_asprintf(&cmd, "mpirun -npernode %d ./ziaprobe %ld %d",
  45              nppn, (long) tv.tv_sec, tv.tv_usec);
  46 
  47     
  48     system(cmd);
  49 
  50     
  51     free(cmd);
  52     return 0;
  53 }