id_ = counter++;
set_data(data);
if (MC_is_active())
- MC_ignore_heap(&(id_), sizeof(id_));
+ MC_ignore_heap(&id_, sizeof id_);
}
Task::Task(const std::string& name, std::vector<s4u::Host*>&& hosts, std::vector<double>&& flops_amount,
*
* A constructor for #msg_task_t taking six arguments.
*
- * \rst
+ * @beginrst
* See :cpp:func:`void simgrid::s4u::this_actor::parallel_execute(int, s4u::Host**, double*, double*)` for
* the exact semantic of the parameters.
- * \endrst
+ * @endrst
*
* @param name a name for the object. It is for user-level information and can be nullptr.
* @param host_nb the number of hosts implied in the parallel task.
*/
double MSG_task_get_flops_amount(const_msg_task_t task)
{
- if (task->compute != nullptr) {
+ if (task->compute != nullptr && task->compute->get_state() == simgrid::s4u::Activity::State::STARTED) {
return task->compute->get_remaining();
} else {
// Not started or already done.