-/* Copyright (c) 2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2017-2018. 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. */
static void runner()
{
/* Retrieve the list of all hosts as an array of hosts */
- std::vector<simgrid::s4u::Host*> hosts = simgrid::s4u::Engine::getInstance()->getHostList();
+ std::vector<simgrid::s4u::Host*> hosts = simgrid::s4u::Engine::getInstance()->get_all_hosts();
int hosts_count = hosts.size();
XBT_INFO("First, build a classical parallel task, with 1 Gflop to execute on each node, "
communication_amounts = new double[hosts_count * hosts_count]();
simgrid::s4u::this_actor::parallel_execute(hosts_count, hosts.data(), computation_amounts, communication_amounts);
- XBT_INFO("Finally, trick the ptask to do a 'remote execution', on host %s", hosts[1]->getCname());
+ XBT_INFO("Finally, trick the ptask to do a 'remote execution', on host %s", hosts[1]->get_cname());
computation_amounts = new double[1]{1e9};
simgrid::s4u::Host* remote[] = {hosts[1]};
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.");