/* nothing done in this version */
}
-static void smpi_check_options(){
+static void smpi_check_options()
+{
//check correctness of MPI parameters
- xbt_assert(xbt_cfg_get_int("smpi/async-small-thresh") <= xbt_cfg_get_int("smpi/send-is-detached-thresh"));
+ xbt_assert(simgrid::config::get_config<int>("smpi/async-small-thresh") <=
+ simgrid::config::get_config<int>("smpi/send-is-detached-thresh"));
- if (xbt_cfg_is_default_value("smpi/host-speed")) {
- XBT_INFO("You did not set the power of the host running the simulation. "
- "The timings will certainly not be accurate. "
- "Use the option \"--cfg=smpi/host-speed:<flops>\" to set its value."
- "Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information.");
- }
+ if (xbt_cfg_is_default_value("smpi/host-speed")) {
+ XBT_INFO("You did not set the power of the host running the simulation. "
+ "The timings will certainly not be accurate. "
+ "Use the option \"--cfg=smpi/host-speed:<flops>\" to set its value."
+ "Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information.");
+ }
- xbt_assert(xbt_cfg_get_double("smpi/cpu-threshold") >=0,
- "The 'smpi/cpu-threshold' option cannot have negative values [anymore]. If you want to discard "
- "the simulation of any computation, please use 'smpi/simulate-computation:no' instead.");
+ xbt_assert(xbt_cfg_get_double("smpi/cpu-threshold") >= 0,
+ "The 'smpi/cpu-threshold' option cannot have negative values [anymore]. If you want to discard "
+ "the simulation of any computation, please use 'smpi/simulate-computation:no' instead.");
}
int smpi_enabled() {
// Load the copy and resolve the entry point:
void* handle = dlopen(target_executable.c_str(), RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
int saved_errno = errno;
- if (xbt_cfg_get_boolean("smpi/keep-temps") == false)
+ if (simgrid::config::get_config<bool>("smpi/keep-temps") == false)
unlink(target_executable.c_str());
if (handle == nullptr)
xbt_die("dlopen failed: %s (errno: %d -- %s)", dlerror(), saved_errno, strerror(saved_errno));
SIMIX_run();
xbt_os_walltimer_stop(global_timer);
- if (xbt_cfg_get_boolean("smpi/display-timing")){
+ if (simgrid::config::get_config<bool>("smpi/display-timing")) {
double global_time = xbt_os_timer_elapsed(global_timer);
XBT_INFO("Simulated time: %g seconds. \n\n"
"The simulation took %g seconds (after parsing and platform setup)\n"
smpi_init_options();
smpi_global_init();
smpi_check_options();
- TRACE_smpi_alloc();
simgrid::s4u::onSimulationEnd.connect(TRACE_smpi_release);
}