X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8c416e92254512408c1d0ce729e8d3cf82ec9938..b04cecc8333d7fd50cd510fad5c615daafeaad3d:/examples/s4u/exec-remote/s4u-exec-remote.cpp diff --git a/examples/s4u/exec-remote/s4u-exec-remote.cpp b/examples/s4u/exec-remote/s4u-exec-remote.cpp index d9c43afd55..4c0699cbb2 100644 --- a/examples/s4u/exec-remote/s4u-exec-remote.cpp +++ b/examples/s4u/exec-remote/s4u-exec-remote.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */ /* 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. */ @@ -13,32 +13,32 @@ static void wizard() simgrid::s4u::Host* ginette = simgrid::s4u::Host::by_name("Ginette"); simgrid::s4u::Host* boivin = simgrid::s4u::Host::by_name("Boivin"); - XBT_INFO("I'm a wizard! I can run a task on the Fafard host from the Ginette one! Look!"); + XBT_INFO("I'm a wizard! I can run a task on the Ginette host from the Fafard one! Look!"); simgrid::s4u::ExecPtr exec = simgrid::s4u::this_actor::exec_init(48.492e6); - exec->setHost(ginette); + exec->set_host(ginette); exec->start(); XBT_INFO("It started. Running 48.492Mf takes exactly one second on Ginette (but not on Fafard)."); simgrid::s4u::this_actor::sleep_for(0.1); - XBT_INFO("Loads in flops/s: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f", - boivin->getLoad(), fafard->getLoad(), ginette->getLoad()); + XBT_INFO("Loads in flops/s: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f", boivin->get_load(), fafard->get_load(), + ginette->get_load()); exec->wait(); XBT_INFO("Done!"); XBT_INFO("And now, harder. Start a remote task on Ginette and move it to Boivin after 0.5 sec"); - exec = simgrid::s4u::this_actor::exec_init(73293500)->setHost(ginette); + exec = simgrid::s4u::this_actor::exec_init(73293500)->set_host(ginette); exec->start(); simgrid::s4u::this_actor::sleep_for(0.5); - XBT_INFO("Loads before the move: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f", - boivin->getLoad(), fafard->getLoad(), ginette->getLoad()); + XBT_INFO("Loads before the move: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f", boivin->get_load(), fafard->get_load(), + ginette->get_load()); - exec->setHost(boivin); + exec->set_host(boivin); simgrid::s4u::this_actor::sleep_for(0.1); - XBT_INFO("Loads after the move: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f", - boivin->getLoad(), fafard->getLoad(), ginette->getLoad()); + XBT_INFO("Loads after the move: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f", boivin->get_load(), fafard->get_load(), + ginette->get_load()); exec->wait(); XBT_INFO("Done!");