From 420a3fb61ccfd5d702daab6b67f0df43c483ccb0 Mon Sep 17 00:00:00 2001 From: Christian Heinrich Date: Tue, 5 Feb 2019 10:09:29 +0100 Subject: [PATCH] [SMPI] Fix iprobe bound While looping over iprobes, not the whole CPU can be used. --- src/smpi/mpi/smpi_request.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 2ba19966ab..ec4c56278b 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -692,8 +692,14 @@ void Request::iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status* if (smpi_iprobe_sleep > 0) { /** Compute the number of flops we will sleep **/ s4u::this_actor::exec_init(/*nsleeps: See comment above */ nsleeps * - /*(in seconds)*/ smpi_iprobe_sleep * speed * maxrate) + /*(seconds * flop/s -> total flops)*/ smpi_iprobe_sleep * speed * maxrate) ->set_name("iprobe") + /* Not the entire CPU can be used when iprobing: This is important for + * the energy consumption caused by polling with iprobes. + * Note also that the number of flops that was + * computed above contains a maxrate factor and is hence reduced (maxrate < 1) + */ + ->set_bound(maxrate*speed) ->start() ->wait(); } -- 2.20.1