Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Travis/win: python has been upgraded.
[simgrid.git] / src / simdag / sd_task.cpp
index 85cc1f3..6dcdeaf 100644 (file)
@@ -69,7 +69,7 @@ static inline SD_task_t SD_task_create_sized(const char *name, void *data, doubl
 
 /** @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.
  *
@@ -87,7 +87,7 @@ SD_task_t SD_task_create_comm_e2e(const char *name, void *data, double amount)
 
 /** @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.
  *
@@ -109,7 +109,7 @@ SD_task_t SD_task_create_comp_seq(const char *name, void *data, double flops_amo
 
 /** @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.
  *
@@ -136,7 +136,7 @@ SD_task_t SD_task_create_comp_par_amdahl(const char *name, void *data, double fl
 /** @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.
@@ -772,11 +772,12 @@ void SD_task_unschedule(SD_task_t task)
     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)
@@ -882,7 +883,7 @@ void SD_task_build_MxN_1D_block_matrix(SD_task_t task, int src_nb, int dst_nb){
 
 /** @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.
  *