Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
finally understand how the rate works. update the example and the tesh
authorsuter <frederic.suter@cc.in2p3.fr>
Tue, 10 Jul 2012 07:45:20 +0000 (09:45 +0200)
committersuter <frederic.suter@cc.in2p3.fr>
Tue, 10 Jul 2012 08:02:50 +0000 (10:02 +0200)
file accordingly.

examples/simdag/sd_comm_throttling.c
examples/simdag/test_simdag_comm_throttling.tesh

index c362e75..a2f9f8a 100644 (file)
@@ -72,8 +72,11 @@ int main(int argc, char **argv)
  
     }
     /* 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)
-      SD_task_set_rate(taskD, 50);
+      SD_task_set_rate(taskD, 6.25);
   }
 
   XBT_DEBUG("Destroying tasks...");
index 4fb69d0..9145e9e 100644 (file)
@@ -1,13 +1,14 @@
 #! ./tesh
 p Modify the rate of communication tasks even when they are auto-scheduled
 
-$ $SG_TEST_EXENV ./sd_comm_throttling ${srcdir:=.}/2clusters.xml
+$ $SG_TEST_EXENV ./sd_comm_throttling --cfg=network/TCP_gamma:4194304 ${srcdir:=.}/2clusters.xml
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
 > [1.000000] [sd_comm_throttling/INFO] Simulation stopped after 1.0000 seconds
 > [1.000000] [sd_comm_throttling/INFO] Task 'Task A' start time: 0.000000, finish time: 1.000000
-> [2.300300] [sd_comm_throttling/INFO] Simulation stopped after 2.3003 seconds
-> [2.300300] [sd_comm_throttling/INFO] Task 'Task B' start time: 1.000000, finish time: 1.300300
-> [2.300300] [sd_comm_throttling/INFO] Task 'Task C' start time: 1.300300, finish time: 2.300300
-> [3.600600] [sd_comm_throttling/INFO] Simulation stopped after 3.6006 seconds
-> [3.600600] [sd_comm_throttling/INFO] Task 'Task D' start time: 2.300300, finish time: 2.600600
-> [3.600600] [sd_comm_throttling/INFO] Task 'Task E' start time: 2.600600, finish time: 3.600600
+> [2.080300] [sd_comm_throttling/INFO] Simulation stopped after 2.0803 seconds
+> [2.080300] [sd_comm_throttling/INFO] Task 'Task B' start time: 1.000000, finish time: 1.080300
+> [2.080300] [sd_comm_throttling/INFO] Task 'Task C' start time: 1.080300, finish time: 2.080300
+> [3.240600] [sd_comm_throttling/INFO] Simulation stopped after 3.2406 seconds
+> [3.240600] [sd_comm_throttling/INFO] Task 'Task D' start time: 2.080300, finish time: 2.240600
+> [3.240600] [sd_comm_throttling/INFO] Task 'Task E' start time: 2.240600, finish time: 3.240600