X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cf944399509e0838e40a3fab1cd566329ecefff4..7ac73ace1ab4e92d5ab4fb56a346ba091648c512:/examples/simdag/dag-dotload/sd_dag-dotload.c?ds=sidebyside diff --git a/examples/simdag/dag-dotload/sd_dag-dotload.c b/examples/simdag/dag-dotload/sd_dag-dotload.c index 2f88d5e42c..24d94fee17 100644 --- a/examples/simdag/dag-dotload/sd_dag-dotload.c +++ b/examples/simdag/dag-dotload/sd_dag-dotload.c @@ -9,7 +9,6 @@ #include "simgrid/simdag.h" #include "xbt/log.h" #include -#include #include XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Logging specific to this SimDag example"); @@ -60,21 +59,22 @@ int main(int argc, char **argv) /* Schedule them all on the first workstation */ XBT_INFO("------------------- Schedule tasks ---------------------------"); - sg_host_t *ws_list = sg_host_list(); + sg_host_t *hosts = sg_host_list(); int count = sg_host_count(); xbt_dynar_foreach(dot, cursor, task) { if (SD_task_get_kind(task) == SD_TASK_COMP_SEQ) { if (!strcmp(SD_task_get_name(task), "end")) - SD_task_schedulel(task, 1, ws_list[0]); + SD_task_schedulel(task, 1, hosts[0]); else - SD_task_schedulel(task, 1, ws_list[cursor % count]); + SD_task_schedulel(task, 1, hosts[cursor % count]); } } - xbt_free(ws_list); + xbt_free(hosts); XBT_INFO("------------------- Run the schedule ---------------------------"); - SD_simulate(-1); + xbt_dynar_t changed_tasks = SD_simulate(-1); + xbt_dynar_free(&changed_tasks); XBT_INFO("------------------- Produce the trace file---------------------------"); XBT_INFO("Producing the trace of the run into %s", basename(tracefilename));