Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / teshsuite / smpi / mpich3-test / pt2pt / sendall.c
index d344e24..2f87e47 100644 (file)
@@ -28,6 +28,7 @@ int main ( int argc, char *argv[] )
   int i;
   int count, size;
   int self, npes;
+  double secs;
   MPI_Request request[MAXPES];
   MPI_Status status;
 
@@ -43,6 +44,7 @@ int main ( int argc, char *argv[] )
   }
 
   for (size = 1; size  <= MYBUFSIZE ; size += size) {
+      secs = -MPI_Wtime ();
       for (count = 0; count < NUM_RUNS; count++) {
          MPI_Barrier (MPI_COMM_WORLD);
 
@@ -64,8 +66,10 @@ int main ( int argc, char *argv[] )
 
        }
       MPI_Barrier (MPI_COMM_WORLD);
+      secs += MPI_Wtime ();
 
       if (self == 0) {
+         secs = secs / (double) NUM_RUNS;
          MTestPrintfMsg( 1, "length = %d ints\n", size );
        }
     }