From 94477726d49d67f7ea7bed750733ffff88c4e7c8 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Sat, 21 Jul 2018 17:02:33 +0200 Subject: [PATCH] do not use simcall_execution_start directly --- src/smpi/mpi/smpi_request.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index fa48be232b..4a76651704 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -7,6 +7,7 @@ #include "mc/mc.h" #include "private.hpp" +#include "simgrid/s4u/Exec.hpp" #include "smpi_comm.hpp" #include "smpi_datatype.hpp" #include "smpi_host.hpp" @@ -680,16 +681,16 @@ void Request::iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status* // nsleeps is a multiplier to the sleeptime, to increase speed of execution, each failed iprobe will increase it // This can speed up the execution of certain applications by an order of magnitude, such as HPL static int nsleeps = 1; - double speed = simgrid::s4u::Actor::self()->get_host()->get_speed(); + double speed = s4u::this_actor::get_host()->get_speed(); double maxrate = simgrid::config::get_value("smpi/iprobe-cpu-usage"); MPI_Request request = new Request(nullptr, 0, MPI_CHAR, source == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(source)->get_pid(), simgrid::s4u::this_actor::get_pid(), tag, comm, MPI_REQ_PERSISTENT | MPI_REQ_RECV); if (smpi_iprobe_sleep > 0) { - smx_activity_t iprobe_sleep = simcall_execution_start( - "iprobe", /* flops to executek*/ nsleeps * smpi_iprobe_sleep * speed * maxrate, /* priority */ 1.0, - /* performance bound */ maxrate * speed, smpi_process()->get_actor()->get_host()); - simcall_execution_wait(iprobe_sleep); + s4u::this_actor::exec_init(/* flops to execute */ nsleeps * smpi_iprobe_sleep * speed * maxrate) + ->set_name("iprobe") + ->start() + ->wait(); } // behave like a receive, but don't do it smx_mailbox_t mailbox; -- 2.20.1