Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Massive mv to use cmake as the default compilation infrastructure.
[simgrid.git] / examples / smpi / barrier.c
index 31e605d..57dbab7 100644 (file)
@@ -12,9 +12,15 @@ int main (int argc, char **argv) {
          MPI_Comm_size(MPI_COMM_WORLD, &size);
          MPI_Comm_rank(MPI_COMM_WORLD, &rank);
 
+  start_timer = MPI_Wtime();
 
   MPI_Barrier( MPI_COMM_WORLD );
+
   MPI_Barrier( MPI_COMM_WORLD );
+  if (0 == rank) {
+          printf("... Barrier ....\n");
+          printf("Elapsed=%lf s\n", MPI_Wtime() - start_timer);
+  }
 
   MPI_Finalize();
   return 0;