/** @brief create a end-to-end communication task that can then be auto-scheduled
*
- * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows to specify the task costs at
+ * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows one to specify the task costs at
* creation, and decouple them from the scheduling process where you just specify which resource should deliver the
* mandatory power.
*
/** @brief create a sequential computation task that can then be auto-scheduled
*
- * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows to specify the task costs at
+ * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows one to specify the task costs at
* creation, and decouple them from the scheduling process where you just specify which resource should deliver the
* mandatory power.
*
/** @brief create a parallel computation task that can then be auto-scheduled
*
- * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows to specify the task costs at
+ * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows one to specify the task costs at
* creation, and decouple them from the scheduling process where you just specify which resource should deliver the
* mandatory power.
*
/** @brief create a complex data redistribution task that can then be auto-scheduled
*
* Auto-scheduling mean that the task can be used with SD_task_schedulev().
- * This allows to specify the task costs at creation, and decouple them from the scheduling process where you just
+ * This allows one to specify the task costs at creation, and decouple them from the scheduling process where you just
* specify which resource should communicate.
*
* A data redistribution can be scheduled on any number of host.
throw std::invalid_argument(simgrid::xbt::string_printf(
"Task %s: the state must be SD_SCHEDULED, SD_RUNNABLE, SD_RUNNING or SD_FAILED", task->name));
- if ((task->state == SD_SCHEDULED || task->state == SD_RUNNABLE) /* if the task is scheduled or runnable */
- && ((task->kind == SD_TASK_COMP_PAR_AMDAHL) || (task->kind == SD_TASK_COMM_PAR_MXN_1D_BLOCK))) {
- /* Don't free scheduling data for typed tasks */
- __SD_task_destroy_scheduling_data(task);
+ if (task->state == SD_SCHEDULED || task->state == SD_RUNNABLE) /* if the task is scheduled or runnable */ {
task->allocation->clear();
+ if (task->kind == SD_TASK_COMP_PAR_AMDAHL || task->kind == SD_TASK_COMM_PAR_MXN_1D_BLOCK) {
+ /* Don't free scheduling data for typed tasks */
+ __SD_task_destroy_scheduling_data(task);
+ }
}
if (SD_task_get_state(task) == SD_RUNNING)
/** @brief Auto-schedules a task.
*
- * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows to specify the task costs at
+ * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows one to specify the task costs at
* creation, and decouple them from the scheduling process where you just specify which resource should deliver the
* mandatory power.
*