Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Fix iprobe bound
authorChristian Heinrich <christian@gladbachcity.de>
Tue, 5 Feb 2019 09:09:29 +0000 (10:09 +0100)
committerChristian Heinrich <christian@gladbachcity.de>
Tue, 5 Feb 2019 09:13:19 +0000 (10:13 +0100)
While looping over iprobes, not the whole CPU can be used.

src/smpi/mpi/smpi_request.cpp

index 2ba1996..ec4c562 100644 (file)
@@ -692,8 +692,14 @@ void Request::iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status*
   if (smpi_iprobe_sleep > 0) {
     /** Compute the number of flops we will sleep **/
     s4u::this_actor::exec_init(/*nsleeps: See comment above */ nsleeps *
-                               /*(in seconds)*/ smpi_iprobe_sleep * speed * maxrate)
+                               /*(seconds * flop/s -> total flops)*/ smpi_iprobe_sleep * speed * maxrate)
         ->set_name("iprobe")
+        /* Not the entire CPU can be used when iprobing: This is important for
+         * the energy consumption caused by polling with iprobes. 
+         * Note also that the number of flops that was
+         * computed above contains a maxrate factor and is hence reduced (maxrate < 1)
+         */
+        ->set_bound(maxrate*speed)
         ->start()
         ->wait();
   }