X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5e22c862d29ac2455672f2bc7f50bbcc9ade21c2..895710d49f77179d9893bc76b3e31b69fae638af:/examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp?ds=sidebyside diff --git a/examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp b/examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp index ee43098cef..ac8962a5e1 100644 --- a/examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp +++ b/examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp @@ -35,12 +35,12 @@ static void execute_load_test() simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), speed, sg_host_get_computed_flops(host), sg_host_get_avg_load(host), static_cast(200E6) / - (10.5 * speed * host->getCoreCount() + - (simgrid::s4u::Engine::get_clock() - start - 0.5) * host->getSpeed() * host->getCoreCount())); + (10.5 * speed * host->get_core_count() + + (simgrid::s4u::Engine::get_clock() - start - 0.5) * host->getSpeed() * host->get_core_count())); // ========= Change power peak ========= int pstate = 1; - host->setPstate(pstate); + host->set_pstate(pstate); XBT_INFO("========= Requesting pstate %d (speed should be of %.0E flop/s and is of %.0E flop/s, average load is %.5f)", pstate, host->getPstateSpeed(pstate), host->getSpeed(), sg_host_get_avg_load(host)); @@ -65,7 +65,7 @@ static void execute_load_test() s4u_Host* host2 = simgrid::s4u::Host::by_name("MyHost2"); XBT_INFO("Turning MyHost2 off, and sleeping another 10 seconds. MyHost2 computed %.0f flops so far and has an average load of %.5f.", sg_host_get_computed_flops(host2), sg_host_get_avg_load(host2)); - host2->turnOff(); + host2->turn_off(); start = simgrid::s4u::Engine::get_clock(); simgrid::s4u::this_actor::sleep_for(10); XBT_INFO("Done sleeping %.2f s; peak speed: %.0E flop/s; number of flops computed so far: %.0E", @@ -78,7 +78,7 @@ static void change_speed() simgrid::s4u::this_actor::sleep_for(10.5); XBT_INFO("I slept until now, but now I'll change the speed of this host " "while the other process is still computing! This should slow the computation down."); - host->setPstate(2); + host->set_pstate(2); } int main(int argc, char* argv[])