Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Have an informative final message.
[simgrid.git] / teshsuite / bug-17132 / bug-17132.c
index 3cc6ed7..9cd6985 100644 (file)
@@ -18,6 +18,9 @@ int main(int argc, char ** argv)
 
   MPI_Init(&argc, &argv);
 
+  int rank;
+  MPI_Comm_rank(MPI_COMM_WORLD,&rank);
+
   double *a = malloc(sizeof(double) * M);
   double *b = malloc(sizeof(double) * N);
 
@@ -39,6 +42,10 @@ int main(int argc, char ** argv)
   // Commenting out this barrier fixes it!!
   MPI_Barrier(MPI_COMM_WORLD);
 
+  if(rank==0) {
+    printf("Walltime = %g\n",MPI_Wtime());
+  }
+
   MPI_Finalize();
   free(a);
   free(b);