static void runner()
{
/* Retrieve the list of all hosts as an array of hosts */
- std::vector<simgrid::s4u::Host*> hosts = simgrid::s4u::Engine::getInstance()->getAllHosts();
+ std::vector<simgrid::s4u::Host*> hosts = simgrid::s4u::Engine::get_instance()->get_all_hosts();
int hosts_count = hosts.size();
XBT_INFO("First, build a classical parallel task, with 1 Gflop to execute on each node, "
computation_amounts[i] = 1e9; // 1 Gflop
simgrid::s4u::this_actor::parallel_execute(hosts_count, hosts.data(), computation_amounts, nullptr /* no comm */);
+ XBT_INFO("Then, build a parallel task involving only heterogeneous computations and no communication");
+ computation_amounts = new double[hosts_count]();
+ for (int i = 0; i < hosts_count; i++)
+ computation_amounts[i] = 5 * (i + 1) * 1e8; // 500Mflop, 1Gflop, 1.5Gflop
+ simgrid::s4u::this_actor::parallel_execute(hosts_count, hosts.data(), computation_amounts, nullptr /* no comm */);
+
XBT_INFO("Then, build a parallel task with no computation nor communication (synchro only)");
computation_amounts = new double[hosts_count]();
communication_amounts = new double[hosts_count * hosts_count]();
if (argc == 3 && argv[2][2] == 'e')
sg_host_energy_plugin_init();
- e.loadPlatform(argv[1]);
+ e.load_platform(argv[1]);
/* Pick a process, no matter which, from the platform file */
- simgrid::s4u::Actor::createActor("test", simgrid::s4u::Host::by_name("MyHost1"), runner);
+ simgrid::s4u::Actor::create("test", simgrid::s4u::Host::by_name("MyHost1"), runner);
e.run();
XBT_INFO("Simulation done.");