- 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);
+ /** Compute the number of flops we will sleep **/
+ s4u::this_actor::exec_init(/*nsleeps: See comment above */ nsleeps *
+ /*(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();