SimGrid  3.18
Versatile Simulation of Distributed Systems
examples/s4u/exec-remote/s4u-exec-remote.cpp
/* Copyright (c) 2007-2017. 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. */
#include "simgrid/s4u.hpp"
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example");
static void wizard()
{
XBT_INFO("I'm a wizard! I can run a task on the Fafard host from the Ginette one! Look!");
activity->setHost(ginette);
activity->start();
XBT_INFO("It started. Running 48.492Mf takes exactly one second on Ginette (but not on Fafard).");
XBT_INFO("Load on Fafard: %e flops/s; Load on Ginette: %e flops/s.", fafard->getLoad(), ginette->getLoad());
activity->wait();
XBT_INFO("Done!");
}
int main(int argc, char* argv[])
{
simgrid::s4u::Engine e(&argc, argv);
e.loadPlatform(argv[1]);
e.run();
return 0;
}