/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#if HAVE_SMPI
#include "src/smpi/include/smpi_request.hpp"
#include "src/smpi/plugins/ampi/ampi.hpp"
#endif
#include <boost/algorithm/string.hpp>
#if HAVE_SMPI
#include "src/smpi/include/smpi_request.hpp"
#include "src/smpi/plugins/ampi/ampi.hpp"
#endif
#include <boost/algorithm/string.hpp>
{"performance", "TODO: Doc"}, {"powersave", "TODO: Doc"},
}),
{"performance", "TODO: Doc"}, {"powersave", "TODO: Doc"},
}),
cfg_min_pstate("plugin/dvfs/min-pstate",
"Which pstate is the minimum (and hence fastest) pstate for this governor?", 0);
cfg_min_pstate("plugin/dvfs/min-pstate",
"Which pstate is the minimum (and hence fastest) pstate for this governor?", 0);
static simgrid::config::Flag<int>
cfg_max_pstate("plugin/dvfs/max-pstate",
static simgrid::config::Flag<int>
cfg_max_pstate("plugin/dvfs/max-pstate",
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_plugin_dvfs, surf, "Logging specific to the SURF HostDvfs plugin");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(host_dvfs, kernel, "Logging specific to the HostDvfs plugin");
max_pstate = std::stoul(local_max_pstate_config);
}
xbt_assert(max_pstate <= host_->get_pstate_count() - 1, "Value for max_pstate too large!");
max_pstate = std::stoul(local_max_pstate_config);
}
xbt_assert(max_pstate <= host_->get_pstate_count() - 1, "Value for max_pstate too large!");
- simgrid::s4u::Activity::on_completion.connect([this](simgrid::s4u::Activity& activity) {
- auto* exec = dynamic_cast<simgrid::s4u::Exec*>(&activity);
+ simgrid::s4u::Activity::on_completion_cb([this](simgrid::s4u::Activity const& activity) {
+ const auto* exec = dynamic_cast<simgrid::s4u::Exec const*>(&activity);
if (exec == nullptr) // Only Execs are concerned here
return;
// For more than one host (not yet supported), we can access the host via
if (exec == nullptr) // Only Execs are concerned here
return;
// For more than one host (not yet supported), we can access the host via
/* **************************** events callback *************************** */
static void on_host_added(simgrid::s4u::Host& host)
/* **************************** events callback *************************** */
static void on_host_added(simgrid::s4u::Host& host)
XBT_DEBUG("DVFS process on %s is a daemon: %d", daemon_proc->get_host()->get_cname(), daemon_proc->is_daemon());
std::string dvfs_governor;
XBT_DEBUG("DVFS process on %s is a daemon: %d", daemon_proc->get_host()->get_cname(), daemon_proc->is_daemon());
std::string dvfs_governor;