- governor = simgrid::plugin::dvfs::Conservative(daemonProc->getHost());
- }
-
- while (1) {
- // Sleep *before* updating; important for startup (i.e., t = 0).
- // In the beginning, we want to go with the pstates specified in the platform file
- // (so we sleep first)
- simgrid::s4u::this_actor::sleep_for(governor.samplingRate());
- governor.update();
- XBT_INFO("Governor just updated!");
+ return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
+ new simgrid::plugin::dvfs::Conservative(daemonProc->getHost()));
+ } else if (dvfs_governor == "ondemand") {
+ return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
+ new simgrid::plugin::dvfs::OnDemand(daemonProc->getHost()));
+ } else if (dvfs_governor == "performance") {
+ return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
+ new simgrid::plugin::dvfs::Performance(daemonProc->getHost()));
+ } else if (dvfs_governor == "powersave") {
+ return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
+ new simgrid::plugin::dvfs::Powersave(daemonProc->getHost()));
+ } else {
+ XBT_CRITICAL("No governor specified for host %s, falling back to Performance",
+ daemonProc->getHost()->getCname());
+ return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
+ new simgrid::plugin::dvfs::Performance(daemonProc->getHost()));