From: suter Date: Tue, 10 Jul 2012 07:45:20 +0000 (+0200) Subject: finally understand how the rate works. update the example and the tesh X-Git-Tag: v3_8~300 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/dd168417de56ff999b989676fc30debbc433d6b3 finally understand how the rate works. update the example and the tesh file accordingly. --- diff --git a/examples/simdag/sd_comm_throttling.c b/examples/simdag/sd_comm_throttling.c index c362e75f1d..a2f9f8a065 100644 --- a/examples/simdag/sd_comm_throttling.c +++ b/examples/simdag/sd_comm_throttling.c @@ -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..."); diff --git a/examples/simdag/test_simdag_comm_throttling.tesh b/examples/simdag/test_simdag_comm_throttling.tesh index 4fb69d085f..9145e9e19a 100644 --- a/examples/simdag/test_simdag_comm_throttling.tesh +++ b/examples/simdag/test_simdag_comm_throttling.tesh @@ -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