* Add all missing Fortran bindings, SMPI should work with Fortran 90
(no privatization of global variables yet)
+ SimDag:
+ * Add a new function SD_task_set_amount() upon user request.
PLATFORM:
- * Handle units for values (10ms, 10kiloflops, 10Bps, ...)
+ * Handle units for values (10ms, 10kiloflops, 10Bps, 1GB, ...)
* Remove rule based routing (no more pcre dependency)
* Add a limiter_link option to cluster tag, to specify a maximum reachable
bandwidth in fullduplex mode when it is < 2*nominal bw
XBT_PUBLIC(void) SD_task_watch(SD_task_t task, e_SD_task_state_t state);
XBT_PUBLIC(void) SD_task_unwatch(SD_task_t task, e_SD_task_state_t state);
XBT_PUBLIC(double) SD_task_get_amount(SD_task_t task);
+XBT_PUBLIC(void) SD_task_set_amount(SD_task_t task, double amount);
XBT_PUBLIC(double) SD_task_get_alpha(SD_task_t task);
XBT_PUBLIC(double) SD_task_get_remaining_amount(SD_task_t task);
XBT_PUBLIC(double) SD_task_get_execution_time(SD_task_t task,
}
/**
- * \brief Returns the alpha parameter of a SD_TASK_COMP_PAR_AMDAH task
+ * \brief Sets the total amount of work of a task
+ * For sequential typed tasks (COMP_SEQ and COMM_E2E), it also sets the
+ * appropriate values in the computation_amount and communication_amount arrays
+ * respectively. Nothing more than modifying task->amount is done for paralle
+ * typed tasks (COMP_PAR_AMDAHL and COMM_PAR_MXN_1D_BLOCK) as the distribution
+ * of the amount of work is done at scheduling time.
+ *
+ * \param task a task
+ * \param amount the new amount of work to execute
+ */
+void SD_task_set_amount(SD_task_t task, double amount)
+{
+ task->amount = amount;
+ if (task->kind == SD_TASK_COMP_SEQ)
+ task->computation_amount[0] = amount;
+ if (task->kind == SD_TASK_COMM_E2E)
+ task->communication_amount[2] = amount;
+}
+
+/**
+ * \brief Returns the alpha parameter of a SD_TASK_COMP_PAR_AMDAHL task
*
* \param task a parallel task assuming Amdahl's law as speedup model
* \return the alpha parameter (serial part of a task in percent) for this task