From: thiery Date: Wed, 9 Aug 2006 12:50:38 +0000 (+0000) Subject: Update SimDag example X-Git-Tag: v3.3~2656 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/15f745fcdda7473b2e3665fe0506461f9e13cf49?ds=sidebyside Update SimDag example git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2703 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/examples/simdag/sd_test.c b/examples/simdag/sd_test.c index b791034a7d..0729329d21 100644 --- a/examples/simdag/sd_test.c +++ b/examples/simdag/sd_test.c @@ -13,7 +13,7 @@ int main(int argc, char **argv) { /* initialisation of SD */ SD_init(&argc, argv); - /* xbt_log_control_set("sd.thres=debug");*/ + /* xbt_log_control_set("sd.thres=debug"); */ if (argc < 2) { INFO1("Usage: %s platform_file", argv[0]); @@ -42,7 +42,7 @@ int main(int argc, char **argv) { SD_workstation_get_computation_time(w2, computation_amount2)); INFO2("Route between %s and %s:", name1, name2); - SD_link_t *route = SD_route_get_list(w1, w2); + const SD_link_t *route = SD_route_get_list(w1, w2); int route_size = SD_route_get_size(w1, w2); for (i = 0; i < route_size; i++) { INFO3("\tLink %s: latency = %f, bandwidth = %f", SD_link_get_name(route[i]), @@ -54,7 +54,6 @@ int main(int argc, char **argv) { SD_route_get_communication_time(w1, w2, communication_amount12)); INFO4("Communication time for %f bytes between %s and %s: %f", communication_amount21, name2, name1, SD_route_get_communication_time(w2, w1, communication_amount21)); - xbt_free(route); /* creation of the tasks and their dependencies */ SD_task_t taskA = SD_task_create("Task A", NULL, 10.0); @@ -118,7 +117,7 @@ int main(int argc, char **argv) { SD_task_watch(taskD, SD_DONE); SD_task_watch(taskB, SD_DONE); SD_task_unwatch(taskD, SD_DONE); - + /* scheduling parameters */