X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c6e38be67a91e39324842cbf3988edd6133b8e73..a1a92bc75727d71de12ad470b271b6a973d31275:/src/simdag/sd_task.cpp diff --git a/src/simdag/sd_task.cpp b/src/simdag/sd_task.cpp index e1fcd2934b..0006c32779 100644 --- a/src/simdag/sd_task.cpp +++ b/src/simdag/sd_task.cpp @@ -4,9 +4,9 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "simdag_private.hpp" #include "src/surf/HostImpl.hpp" #include "src/surf/surf_interface.hpp" -#include "src/simdag/simdag_private.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_task, sd, "Logging specific to SimDag (task)"); @@ -800,8 +800,10 @@ void SD_task_run(SD_task_t task) int host_nb = task->allocation->size(); sg_host_t *hosts = xbt_new(sg_host_t, host_nb); int i =0; - for (auto host: *task->allocation) - hosts[i++] = host; + for (auto host: *task->allocation){ + hosts[i] = host; + i++; + } double *flops_amount = xbt_new0(double, host_nb); double *bytes_amount = xbt_new0(double, host_nb * host_nb); @@ -819,7 +821,7 @@ void SD_task_run(SD_task_t task) __SD_task_destroy_scheduling_data(task); /* now the scheduling data are not useful anymore */ SD_task_set_state(task, SD_RUNNING); - xbt_dynar_push(sd_global->return_set, &task); + sd_global->return_set->insert(task); } /**