This option allows us to account for lower energy consumption for
Iprobes. The value here must be larger than 0 and at most 1 (with 1 being the default)
The behavior and motivation for this configuration option is identical with \a smpi/test, see
Section \ref options_model_smpi_test for details.
The behavior and motivation for this configuration option is identical with \a smpi/test, see
Section \ref options_model_smpi_test for details.
+\subsection options_model_smpi_iprobe_cpu_usage smpi/iprobe-cpu-usage: Reduce speed for iprobe calls
+
+\b Default value: 1 (no change from default behavior)
+
+MPI_Iprobe calls can be heavily used in applications. To account correctly for the energy
+cores spend probing, it is necessary to reduce the load that these calls cause inside
+SimGrid.
+
+For instance, we measured a max power consumption of 220 W for a particular application but
+only 180 W while this application was probing. Hence, the correct factor that should
+be passed to this option would be 180/220 = 0.81.
+
\subsection options_model_smpi_init smpi/init: Inject constant times for calls to MPI_Init
\b Default value: 0
\subsection options_model_smpi_init smpi/init: Inject constant times for calls to MPI_Init
\b Default value: 0
- \c smpi/host-speed: \ref options_smpi_bench
- \c smpi/IB-penalty-factors: \ref options_model_network_coefs
- \c smpi/iprobe: \ref options_model_smpi_iprobe
- \c smpi/host-speed: \ref options_smpi_bench
- \c smpi/IB-penalty-factors: \ref options_model_network_coefs
- \c smpi/iprobe: \ref options_model_smpi_iprobe
+- \c smpi/iprobe-cpu-usage: \ref options_model_smpi_iprobe_cpu_usage
- \c smpi/init: \ref options_model_smpi_init
- \c smpi/lat-factor: \ref options_model_smpi_lat_factor
- \c smpi/ois: \ref options_model_smpi_ois
- \c smpi/init: \ref options_model_smpi_init
- \c smpi/lat-factor: \ref options_model_smpi_lat_factor
- \c smpi/ois: \ref options_model_smpi_ois
xbt_cfg_register_string("smpi/ois", "0:0:0:0:0", nullptr, "Small messages timings (MPI_Isend minimum time for small messages)");
xbt_cfg_register_string("smpi/or", "0:0:0:0:0", nullptr, "Small messages timings (MPI_Recv minimum time for small messages)");
xbt_cfg_register_string("smpi/ois", "0:0:0:0:0", nullptr, "Small messages timings (MPI_Isend minimum time for small messages)");
xbt_cfg_register_string("smpi/or", "0:0:0:0:0", nullptr, "Small messages timings (MPI_Recv minimum time for small messages)");
+ xbt_cfg_register_double("smpi/iprobe-cpu-usage", 1, nullptr, "Maximum usage of CPUs by MPI_Iprobe() calls. We've observed that MPI_Iprobes consume significantly less power than the maximum of a specific application. This value is then (Iprobe_Usage/Max_Application_Usage).");
+
xbt_cfg_register_string("smpi/coll-selector", "default", nullptr, "Which collective selector to use");
xbt_cfg_register_alias("smpi/coll-selector","smpi/coll_selector");
xbt_cfg_register_string("smpi/gather", nullptr, &_check_coll_gather, "Which collective to use for gather");
xbt_cfg_register_string("smpi/coll-selector", "default", nullptr, "Which collective selector to use");
xbt_cfg_register_alias("smpi/coll-selector","smpi/coll_selector");
xbt_cfg_register_string("smpi/gather", nullptr, &_check_coll_gather, "Which collective to use for gather");
// (especially when used as a break condition, such as while(MPI_Iprobe(...)) ... )
// multiplier to the sleeptime, to increase speed of execution, each failed iprobe will increase it
static int nsleeps = 1;
// (especially when used as a break condition, such as while(MPI_Iprobe(...)) ... )
// multiplier to the sleeptime, to increase speed of execution, each failed iprobe will increase it
static int nsleeps = 1;
- if(smpi_iprobe_sleep > 0)
- simcall_process_sleep(nsleeps*smpi_iprobe_sleep);
+ double speed = simgrid::s4u::Actor::self()->getHost()->speed();
+ double maxrate = xbt_cfg_get_double("smpi/iprobe-cpu-usage");
+ 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);
+ simcall_execution_wait(iprobe_sleep);
+ }
// behave like a receive, but don't do it
smx_mailbox_t mailbox;
// behave like a receive, but don't do it
smx_mailbox_t mailbox;