Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more verbose debug messages
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 26 Dec 2011 23:21:33 +0000 (00:21 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 26 Dec 2011 23:21:33 +0000 (00:21 +0100)
examples/smpi/dsend.c
src/smpi/smpi_bench.c

index 511cf32..f7bc825 100644 (file)
@@ -12,19 +12,21 @@ int main(int argc, char *argv[]) {
   int rank;
   int data=11;
    
   int rank;
   int data=11;
    
+
   MPI_Init(&argc, &argv);
   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
    
   if (rank==1) {
          data=22;
          MPI_Send(&data,1,MPI_INT,(rank+1)%2,666,MPI_COMM_WORLD);
   MPI_Init(&argc, &argv);
   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
    
   if (rank==1) {
          data=22;
          MPI_Send(&data,1,MPI_INT,(rank+1)%2,666,MPI_COMM_WORLD);
+//      smpi_sleep(1000);
   } else {
          MPI_Recv(&data,1,MPI_INT,-1,666,MPI_COMM_WORLD,NULL);
          if (data !=22) {
                  printf("rank %d: Damn, data does not match (got %d)\n",rank, data);
          }
   }
   } else {
          MPI_Recv(&data,1,MPI_INT,-1,666,MPI_COMM_WORLD,NULL);
          if (data !=22) {
                  printf("rank %d: Damn, data does not match (got %d)\n",rank, data);
          }
   }
-       
+
   printf("rank %d: data exchanged\n", rank);
   MPI_Finalize();
   return 0;
   printf("rank %d: data exchanged\n", rank);
   MPI_Finalize();
   return 0;
index ca1d866..d695730 100644 (file)
@@ -148,6 +148,9 @@ static void smpi_execute(double duration)
     smpi_execute_flops(duration *
                        xbt_cfg_get_double(_surf_cfg_set,
                                           "smpi/running_power"));
     smpi_execute_flops(duration *
                        xbt_cfg_get_double(_surf_cfg_set,
                                           "smpi/running_power"));
+  } else {
+         XBT_DEBUG("Real computation took %f while threshold is set to %f; ignore it",
+                         duration, xbt_cfg_get_double(_surf_cfg_set, "smpi/cpu_threshold"));
   }
 }
 
   }
 }