From: suter Date: Mon, 9 Jul 2012 12:27:17 +0000 (+0200) Subject: As pointed out by a user, the rate should be expressed in percent, not X-Git-Tag: v3_8~308 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/00cff67d255bcd4743341de79bd0270dbd0ef531 As pointed out by a user, the rate should be expressed in percent, not in [0..1[. Thus change the .5 to 50 (divide the communication rate by two), update the "doc" and revalidate the tesh file --- diff --git a/examples/simdag/sd_comm_throttling.c b/examples/simdag/sd_comm_throttling.c index aa81fe6a8c..c362e75f1d 100644 --- a/examples/simdag/sd_comm_throttling.c +++ b/examples/simdag/sd_comm_throttling.c @@ -73,7 +73,7 @@ int main(int argc, char **argv) } /* let throttle the communication for taskD if its parent is SD_DONE */ if (SD_task_get_state(taskC) == SD_DONE) - SD_task_set_rate(taskD, 0.5); + SD_task_set_rate(taskD, 50); } XBT_DEBUG("Destroying tasks..."); diff --git a/examples/simdag/test_simdag_comm_throttling.tesh b/examples/simdag/test_simdag_comm_throttling.tesh index ccc1313d02..4fb69d085f 100644 --- a/examples/simdag/test_simdag_comm_throttling.tesh +++ b/examples/simdag/test_simdag_comm_throttling.tesh @@ -8,6 +8,6 @@ $ $SG_TEST_EXENV ./sd_comm_throttling ${srcdir:=.}/2clusters.xml > [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 -> [5.300600] [sd_comm_throttling/INFO] Simulation stopped after 5.3006 seconds -> [5.300600] [sd_comm_throttling/INFO] Task 'Task D' start time: 2.300300, finish time: 4.300600 -> [5.300600] [sd_comm_throttling/INFO] Task 'Task E' start time: 4.300600, finish time: 5.300600 +> [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 diff --git a/src/simdag/sd_task.c b/src/simdag/sd_task.c index 2147c63e61..11d27bba8a 100644 --- a/src/simdag/sd_task.c +++ b/src/simdag/sd_task.c @@ -283,7 +283,7 @@ void SD_task_set_data(SD_task_t task, void *data) * a task can use. * * \param task a task - * \param rate the new rate you want to associate with this task + * \param rate the new rate (in percent) you want to associate with this task */ void SD_task_set_rate(SD_task_t task, double rate) {