X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/caa0dfe63257d1d3b880d0c78ac2b0a7c4c2e7c8..18b9c05d4b0ad3302e1013aef59861418df7a404:/src/msg/msg_gos.cpp diff --git a/src/msg/msg_gos.cpp b/src/msg/msg_gos.cpp index 422ba8d58a..10e43af200 100644 --- a/src/msg/msg_gos.cpp +++ b/src/msg/msg_gos.cpp @@ -4,6 +4,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/Exception.hpp" +#include #include "simgrid/s4u/Mailbox.hpp" #include "src/instr/instr_private.hpp" @@ -68,9 +69,17 @@ msg_error_t MSG_parallel_task_execute_with_timeout(msg_task_t task, double timeo if (task->category != nullptr) simcall_set_category(simdata->compute, task->category); } else { - simdata->compute = boost::static_pointer_cast( - simcall_execution_start(task->name ?: "", task->category ?: "", simdata->flops_amount, simdata->priority, - simdata->bound, MSG_process_get_host(MSG_process_self()))); + sg_host_t host = MSG_process_get_host(MSG_process_self()); + simdata->compute = simgrid::simix::simcall([task, host] { + return simgrid::kernel::activity::ExecImplPtr( + new simgrid::kernel::activity::ExecImpl(task->name ?: "", task->category ?: "", + /*timeout_detector*/ nullptr, host)); + }); + /* checking for infinite values */ + xbt_assert(std::isfinite(simdata->flops_amount), "flops_amount is not finite!"); + xbt_assert(std::isfinite(simdata->priority), "priority is not finite!"); + + simdata->compute->start(simdata->flops_amount, simdata->priority, simdata->bound); } comp_state = simcall_execution_wait(simdata->compute);