1 /* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */
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. */
6 #include "simgrid/s4u.hpp"
10 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
13 double computation_amount;
17 explicit test(std::vector<std::string> args)
19 computation_amount = std::stod(args[1]);
20 priority = std::stod(args[2]);
24 XBT_INFO("Hello! Running an actor of size %g with priority %g", computation_amount, priority);
25 simgrid::s4u::this_actor::execute(computation_amount, priority);
27 XBT_INFO("Goodbye now!");
31 int main(int argc, char *argv[])
33 simgrid::s4u::Engine e(&argc, argv);
34 xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
35 "\tExample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]);
37 e.registerFunction<test>("test");
39 e.loadPlatform(argv[1]);
40 e.loadDeployment(argv[2]);