From: Christian Heinrich Date: Tue, 5 Feb 2019 09:09:29 +0000 (+0100) Subject: [SMPI] Fix iprobe bound X-Git-Tag: v3_22~390^2~14 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/420a3fb61ccfd5d702daab6b67f0df43c483ccb0 [SMPI] Fix iprobe bound While looping over iprobes, not the whole CPU can be used. --- 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(); }