X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0df2443c629a762737ece131404098bba63ef460..68c4f3d5e544c5fe8e2a67a5607d7a268a0e59a1:/src/simdag/sd_task.cpp diff --git a/src/simdag/sd_task.cpp b/src/simdag/sd_task.cpp index 89b78db1b4..95831968d0 100644 --- a/src/simdag/sd_task.cpp +++ b/src/simdag/sd_task.cpp @@ -5,6 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simdag_private.hpp" +#include "simgrid/kernel/routing/NetPoint.hpp" #include "src/surf/HostImpl.hpp" #include "src/surf/surf_interface.hpp" #include @@ -35,7 +36,7 @@ static void __SD_task_destroy_scheduling_data(SD_task_t task) */ SD_task_t SD_task_create(const char* name, void* data, double amount) { - SD_task_t task = xbt_new0(s_SD_task_t, 1); + auto* task = xbt_new0(s_SD_task_t, 1); task->kind = SD_TASK_NOT_TYPED; task->state = SD_NOT_SCHEDULED; sd_global->initial_tasks.insert(task); @@ -801,8 +802,10 @@ void SD_task_run(SD_task_t task) XBT_VERB("Executing task '%s'", task->name); /* Beware! The scheduling data are now used by the surf action directly! no copy was done */ + // FIXME[donassolo]: verify if all hosts belongs to the same netZone? + auto host_model = (*task->allocation).front()->get_netpoint()->get_englobing_zone()->get_host_model(); task->surf_action = - surf_host_model->execute_parallel(*task->allocation, task->flops_amount, task->bytes_amount, task->rate); + host_model->execute_parallel(*task->allocation, task->flops_amount, task->bytes_amount, task->rate); task->surf_action->set_data(task);