Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Small improvements to parmap_test
[simgrid.git] / examples / simdag / sd_comm_throttling.c
index c362e75f1dba50e8d960a8747864461b6eb0fd62..4a354ae4e2c504d065c9e7bc86fd4f4377229e5b 100644 (file)
@@ -72,9 +72,14 @@ int main(int argc, char **argv)
  
     }
     /* let throttle the communication for taskD if its parent is SD_DONE */
  
     }
     /* let throttle the communication for taskD if its parent is SD_DONE */
+    /* the bandwidth is 1.25e8, the data size is 1e7, and we want to throttle
+     * the bandwidth by a factor 2. the rate is then 1.25e8/(2*1e7)=6.25
+     */
     if (SD_task_get_state(taskC) == SD_DONE)
     if (SD_task_get_state(taskC) == SD_DONE)
-      SD_task_set_rate(taskD, 50);
+      SD_task_set_rate(taskD, 6.25);
+    xbt_dynar_free_container(&changed_tasks);
   }
   }
+  xbt_dynar_free_container(&changed_tasks);
 
   XBT_DEBUG("Destroying tasks...");
 
 
   XBT_DEBUG("Destroying tasks...");