X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/96cedde3cdbc0b8ffc3f096a1b65d021b0226f99..84402e8e2ee2a2d0bef25fdceb0a263ed8b471f6:/examples/s4u/synchro-barrier/s4u-synchro-barrier.cpp diff --git a/examples/s4u/synchro-barrier/s4u-synchro-barrier.cpp b/examples/s4u/synchro-barrier/s4u-synchro-barrier.cpp index e131c30ccc..d816f50566 100644 --- a/examples/s4u/synchro-barrier/s4u-synchro-barrier.cpp +++ b/examples/s4u/synchro-barrier/s4u-synchro-barrier.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-2020. 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. */ @@ -35,12 +35,13 @@ static void master(int process_count) int main(int argc, char **argv) { + simgrid::s4u::Engine e(&argc, argv); + // Parameter: Number of processes in the barrier xbt_assert(argc >= 2, "Usage: %s \n", argv[0]); int process_count = std::stoi(argv[1]); xbt_assert(process_count > 0, " must be greater than 0"); - simgrid::s4u::Engine e(&argc, argv); e.load_platform("../../platforms/two_hosts.xml"); simgrid::s4u::Actor::create("master", simgrid::s4u::Host::by_name("Tremblay"), master, process_count); e.run();