Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Have an informative final message.
authorArnaud Legrand <arnaud.legrand@imag.fr>
Thu, 3 Apr 2014 23:48:41 +0000 (01:48 +0200)
committerArnaud Legrand <arnaud.legrand@imag.fr>
Thu, 3 Apr 2014 23:48:41 +0000 (01:48 +0200)
teshsuite/bug-17132/bug-17132.c
teshsuite/bug-17132/bug-17132.tesh

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);
index d167f08..a73b210 100644 (file)
@@ -1,8 +1,9 @@
 $ ../../smpi_script/bin/smpirun -np 16 -platform ${srcdir:=.}/small_platform.xml -hostfile ${srcdir:=.}/hostfile.txt ./bug-17132 --cfg=smpi/cpu_threshold:-1 --log=smpi_kernel.thres:warning
 > You requested to use 16 processes, but there is only 2 processes in your hostfile...
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
-> (some sensible output)
+> Walltime = 0.00212779