From b1716376005a160b68eeb16f8470fa956ed2630e Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 10 Dec 2017 00:45:33 +0100 Subject: [PATCH] TODO-- --- examples/s4u/exec-remote/s4u-exec-remote.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/s4u/exec-remote/s4u-exec-remote.cpp b/examples/s4u/exec-remote/s4u-exec-remote.cpp index de74a8c849..bbe37f7460 100644 --- a/examples/s4u/exec-remote/s4u-exec-remote.cpp +++ b/examples/s4u/exec-remote/s4u-exec-remote.cpp @@ -11,15 +11,18 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example") static void wizard() { + simgrid::s4u::Host* fafard = simgrid::s4u::Host::by_name("Fafard"); simgrid::s4u::Host* ginette = simgrid::s4u::Host::by_name("Ginette"); XBT_INFO("I'm a wizard! I can run a task on the Fafard host from the Ginette one! Look!"); simgrid::s4u::ExecPtr activity = simgrid::s4u::this_actor::exec_init(48.492e6); activity->setHost(ginette); activity->start(); - // TODO: display the load of each hosts once it gets possible 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("Load on Fafard: %e flops/s; Load on Ginette: %e flops/s.", fafard->getLoad(), ginette->getLoad()); + activity->wait(); XBT_INFO("Done!"); -- 2.20.1