Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / examples / s4u / basic / s4u_basic_function.cpp
1 /* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include <string>
7 #include <vector>
8
9 #include <xbt/sysdep.h>
10
11 #include <simgrid/s4u.h>
12
13 #include "s4u_basic.h"
14
15 int main(int argc, char **argv) {
16   simgrid::s4u::Engine *e = new simgrid::s4u::Engine(&argc,argv);
17   e->loadPlatform("../../platforms/two_hosts.xml");
18   e->registerFunction<Worker>("worker");
19   e->registerFunction<Master>("master");
20   std::vector<std::string> args;
21   simgrid::s4u::Actor("worker", simgrid::s4u::Host::by_name("Tremblay"), "worker", args);
22   simgrid::s4u::Actor("master", simgrid::s4u::Host::by_name("Jupiter"), "master", args);
23   e->run();
24   return 0;
25 }