* 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 <algorithm>
*/
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);
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);