* You can first directly start your actor, as follows. Note the last parameter: 'Sender()',
* as if you would call the Sender function.
*/
- simgrid::s4u::Actor::createActor("sender1", simgrid::s4u::Host::by_name("Tremblay"), Sender());
+ simgrid::s4u::Actor::create("sender1", simgrid::s4u::Host::by_name("Tremblay"), Sender());
/* The second way is to first register your function, and then retrieve it */
e.registerFunction<Sender>("sender"); // The sender is passed as a template parameter here
std::vector<std::string> args; // Here we declare the parameter that the actor will get
args.push_back("GloubiBoulga"); // Add a parameter to the set (we could have done it in the first approach too)
- simgrid::s4u::Actor::createActor("sender2", simgrid::s4u::Host::by_name("Jupiter"), "sender", args);
+ simgrid::s4u::Actor::create("sender2", simgrid::s4u::Host::by_name("Jupiter"), "sender", args);
/* The third way to start your actors is to use a deployment file. */
e.registerFunction<Receiver>("receiver"); // You first have to register the actor as with the second approach
-/* 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. */
simgrid::s4u::Engine e(&argc, argv);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("worker", simgrid::s4u::Host::by_name("Boivin"), worker);
- simgrid::s4u::Actor::createActor("daemon", simgrid::s4u::Host::by_name("Tremblay"), my_daemon);
+ simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Boivin"), worker);
+ simgrid::s4u::Actor::create("daemon", simgrid::s4u::Host::by_name("Tremblay"), my_daemon);
e.run();
return 0;
-/* 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. */
simgrid::s4u::ActorPtr actor;
XBT_INFO("Start sleeper");
- actor = simgrid::s4u::Actor::createActor("sleeper from master", simgrid::s4u::Host::current(), sleeper);
+ actor = simgrid::s4u::Actor::create("sleeper from master", simgrid::s4u::Host::current(), sleeper);
XBT_INFO("Join the sleeper (timeout 2)");
actor->join(2);
XBT_INFO("Start sleeper");
- actor = simgrid::s4u::Actor::createActor("sleeper from master", simgrid::s4u::Host::current(), sleeper);
+ actor = simgrid::s4u::Actor::create("sleeper from master", simgrid::s4u::Host::current(), sleeper);
XBT_INFO("Join the sleeper (timeout 4)");
actor->join(4);
XBT_INFO("Start sleeper");
- actor = simgrid::s4u::Actor::createActor("sleeper from master", simgrid::s4u::Host::current(), sleeper);
+ actor = simgrid::s4u::Actor::create("sleeper from master", simgrid::s4u::Host::current(), sleeper);
XBT_INFO("Join the sleeper (timeout 2)");
actor->join(2);
XBT_INFO("Start sleeper");
- actor = simgrid::s4u::Actor::createActor("sleeper from master", simgrid::s4u::Host::current(), sleeper);
+ actor = simgrid::s4u::Actor::create("sleeper from master", simgrid::s4u::Host::current(), sleeper);
XBT_INFO("Waiting 4");
simgrid::s4u::this_actor::sleep_for(4);
XBT_INFO("Join the sleeper after its end (timeout 1)");
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("master", simgrid::s4u::Host::by_name("Tremblay"), master);
+ simgrid::s4u::Actor::create("master", simgrid::s4u::Host::by_name("Tremblay"), master);
e.run();
-/* 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. */
{
XBT_INFO("Hello!"); /* - First start a victim process */
simgrid::s4u::ActorPtr victimA =
- simgrid::s4u::Actor::createActor("victim A", simgrid::s4u::Host::by_name("Fafard"), victimA_fun);
+ simgrid::s4u::Actor::create("victim A", simgrid::s4u::Host::by_name("Fafard"), victimA_fun);
simgrid::s4u::ActorPtr victimB =
- simgrid::s4u::Actor::createActor("victim B", simgrid::s4u::Host::by_name("Jupiter"), victimB_fun);
+ simgrid::s4u::Actor::create("victim B", simgrid::s4u::Host::by_name("Jupiter"), victimB_fun);
simgrid::s4u::this_actor::sleep_for(10); /* - Wait for 10 seconds */
XBT_INFO("Resume the victim A"); /* - Resume it from its suspended state */
simgrid::s4u::this_actor::sleep_for(2);
XBT_INFO("Kill the victim A"); /* - and then kill it */
- simgrid::s4u::Actor::kill(victimA->getPid()); // Kill by PID is legit
+ simgrid::s4u::Actor::kill(victimA->get_pid()); // Kill by PID is legit
simgrid::s4u::this_actor::sleep_for(1);
XBT_INFO("Start a new actor, and kill it right away");
simgrid::s4u::ActorPtr victimC =
- simgrid::s4u::Actor::createActor("victim C", simgrid::s4u::Host::by_name("Jupiter"), victimA_fun);
+ simgrid::s4u::Actor::create("victim C", simgrid::s4u::Host::by_name("Jupiter"), victimA_fun);
victimC->kill();
simgrid::s4u::this_actor::sleep_for(1);
e.loadPlatform(argv[1]); /* - Load the platform description */
/* - Create and deploy killer process, that will create the victim actors */
- simgrid::s4u::Actor::createActor("killer", simgrid::s4u::Host::by_name("Tremblay"), killer);
+ simgrid::s4u::Actor::create("killer", simgrid::s4u::Host::by_name("Tremblay"), killer);
e.run(); /* - Run the simulation */
* Then another migration is done by the monitor while the worker is suspended.
*
* Note that worker() takes an uncommon set of parameters,
- * and that this is perfectly accepted by createActor().
+ * and that this is perfectly accepted by create().
*/
#include <simgrid/s4u.hpp>
simgrid::s4u::Host* jacquelin = simgrid::s4u::Host::by_name("Jacquelin");
simgrid::s4u::Host* fafard = simgrid::s4u::Host::by_name("Fafard");
- simgrid::s4u::ActorPtr actor = simgrid::s4u::Actor::createActor("worker", fafard, worker, boivin, jacquelin);
+ simgrid::s4u::ActorPtr actor = simgrid::s4u::Actor::create("worker", fafard, worker, boivin, jacquelin);
simgrid::s4u::this_actor::sleep_for(5);
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("monitor", simgrid::s4u::Host::by_name("Boivin"), monitor);
+ simgrid::s4u::Actor::create("monitor", simgrid::s4u::Host::by_name("Boivin"), monitor);
e.run();
return 0;
-/* 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 dream_master()
{
XBT_INFO("Let's create a lazy guy."); /* - Create a lazy_guy process */
- simgrid::s4u::ActorPtr lazy = simgrid::s4u::Actor::createActor("Lazy", simgrid::s4u::this_actor::getHost(), lazy_guy);
+ simgrid::s4u::ActorPtr lazy = simgrid::s4u::Actor::create("Lazy", simgrid::s4u::this_actor::getHost(), lazy_guy);
XBT_INFO("Let's wait a little bit...");
simgrid::s4u::this_actor::sleep_for(10); /* - Wait for 10 seconds */
XBT_INFO("Let's wake the lazy guy up! >:) BOOOOOUUUHHH!!!!");
e.loadPlatform(argv[1]); /* - Load the platform description */
std::vector<simgrid::s4u::Host*> list = e.getAllHosts();
- simgrid::s4u::Actor::createActor("dream_master", list.front(), dream_master);
+ simgrid::s4u::Actor::create("dream_master", list.front(), dream_master);
e.run(); /* - Run the simulation */
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("broadcaster", simgrid::s4u::Host::by_name("node-0.acme.org"), broadcaster, 8, 256);
-
- simgrid::s4u::Actor::createActor("peer", simgrid::s4u::Host::by_name("node-1.acme.org"), peer);
- simgrid::s4u::Actor::createActor("peer", simgrid::s4u::Host::by_name("node-2.acme.org"), peer);
- simgrid::s4u::Actor::createActor("peer", simgrid::s4u::Host::by_name("node-3.acme.org"), peer);
- simgrid::s4u::Actor::createActor("peer", simgrid::s4u::Host::by_name("node-4.acme.org"), peer);
- simgrid::s4u::Actor::createActor("peer", simgrid::s4u::Host::by_name("node-5.acme.org"), peer);
- simgrid::s4u::Actor::createActor("peer", simgrid::s4u::Host::by_name("node-6.acme.org"), peer);
- simgrid::s4u::Actor::createActor("peer", simgrid::s4u::Host::by_name("node-7.acme.org"), peer);
- simgrid::s4u::Actor::createActor("peer", simgrid::s4u::Host::by_name("node-8.acme.org"), peer);
+ simgrid::s4u::Actor::create("broadcaster", simgrid::s4u::Host::by_name("node-0.acme.org"), broadcaster, 8, 256);
+
+ simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-1.acme.org"), peer);
+ simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-2.acme.org"), peer);
+ simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-3.acme.org"), peer);
+ simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-4.acme.org"), peer);
+ simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-5.acme.org"), peer);
+ simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-6.acme.org"), peer);
+ simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-7.acme.org"), peer);
+ simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-8.acme.org"), peer);
e.run();
XBT_INFO("Total simulation time: %e", simgrid::s4u::Engine::getClock());
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-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. */
e.loadPlatform(argv[1]);
std::vector<std::string> args;
args.push_back("Jupiter");
- simgrid::s4u::Actor::createActor("pinger", simgrid::s4u::Host::by_name("Tremblay"), pinger, args);
+ simgrid::s4u::Actor::create("pinger", simgrid::s4u::Host::by_name("Tremblay"), pinger, args);
args.pop_back();
args.push_back("Tremblay");
- simgrid::s4u::Actor::createActor("ponger", simgrid::s4u::Host::by_name("Jupiter"), ponger, args);
+ simgrid::s4u::Actor::create("ponger", simgrid::s4u::Host::by_name("Jupiter"), ponger, args);
e.run();
std::vector<simgrid::s4u::Host*> list = e.getAllHosts();
for (auto const& host : list) {
/* - Give a unique rank to each host and create a @ref relay_runner process on each */
- simgrid::s4u::Actor::createActor((std::to_string(id)).c_str(), host, RelayRunner());
+ simgrid::s4u::Actor::create((std::to_string(id)).c_str(), host, RelayRunner());
id++;
}
e.run();
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-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. */
vm0->start();
vm1->start();
- simgrid::s4u::Actor::createActor("worker0", vm0, worker_busy_loop, "Task0", -1);
- simgrid::s4u::Actor::createActor("worker1", vm1, worker_busy_loop, "Task1", pm0->getSpeed());
+ simgrid::s4u::Actor::create("worker0", vm0, worker_busy_loop, "Task0", -1);
+ simgrid::s4u::Actor::create("worker1", vm1, worker_busy_loop, "Task1", pm0->getSpeed());
simgrid::s4u::this_actor::sleep_for(3000); // let the tasks end
vm0->destroy();
XBT_INFO("### Test: with/without MSG_task_set_bound");
XBT_INFO("### Test: no bound for Task1@%s", host->get_cname());
- simgrid::s4u::Actor::createActor("worker0", host, worker, computation_amount, false, 0);
+ simgrid::s4u::Actor::create("worker0", host, worker, computation_amount, false, 0);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO("### Test: 50%% for Task1@%s", host->get_cname());
- simgrid::s4u::Actor::createActor("worker0", host, worker, computation_amount, true, cpu_speed / 2);
+ simgrid::s4u::Actor::create("worker0", host, worker, computation_amount, true, cpu_speed / 2);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO("### Test: 33%% for Task1@%s", host->get_cname());
- simgrid::s4u::Actor::createActor("worker0", host, worker, computation_amount, true, cpu_speed / 3);
+ simgrid::s4u::Actor::create("worker0", host, worker, computation_amount, true, cpu_speed / 3);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO("### Test: zero for Task1@%s (i.e., unlimited)", host->get_cname());
- simgrid::s4u::Actor::createActor("worker0", host, worker, computation_amount, true, 0);
+ simgrid::s4u::Actor::create("worker0", host, worker, computation_amount, true, 0);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO("### Test: 200%% for Task1@%s (i.e., meaningless)", host->get_cname());
- simgrid::s4u::Actor::createActor("worker0", host, worker, computation_amount, true, cpu_speed * 2);
+ simgrid::s4u::Actor::create("worker0", host, worker, computation_amount, true, cpu_speed * 2);
simgrid::s4u::this_actor::sleep_for(1000);
}
const char* hostB_name = hostB->get_cname();
XBT_INFO("### Test: no bound for Task1@%s, no bound for Task2@%s", hostA_name, hostB_name);
- simgrid::s4u::Actor::createActor("worker0", hostA, worker, computation_amount, false, 0);
- simgrid::s4u::Actor::createActor("worker1", hostB, worker, computation_amount, false, 0);
+ simgrid::s4u::Actor::create("worker0", hostA, worker, computation_amount, false, 0);
+ simgrid::s4u::Actor::create("worker1", hostB, worker, computation_amount, false, 0);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO("### Test: 0 for Task1@%s, 0 for Task2@%s (i.e., unlimited)", hostA_name, hostB_name);
- simgrid::s4u::Actor::createActor("worker0", hostA, worker, computation_amount, true, 0);
- simgrid::s4u::Actor::createActor("worker1", hostB, worker, computation_amount, true, 0);
+ simgrid::s4u::Actor::create("worker0", hostA, worker, computation_amount, true, 0);
+ simgrid::s4u::Actor::create("worker1", hostB, worker, computation_amount, true, 0);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO("### Test: 50%% for Task1@%s, 50%% for Task2@%s", hostA_name, hostB_name);
- simgrid::s4u::Actor::createActor("worker0", hostA, worker, computation_amount, true, cpu_speed / 2);
- simgrid::s4u::Actor::createActor("worker1", hostB, worker, computation_amount, true, cpu_speed / 2);
+ simgrid::s4u::Actor::create("worker0", hostA, worker, computation_amount, true, cpu_speed / 2);
+ simgrid::s4u::Actor::create("worker1", hostB, worker, computation_amount, true, cpu_speed / 2);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO("### Test: 25%% for Task1@%s, 25%% for Task2@%s", hostA_name, hostB_name);
- simgrid::s4u::Actor::createActor("worker0", hostA, worker, computation_amount, true, cpu_speed / 4);
- simgrid::s4u::Actor::createActor("worker1", hostB, worker, computation_amount, true, cpu_speed / 4);
+ simgrid::s4u::Actor::create("worker0", hostA, worker, computation_amount, true, cpu_speed / 4);
+ simgrid::s4u::Actor::create("worker1", hostB, worker, computation_amount, true, cpu_speed / 4);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO("### Test: 75%% for Task1@%s, 100%% for Task2@%s", hostA_name, hostB_name);
- simgrid::s4u::Actor::createActor("worker0", hostA, worker, computation_amount, true, cpu_speed * 0.75);
- simgrid::s4u::Actor::createActor("worker1", hostB, worker, computation_amount, true, cpu_speed);
+ simgrid::s4u::Actor::create("worker0", hostA, worker, computation_amount, true, cpu_speed * 0.75);
+ simgrid::s4u::Actor::create("worker1", hostB, worker, computation_amount, true, cpu_speed);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO("### Test: no bound for Task1@%s, 25%% for Task2@%s", hostA_name, hostB_name);
- simgrid::s4u::Actor::createActor("worker0", hostA, worker, computation_amount, false, 0);
- simgrid::s4u::Actor::createActor("worker1", hostB, worker, computation_amount, true, cpu_speed / 4);
+ simgrid::s4u::Actor::create("worker0", hostA, worker, computation_amount, false, 0);
+ simgrid::s4u::Actor::create("worker1", hostB, worker, computation_amount, true, cpu_speed / 4);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO("### Test: 75%% for Task1@%s, 25%% for Task2@%s", hostA_name, hostB_name);
- simgrid::s4u::Actor::createActor("worker0", hostA, worker, computation_amount, true, cpu_speed * 0.75);
- simgrid::s4u::Actor::createActor("worker1", hostB, worker, computation_amount, true, cpu_speed / 4);
+ simgrid::s4u::Actor::create("worker0", hostA, worker, computation_amount, true, cpu_speed * 0.75);
+ simgrid::s4u::Actor::create("worker1", hostB, worker, computation_amount, true, cpu_speed / 4);
simgrid::s4u::this_actor::sleep_for(1000);
}
const double computation_amount = cpu_speed * 10;
XBT_INFO("# 10. (a) Put a task on a VM without any bound.");
- simgrid::s4u::Actor::createActor("worker0", vm0, worker, computation_amount, false, 0);
+ simgrid::s4u::Actor::create("worker0", vm0, worker, computation_amount, false, 0);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO(" ");
XBT_INFO("# 10. (b) set 10%% bound to the VM, and then put a task on the VM.");
vm0->setBound(cpu_speed / 10);
- simgrid::s4u::Actor::createActor("worker0", vm0, worker, computation_amount, false, 0);
+ simgrid::s4u::Actor::create("worker0", vm0, worker, computation_amount, false, 0);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO(" ");
XBT_INFO(" ");
XBT_INFO("# 10. (d) Put a task again on the VM.");
- simgrid::s4u::Actor::createActor("worker0", vm0, worker, computation_amount, false, 0);
+ simgrid::s4u::Actor::create("worker0", vm0, worker, computation_amount, false, 0);
simgrid::s4u::this_actor::sleep_for(1000);
XBT_INFO(" ");
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("master_", simgrid::s4u::Host::by_name("Fafard"), master_main);
+ simgrid::s4u::Actor::create("master_", simgrid::s4u::Host::by_name("Fafard"), master_main);
e.run();
XBT_INFO("Bye (simulation time %g)", simgrid::s4u::Engine::getClock());
static void vm_migrate_async(simgrid::s4u::VirtualMachine* vm, simgrid::s4u::Host* dst_pm)
{
- simgrid::s4u::Actor::createActor("mig_wrk", simgrid::s4u::Host::current(), vm_migrate, vm, dst_pm);
+ simgrid::s4u::Actor::create("mig_wrk", simgrid::s4u::Host::current(), vm_migrate, vm, dst_pm);
}
static void master_main()
/* load the platform file */
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("master_", simgrid::s4u::Host::by_name("Fafard"), master_main);
+ simgrid::s4u::Actor::create("master_", simgrid::s4u::Host::by_name("Fafard"), master_main);
e.run();
static void launch_computation_worker(s4u_Host* host)
{
- simgrid::s4u::Actor::createActor("compute", host, computation_fun);
+ simgrid::s4u::Actor::create("compute", host, computation_fun);
}
struct s_payload {
std::vector<std::string> args;
args.push_back(mbox_name);
- simgrid::s4u::Actor::createActor("comm_tx", tx_host, communication_tx_fun, args);
+ simgrid::s4u::Actor::create("comm_tx", tx_host, communication_tx_fun, args);
- simgrid::s4u::Actor::createActor("comm_rx", rx_host, communication_rx_fun, args);
+ simgrid::s4u::Actor::create("comm_rx", rx_host, communication_rx_fun, args);
}
static void master_main()
sg_vm_live_migration_plugin_init();
e.loadPlatform(argv[1]); /* - Load the platform description */
- simgrid::s4u::Actor::createActor("master_", simgrid::s4u::Host::by_name("Fafard"), master_main);
+ simgrid::s4u::Actor::create("master_", simgrid::s4u::Host::by_name("Fafard"), master_main);
e.run();
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s platform.xml\n", argv[0], argv[0]);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("Boot Monitor", simgrid::s4u::Host::by_name("MyHost2"), monitor);
+ simgrid::s4u::Actor::create("Boot Monitor", simgrid::s4u::Host::by_name("MyHost2"), monitor);
e.run();
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-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. */
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("dvfs_test", simgrid::s4u::Host::by_name("MyHost1"), dvfs);
+ simgrid::s4u::Actor::create("dvfs_test", simgrid::s4u::Host::by_name("MyHost1"), dvfs);
e.run();
-/* 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. */
} else { // No parameter at all? Then use the default value
argSender.push_back("25000");
}
- simgrid::s4u::Actor::createActor("sender", simgrid::s4u::Host::by_name("MyHost1"), sender, argSender);
- simgrid::s4u::Actor::createActor("receiver", simgrid::s4u::Host::by_name("MyHost2"), receiver, argReceiver);
+ simgrid::s4u::Actor::create("sender", simgrid::s4u::Host::by_name("MyHost1"), sender, argSender);
+ simgrid::s4u::Actor::create("receiver", simgrid::s4u::Host::by_name("MyHost2"), receiver, argReceiver);
/* And now, launch the simulation */
e.run();
-/* Copyright (c) 2007-2010, 2013-2015, 2017. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2007-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. */
vm_host2->start();
XBT_INFO("Create two tasks on Host1: both inside a VM");
- simgrid::s4u::Actor::createActor("p11", vm_host1, executor);
- simgrid::s4u::Actor::createActor("p12", vm_host1, executor);
+ simgrid::s4u::Actor::create("p11", vm_host1, executor);
+ simgrid::s4u::Actor::create("p12", vm_host1, executor);
XBT_INFO("Create two tasks on Host2: one inside a VM, the other directly on the host");
- simgrid::s4u::Actor::createActor("p21", vm_host2, executor);
- simgrid::s4u::Actor::createActor("p22", host2, executor);
+ simgrid::s4u::Actor::create("p21", vm_host2, executor);
+ simgrid::s4u::Actor::create("p22", host2, executor);
XBT_INFO("Create two tasks on Host3: both directly on the host");
- simgrid::s4u::Actor::createActor("p31", host3, executor);
- simgrid::s4u::Actor::createActor("p32", host3, executor);
+ simgrid::s4u::Actor::create("p31", host3, executor);
+ simgrid::s4u::Actor::create("p32", host3, executor);
XBT_INFO("Wait 5 seconds. The tasks are still running (they run for 3 seconds, but 2 tasks are co-located, "
"so they run for 6 seconds)");
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("dvfs", simgrid::s4u::Host::by_name("MyHost1"), dvfs);
+ simgrid::s4u::Actor::create("dvfs", simgrid::s4u::Host::by_name("MyHost1"), dvfs);
e.run();
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-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. */
{
simgrid::s4u::Engine e(&argc, argv);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("test", simgrid::s4u::Host::by_name("Fafard"), test, 7.6296e+07, 1.0);
- simgrid::s4u::Actor::createActor("test", simgrid::s4u::Host::by_name("Fafard"), test, 7.6296e+07, 2.0);
+ simgrid::s4u::Actor::create("test", simgrid::s4u::Host::by_name("Fafard"), test, 7.6296e+07, 1.0);
+ simgrid::s4u::Actor::create("test", simgrid::s4u::Host::by_name("Fafard"), test, 7.6296e+07, 2.0);
e.run();
-/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-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. */
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("executor", simgrid::s4u::Host::by_name("Tremblay"), executor, args);
- simgrid::s4u::Actor::createActor("privileged", simgrid::s4u::Host::by_name("Tremblay"), privileged, args);
+ simgrid::s4u::Actor::create("executor", simgrid::s4u::Host::by_name("Tremblay"), executor, args);
+ simgrid::s4u::Actor::create("privileged", simgrid::s4u::Host::by_name("Tremblay"), privileged, args);
e.run();
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-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. */
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("dvfs_test", simgrid::s4u::Host::by_name("MyHost1"), dvfs);
- simgrid::s4u::Actor::createActor("dvfs_test", simgrid::s4u::Host::by_name("MyHost2"), dvfs);
+ simgrid::s4u::Actor::create("dvfs_test", simgrid::s4u::Host::by_name("MyHost1"), dvfs);
+ simgrid::s4u::Actor::create("dvfs_test", simgrid::s4u::Host::by_name("MyHost2"), dvfs);
e.run();
-/* 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. */
{
XBT_INFO("Create one monitored task, and wait for it");
simgrid::s4u::ExecPtr activity = simgrid::s4u::this_actor::exec_async(1e9);
- simgrid::s4u::Actor::createActor("monitor 1", simgrid::s4u::Host::by_name("Tremblay"), monitor, activity);
+ simgrid::s4u::Actor::create("monitor 1", simgrid::s4u::Host::by_name("Tremblay"), monitor, activity);
activity->wait(); // This blocks until the activity is over
XBT_INFO("The monitored task is over. Let's start 3 of them now.");
- simgrid::s4u::Actor::createActor("monitor 2", simgrid::s4u::Host::by_name("Jupiter"), monitor,
- simgrid::s4u::this_actor::exec_async(1e9));
- simgrid::s4u::Actor::createActor("monitor 3", simgrid::s4u::Host::by_name("Ginette"), monitor,
- simgrid::s4u::this_actor::exec_async(1e9));
- simgrid::s4u::Actor::createActor("monitor 4", simgrid::s4u::Host::by_name("Bourassa"), monitor,
- simgrid::s4u::this_actor::exec_async(1e9));
+ simgrid::s4u::Actor::create("monitor 2", simgrid::s4u::Host::by_name("Jupiter"), monitor,
+ simgrid::s4u::this_actor::exec_async(1e9));
+ simgrid::s4u::Actor::create("monitor 3", simgrid::s4u::Host::by_name("Ginette"), monitor,
+ simgrid::s4u::this_actor::exec_async(1e9));
+ simgrid::s4u::Actor::create("monitor 4", simgrid::s4u::Host::by_name("Bourassa"), monitor,
+ simgrid::s4u::this_actor::exec_async(1e9));
XBT_INFO("All activities are started; finish now");
// Waiting execution activities is not mandatory: they go to completion once started
simgrid::s4u::Engine e(&argc, argv);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("executor", simgrid::s4u::Host::by_name("Fafard"), executor);
+ simgrid::s4u::Actor::create("executor", simgrid::s4u::Host::by_name("Fafard"), executor);
e.run();
e.loadPlatform(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.");
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-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. */
{
simgrid::s4u::Engine e(&argc, argv);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("test", simgrid::s4u::Host::by_name("Fafard"), wizard);
+ simgrid::s4u::Actor::create("test", simgrid::s4u::Host::by_name("Fafard"), wizard);
e.run();
simgrid::s4u::Engine e(&argc, argv);
sg_storage_file_system_init();
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("host", simgrid::s4u::Host::by_name("denise"), MyHost());
+ simgrid::s4u::Actor::create("host", simgrid::s4u::Host::by_name("denise"), MyHost());
e.run();
return 0;
simgrid::s4u::Engine e(&argc, argv);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("", simgrid::s4u::Host::by_name("denise"), host);
+ simgrid::s4u::Actor::create("", simgrid::s4u::Host::by_name("denise"), host);
e.run();
XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::getClock());
-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-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. */
for (int i = 0; i < NB_ACTOR * 2 ; i++) {
// To create a worker use the static method simgrid::s4u::Actor.
if((i % 2) == 0 )
- simgrid::s4u::Actor::createActor("worker", simgrid::s4u::Host::by_name("Jupiter"), workerLockGuard, mutex, std::ref(result));
+ simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Jupiter"), workerLockGuard, mutex,
+ std::ref(result));
else
- simgrid::s4u::Actor::createActor("worker", simgrid::s4u::Host::by_name("Tremblay"), worker, mutex, std::ref(result));
+ simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Tremblay"), worker, mutex, std::ref(result));
}
simgrid::s4u::this_actor::sleep_for(10);
{
simgrid::s4u::Engine e(&argc, argv);
e.loadPlatform("../../platforms/two_hosts.xml");
- simgrid::s4u::Actor::createActor("main", simgrid::s4u::Host::by_name("Tremblay"), master);
+ simgrid::s4u::Actor::create("main", simgrid::s4u::Host::by_name("Tremblay"), master);
e.run();
return 0;
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-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. */
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("load_test", simgrid::s4u::Host::by_name("MyHost1"), execute_load_test);
- simgrid::s4u::Actor::createActor("change_speed", simgrid::s4u::Host::by_name("MyHost1"), change_speed);
+ simgrid::s4u::Actor::create("load_test", simgrid::s4u::Host::by_name("MyHost1"), execute_load_test);
+ simgrid::s4u::Actor::create("change_speed", simgrid::s4u::Host::by_name("MyHost1"), change_speed);
e.run();
static ActorPtr self();
/** Signal to others that a new actor has been created **/
- static simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> onCreation;
+ static simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> on_creation;
/** Signal indicating that the given actor is about to disappear */
- static simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> onDestruction;
+ static simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> on_destruction;
/** Create an actor using a function
*
* If the actor is restarted, the actor has a fresh copy of the function.
*/
- static ActorPtr createActor(const char* name, s4u::Host* host, std::function<void()> code);
+ static ActorPtr create(const char* name, s4u::Host* host, std::function<void()> code);
- static ActorPtr createActor(const char* name, s4u::Host* host, std::function<void(std::vector<std::string>*)> code,
- std::vector<std::string>* args)
+ static ActorPtr create(const char* name, s4u::Host* host, std::function<void(std::vector<std::string>*)> code,
+ std::vector<std::string>* args)
{
- return createActor(name, host, [code](std::vector<std::string>* args) { code(args); }, args);
+ return create(name, host, [code](std::vector<std::string>* args) { code(args); }, args);
}
/** Create an actor using code
* state. In order to use auto-restart, an explicit `function` must be passed
* instead.
*/
- template<class F, class... Args,
- // This constructor is enabled only if the call code(args...) is valid:
- typename = typename std::result_of<F(Args...)>::type
- >
- static ActorPtr createActor(const char* name, s4u::Host *host, F code, Args... args)
+ template <class F, class... Args,
+ // This constructor is enabled only if the call code(args...) is valid:
+ typename = typename std::result_of<F(Args...)>::type>
+ static ActorPtr create(const char* name, s4u::Host* host, F code, Args... args)
{
- return createActor(name, host, wrap_task(std::move(code), std::move(args)...));
+ return create(name, host, wrap_task(std::move(code), std::move(args)...));
}
// Create actor from function name:
-
- static ActorPtr createActor(const char* name, s4u::Host* host, const char* function, std::vector<std::string> args);
+ static ActorPtr create(const char* name, s4u::Host* host, const char* function, std::vector<std::string> args);
// ***** Methods *****
/** This actor will be automatically terminated when the last non-daemon actor finishes **/
void daemonize();
/** Returns whether or not this actor has been daemonized or not **/
- bool isDaemon();
-
- XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_name()") const simgrid::xbt::string& getName() const
- {
- return get_name();
- }
- XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_cname()") const char* getCname() const { return get_cname(); }
+ bool is_daemon() const;
/** Retrieves the name of that actor as a C++ string */
const simgrid::xbt::string& get_name() const;
/** Retrieves the name of that actor as a C string */
const char* get_cname() const;
/** Retrieves the host on which that actor is running */
- s4u::Host* getHost();
+ s4u::Host* get_host();
/** Retrieves the PID of that actor
*
* aid_t is an alias for long */
- aid_t getPid();
+ aid_t get_pid();
/** Retrieves the PPID of that actor
*
* aid_t is an alias for long */
- aid_t getPpid();
+ aid_t get_ppid();
/** Suspend an actor by suspending the task on which it was waiting for the completion. */
void suspend();
const char* getProperty(const char* key);
void setProperty(const char* key, const char* value);
Actor* restart();
+
+ XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr
+ createActor(const char* name, s4u::Host* host, std::function<void()> code)
+ {
+ return create(name, host, code);
+ }
+ XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr
+ createActor(const char* name, s4u::Host* host, std::function<void(std::vector<std::string>*)> code,
+ std::vector<std::string>* args)
+ {
+ return create(name, host, code, args);
+ }
+ template <class F, class... Args, typename = typename std::result_of<F(Args...)>::type>
+ XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr
+ createActor(const char* name, s4u::Host* host, F code, Args... args)
+ {
+ return create(name, host, code, std::move(args)...);
+ }
+ XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr
+ createActor(const char* name, s4u::Host* host, const char* function, std::vector<std::string> args)
+ {
+ return create(name, host, function, args);
+ }
+ XBT_ATTRIB_DEPRECATED_v323("Please use Actor::is_daemon()") bool isDaemon() const;
+ XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_name()") const simgrid::xbt::string& getName() const
+ {
+ return get_name();
+ }
+ XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_cname()") const char* getCname() const { return get_cname(); }
+ XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_host()") Host* getHost() { return get_host(); }
+ XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_pid()") aid_t getPid() { return get_pid(); }
+ XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_ppid()") aid_t getPpid() { return get_ppid(); }
};
/** @ingroup s4u_api
std::string instr_pid(msg_process_t proc)
{
- return std::string(proc->get_cname()) + "-" + std::to_string(proc->getPid());
+ return std::string(proc->get_cname()) + "-" + std::to_string(proc->get_pid());
}
void TRACE_msg_process_kill(smx_process_exit_status_t status, msg_process_t process)
std::string("__pr_mig_tx:") + vm->get_cname() + "(" + src_pm->get_cname() + "-" + dst_pm->get_cname() + ")";
simgrid::s4u::ActorPtr rx =
- simgrid::s4u::Actor::createActor(rx_name.c_str(), dst_pm, simgrid::vm::MigrationRx(vm, dst_pm));
+ simgrid::s4u::Actor::create(rx_name.c_str(), dst_pm, simgrid::vm::MigrationRx(vm, dst_pm));
simgrid::s4u::ActorPtr tx =
- simgrid::s4u::Actor::createActor(tx_name.c_str(), src_pm, simgrid::vm::MigrationTx(vm, dst_pm));
+ simgrid::s4u::Actor::create(tx_name.c_str(), src_pm, simgrid::vm::MigrationTx(vm, dst_pm));
vm->extension_set<simgrid::vm::VmMigrationExt>(new simgrid::vm::VmMigrationExt(simgrid::s4u::Actor::self(), rx, tx));
namespace simgrid {
namespace s4u {
-simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> s4u::Actor::onCreation;
-simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> s4u::Actor::onDestruction;
+simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> s4u::Actor::on_creation;
+simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> s4u::Actor::on_destruction;
// ***** Actor creation *****
ActorPtr Actor::self()
return self_context->process()->iface();
}
-ActorPtr Actor::createActor(const char* name, s4u::Host* host, std::function<void()> code)
+ActorPtr Actor::create(const char* name, s4u::Host* host, std::function<void()> code)
{
simgrid::kernel::actor::ActorImpl* actor = simcall_process_create(name, std::move(code), nullptr, host, nullptr);
return actor->iface();
}
-ActorPtr Actor::createActor(const char* name, s4u::Host* host, const char* function, std::vector<std::string> args)
+ActorPtr Actor::create(const char* name, s4u::Host* host, const char* function, std::vector<std::string> args)
{
simgrid::simix::ActorCodeFactory& factory = SIMIX_get_actor_code_factory(function);
simgrid::simix::ActorCode code = factory(std::move(args));
}
}
-s4u::Host* Actor::getHost()
+s4u::Host* Actor::get_host()
{
return this->pimpl_->host;
}
simgrid::simix::kernelImmediate([this]() { pimpl_->daemonize(); });
}
-bool Actor::isDaemon()
+bool Actor::is_daemon() const
{
return this->pimpl_->isDaemon();
}
return this->pimpl_->get_cname();
}
-aid_t Actor::getPid()
+aid_t Actor::get_pid()
{
return this->pimpl_->pid;
}
-aid_t Actor::getPpid()
+aid_t Actor::get_ppid()
{
return this->pimpl_->ppid;
}
* and the exceptions, so it would be called back again and again */
if (actor == nullptr || actor->getImpl() == nullptr)
return 0;
- return actor->getPid();
+ return actor->get_pid();
}
/** \ingroup m_actor_management
*/
int sg_actor_get_PPID(sg_actor_t actor)
{
- return actor->getPpid();
+ return actor->get_ppid();
}
/** \ingroup m_actor_management
sg_host_t sg_actor_get_host(sg_actor_t actor)
{
- return actor->getHost();
+ return actor->get_host();
}
/** \ingroup m_actor_management
simgrid::instr::Container::byName(process->host->get_name())->createChild(instr_pid(process->ciface()), "ACTOR");
/* The onCreation() signal must be delayed until there, where the pid and everything is set */
simgrid::s4u::ActorPtr tmp = process->iface(); // Passing this directly to onCreation will lead to crashes
- simgrid::s4u::Actor::onCreation(tmp);
+ simgrid::s4u::Actor::on_creation(tmp);
return process;
}
}
void SIMIX_process_on_exit_runall(smx_actor_t process) {
- simgrid::s4u::Actor::onDestruction(process->iface());
+ simgrid::s4u::Actor::on_destruction(process->iface());
smx_process_exit_status_t exit_status = (process->context->iwannadie) ? SMX_EXIT_FAILURE : SMX_EXIT_SUCCESS;
while (not process->on_exit.empty()) {
s_smx_process_exit_fun_t exit_fun = process->on_exit.back();
static int getPid(MPI_Comm comm, int id)
{
simgrid::s4u::ActorPtr actor = comm->group()->actor(id);
- return (actor == nullptr) ? MPI_UNDEFINED : actor->getPid();
+ return (actor == nullptr) ? MPI_UNDEFINED : actor->get_pid();
}
/* PMPI User level calls */
int my_proc_id = simgrid::s4u::this_actor::getPid();
MPI_Group group;
win->get_group(&group);
- int dst_traced = group->actor(target_rank)->getPid();
+ int dst_traced = group->actor(target_rank)->get_pid();
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("Put", target_rank, origin_datatype->is_replayable()
? origin_count
int my_proc_id = simgrid::s4u::this_actor::getPid();
MPI_Group group;
win->get_group(&group);
- int dst_traced = group->actor(target_rank)->getPid();
+ int dst_traced = group->actor(target_rank)->get_pid();
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
"Rput", target_rank,
void smpi_execute_flops(double flops) {
xbt_assert(flops >= 0, "You're trying to execute a negative amount of flops (%f)!", flops);
XBT_DEBUG("Handle real computation time: %f flops", flops);
- smx_activity_t action = simcall_execution_start("computation", flops, 1, 0, smpi_process()->process()->getHost());
+ smx_activity_t action = simcall_execution_start("computation", flops, 1, 0, smpi_process()->process()->get_host());
simcall_set_category (action, TRACE_internal_smpi_get_category());
simcall_execution_wait(action);
smpi_switch_data_segment(simgrid::s4u::Actor::self());
// Called either directly from the user code, or from the code called by smpirun
void SMPI_init(){
- simgrid::s4u::Actor::onCreation.connect([](simgrid::s4u::ActorPtr actor) {
- if (not actor->isDaemon()) {
+ simgrid::s4u::Actor::on_creation.connect([](simgrid::s4u::ActorPtr actor) {
+ if (not actor->is_daemon()) {
process_data.insert({actor, new simgrid::smpi::Process(actor, nullptr)});
}
});
- simgrid::s4u::Actor::onDestruction.connect([](simgrid::s4u::ActorPtr actor) {
+ simgrid::s4u::Actor::on_destruction.connect([](simgrid::s4u::ActorPtr actor) {
auto it = process_data.find(actor);
if (it != process_data.end()) {
delete it->second;
/** Map a given SMPI privatization segment (make a SMPI process active) */
void smpi_switch_data_segment(simgrid::s4u::ActorPtr actor)
{
- if (smpi_loaded_page == actor->getPid()) // no need to switch, we've already loaded the one we want
+ if (smpi_loaded_page == actor->get_pid()) // no need to switch, we've already loaded the one we want
return;
// So the job:
#if HAVE_PRIVATIZATION
// FIXME, cross-process support (mmap across process when necessary)
- XBT_DEBUG("Switching data frame to the one of process %ld", actor->getPid());
+ XBT_DEBUG("Switching data frame to the one of process %ld", actor->get_pid());
simgrid::smpi::Process* process = smpi_process_remote(actor);
int current = process->privatized_region()->file_descriptor;
void* tmp =
mmap(TOPAGE(smpi_data_exe_start), smpi_data_exe_size, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, current, 0);
if (tmp != TOPAGE(smpi_data_exe_start))
xbt_die("Couldn't map the new region (errno %d): %s", errno, strerror(errno));
- smpi_loaded_page = actor->getPid();
+ smpi_loaded_page = actor->get_pid();
#endif
}
Process::Process(ActorPtr actor, msg_bar_t finalization_barrier)
: finalization_barrier_(finalization_barrier), process_(actor)
{
- mailbox_ = simgrid::s4u::Mailbox::byName("SMPI-" + std::to_string(process_->getPid()));
- mailbox_small_ = simgrid::s4u::Mailbox::byName("small-" + std::to_string(process_->getPid()));
+ mailbox_ = simgrid::s4u::Mailbox::byName("SMPI-" + std::to_string(process_->get_pid()));
+ mailbox_small_ = simgrid::s4u::Mailbox::byName("small-" + std::to_string(process_->get_pid()));
mailboxes_mutex_ = xbt_mutex_init();
timer_ = xbt_os_timer_new();
state_ = SMPI_UNINITIALIZED;
argv_ = argv;
// set the process attached to the mailbox
mailbox_small_->setReceiver(process_);
- XBT_DEBUG("<%ld> SMPI process has been initialized: %p", process_->getPid(), process_.get());
+ XBT_DEBUG("<%ld> SMPI process has been initialized: %p", process_->get_pid(), process_.get());
}
/** @brief Prepares the current process for termination. */
void Process::finalize()
{
state_ = SMPI_FINALIZED;
- XBT_DEBUG("<%ld> Process left the game", process_->getPid());
+ XBT_DEBUG("<%ld> Process left the game", process_->get_pid());
// This leads to an explosion of the search graph which cannot be reduced:
if(MC_is_active() || MC_record_replay_is_active())
explicit SendAction(std::string name) : ReplayAction(name) {}
void kernel(simgrid::xbt::ReplayAction& action) override
{
- int dst_traced = MPI_COMM_WORLD->group()->actor(args.partner)->getPid();
+ int dst_traced = MPI_COMM_WORLD->group()->actor(args.partner)->get_pid();
TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size,
Datatype::encode(args.datatype1)));
explicit RecvAction(std::string name) : ReplayAction(name) {}
void kernel(simgrid::xbt::ReplayAction& action) override
{
- int src_traced = MPI_COMM_WORLD->group()->actor(args.partner)->getPid();
+ int src_traced = MPI_COMM_WORLD->group()->actor(args.partner)->get_pid();
TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size,
Datatype::encode(args.datatype1)));
void kernel(simgrid::xbt::ReplayAction& action) override
{
TRACE_smpi_comm_in(my_proc_id, "action_bcast",
- new simgrid::instr::CollTIData("bcast", MPI_COMM_WORLD->group()->actor(args.root)->getPid(),
+ new simgrid::instr::CollTIData("bcast", MPI_COMM_WORLD->group()->actor(args.root)->get_pid(),
-1.0, args.size, -1, Datatype::encode(args.datatype1), ""));
Colls::bcast(send_buffer(args.size * args.datatype1->size()), args.size, args.datatype1, args.root, MPI_COMM_WORLD);
void kernel(simgrid::xbt::ReplayAction& action) override
{
TRACE_smpi_comm_in(my_proc_id, "action_reduce",
- new simgrid::instr::CollTIData("reduce", MPI_COMM_WORLD->group()->actor(args.root)->getPid(), args.comp_size,
- args.comm_size, -1, Datatype::encode(args.datatype1), ""));
+ new simgrid::instr::CollTIData("reduce", MPI_COMM_WORLD->group()->actor(args.root)->get_pid(),
+ args.comp_size, args.comm_size, -1,
+ Datatype::encode(args.datatype1), ""));
Colls::reduce(send_buffer(args.comm_size * args.datatype1->size()),
recv_buffer(args.comm_size * args.datatype1->size()), args.comm_size, args.datatype1, MPI_OP_NULL, args.root, MPI_COMM_WORLD);
void Group::set_mapping(simgrid::s4u::ActorPtr actor, int rank)
{
if (0 <= rank && rank < size_) {
- int index = actor->getPid();
+ int index = actor->get_pid();
rank_to_index_map_[rank] = index;
if (index != MPI_UNDEFINED) {
if ((unsigned)index >= index_to_rank_map_.size())
{
return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
- comm->group()->actor(dst)->getPid(), tag, comm, PERSISTENT | SEND | PREPARED);
+ comm->group()->actor(dst)->get_pid(), tag, comm, PERSISTENT | SEND | PREPARED);
}
MPI_Request Request::ssend_init(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
{
return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
- comm->group()->actor(dst)->getPid(), tag, comm, PERSISTENT | SSEND | SEND | PREPARED);
+ comm->group()->actor(dst)->get_pid(), tag, comm, PERSISTENT | SSEND | SEND | PREPARED);
}
MPI_Request Request::isend_init(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
{
return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
- comm->group()->actor(dst)->getPid(), tag, comm, PERSISTENT | ISEND | SEND | PREPARED);
+ comm->group()->actor(dst)->get_pid(), tag, comm, PERSISTENT | ISEND | SEND | PREPARED);
}
{
MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
if(op==MPI_OP_NULL){
- request = new Request(buf==MPI_BOTTOM ? nullptr : buf , count, datatype, comm->group()->actor(src)->getPid(),
- comm->group()->actor(dst)->getPid(), tag,
- comm, RMA | NON_PERSISTENT | ISEND | SEND | PREPARED);
+ request =
+ new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, comm->group()->actor(src)->get_pid(),
+ comm->group()->actor(dst)->get_pid(), tag, comm, RMA | NON_PERSISTENT | ISEND | SEND | PREPARED);
}else{
- request = new Request(buf==MPI_BOTTOM ? nullptr : buf, count, datatype, comm->group()->actor(src)->getPid(),
- comm->group()->actor(dst)->getPid(), tag,
- comm, RMA | NON_PERSISTENT | ISEND | SEND | PREPARED | ACCUMULATE);
+ request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, comm->group()->actor(src)->get_pid(),
+ comm->group()->actor(dst)->get_pid(), tag, comm,
+ RMA | NON_PERSISTENT | ISEND | SEND | PREPARED | ACCUMULATE);
request->op_ = op;
}
return request;
MPI_Request Request::recv_init(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm)
{
return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype,
- src == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(src)->getPid(),
+ src == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(src)->get_pid(),
simgrid::s4u::this_actor::getPid(), tag, comm, PERSISTENT | RECV | PREPARED);
}
{
MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
if(op==MPI_OP_NULL){
- request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, comm->group()->actor(src)->getPid(), comm->group()->actor(dst)->getPid(), tag, comm,
- RMA | NON_PERSISTENT | RECV | PREPARED);
+ request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, comm->group()->actor(src)->get_pid(),
+ comm->group()->actor(dst)->get_pid(), tag, comm, RMA | NON_PERSISTENT | RECV | PREPARED);
}else{
- request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, comm->group()->actor(src)->getPid(), comm->group()->actor(dst)->getPid(), tag, comm,
+ request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, comm->group()->actor(src)->get_pid(),
+ comm->group()->actor(dst)->get_pid(), tag, comm,
RMA | NON_PERSISTENT | RECV | PREPARED | ACCUMULATE);
request->op_ = op;
}
MPI_Request Request::irecv_init(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm)
{
return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype,
- src == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(src)->getPid(),
+ src == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(src)->get_pid(),
simgrid::s4u::this_actor::getPid(), tag, comm, PERSISTENT | RECV | PREPARED);
}
{
MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
- comm->group()->actor(dst)->getPid(), tag, comm, NON_PERSISTENT | ISEND | SEND);
+ comm->group()->actor(dst)->get_pid(), tag, comm, NON_PERSISTENT | ISEND | SEND);
request->start();
return request;
}
{
MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
- comm->group()->actor(dst)->getPid(), tag, comm, NON_PERSISTENT | ISEND | SSEND | SEND);
+ comm->group()->actor(dst)->get_pid(), tag, comm, NON_PERSISTENT | ISEND | SSEND | SEND);
request->start();
return request;
}
{
MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype,
- src == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(src)->getPid(),
+ src == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(src)->get_pid(),
simgrid::s4u::this_actor::getPid(), tag, comm, NON_PERSISTENT | RECV);
request->start();
return request;
{
MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
- comm->group()->actor(dst)->getPid(), tag, comm, NON_PERSISTENT | SEND);
+ comm->group()->actor(dst)->get_pid(), tag, comm, NON_PERSISTENT | SEND);
request->start();
wait(&request, MPI_STATUS_IGNORE);
{
MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
- comm->group()->actor(dst)->getPid(), tag, comm, NON_PERSISTENT | SSEND | SEND);
+ comm->group()->actor(dst)->get_pid(), tag, comm, NON_PERSISTENT | SSEND | SEND);
request->start();
wait(&request,MPI_STATUS_IGNORE);
MPI_Request requests[2];
MPI_Status stats[2];
int myid = simgrid::s4u::this_actor::getPid();
- if ((comm->group()->actor(dst)->getPid() == myid) && (comm->group()->actor(src)->getPid() == myid)){
- Datatype::copy(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype);
- if(status !=MPI_STATUS_IGNORE){
- status->MPI_SOURCE = src;
- status->MPI_TAG = recvtag;
- status->MPI_ERROR = MPI_SUCCESS;
- status->count = sendcount*sendtype->size();
- }
- return;
+ if ((comm->group()->actor(dst)->get_pid() == myid) && (comm->group()->actor(src)->get_pid() == myid)) {
+ Datatype::copy(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype);
+ if (status != MPI_STATUS_IGNORE) {
+ status->MPI_SOURCE = src;
+ status->MPI_TAG = recvtag;
+ status->MPI_ERROR = MPI_SUCCESS;
+ status->count = sendcount * sendtype->size();
+ }
+ return;
}
requests[0] = isend_init(sendbuf, sendcount, sendtype, dst, sendtag, comm);
requests[1] = irecv_init(recvbuf, recvcount, recvtype, src, recvtag, comm);
if (detached_ != 0 || ((flags_ & (ISEND | SSEND)) != 0)) { // issend should be treated as isend
// isend and send timings may be different
sleeptime = ((flags_ & ISEND) != 0)
- ? simgrid::s4u::Actor::self()->getHost()->extension<simgrid::smpi::SmpiHost>()->oisend(size_)
- : simgrid::s4u::Actor::self()->getHost()->extension<simgrid::smpi::SmpiHost>()->osend(size_);
+ ? simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::SmpiHost>()->oisend(size_)
+ : simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::SmpiHost>()->osend(size_);
}
if(sleeptime > 0.0){
// nsleeps is a multiplier to the sleeptime, to increase speed of execution, each failed iprobe will increase it
// This can speed up the execution of certain applications by an order of magnitude, such as HPL
static int nsleeps = 1;
- double speed = simgrid::s4u::Actor::self()->getHost()->getSpeed();
+ double speed = simgrid::s4u::Actor::self()->get_host()->getSpeed();
double maxrate = xbt_cfg_get_double("smpi/iprobe-cpu-usage");
MPI_Request request = new Request(nullptr, 0, MPI_CHAR,
- source == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(source)->getPid(),
+ source == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(source)->get_pid(),
simgrid::s4u::this_actor::getPid(), tag, comm, PERSISTENT | RECV);
if (smpi_iprobe_sleep > 0) {
smx_activity_t iprobe_sleep = simcall_execution_start(
if(req->detached_sender_ != nullptr){
//integrate pseudo-timing for buffering of small messages, do not bother to execute the simcall if 0
double sleeptime =
- simgrid::s4u::Actor::self()->getHost()->extension<simgrid::smpi::SmpiHost>()->orecv(req->real_size());
+ simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::SmpiHost>()->orecv(req->real_size());
if(sleeptime > 0.0){
simcall_process_sleep(sleeptime);
XBT_DEBUG("receiving size of %zu : sleep %f ", req->real_size_, sleeptime);
size = 0;
std::vector<MPI_Request> myreqqs;
std::vector<MPI_Request>::iterator iter = reqqs->begin();
- int proc_id = comm_->group()->actor(rank)->getPid();
+ int proc_id = comm_->group()->actor(rank)->get_pid();
while (iter != reqqs->end()){
// Let's see if we're either the destination or the sender of this request
// because we only wait for requests that we are responsible for.
return;
std::string name = std::string("dvfs-daemon-") + host.get_cname();
- simgrid::s4u::ActorPtr daemon = simgrid::s4u::Actor::createActor(name.c_str(), &host, []() {
+ simgrid::s4u::ActorPtr daemon = simgrid::s4u::Actor::create(name.c_str(), &host, []() {
/**
* This lambda function is the function the actor (daemon) will execute
* all the time - in the case of the dvfs plugin, this controls when to
* lower/raise the frequency.
*/
- simgrid::s4u::ActorPtr daemonProc = simgrid::s4u::Actor::self();
+ simgrid::s4u::ActorPtr daemon_proc = simgrid::s4u::Actor::self();
- XBT_DEBUG("DVFS process on %s is a daemon: %d", daemonProc->getHost()->get_cname(), daemonProc->isDaemon());
+ XBT_DEBUG("DVFS process on %s is a daemon: %d", daemon_proc->get_host()->get_cname(), daemon_proc->is_daemon());
std::string dvfs_governor;
- const char* host_conf = daemonProc->getHost()->getProperty(property_governor);
+ const char* host_conf = daemon_proc->get_host()->getProperty(property_governor);
if (host_conf != nullptr) {
- dvfs_governor = std::string(daemonProc->getHost()->getProperty(property_governor));
+ dvfs_governor = std::string(daemon_proc->get_host()->getProperty(property_governor));
boost::algorithm::to_lower(dvfs_governor);
} else {
dvfs_governor = xbt_cfg_get_string(property_governor);
boost::algorithm::to_lower(dvfs_governor);
}
- auto governor = [&dvfs_governor, &daemonProc]() {
+ auto governor = [&dvfs_governor, &daemon_proc]() {
if (dvfs_governor == "conservative") {
return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
- new simgrid::plugin::dvfs::Conservative(daemonProc->getHost()));
+ new simgrid::plugin::dvfs::Conservative(daemon_proc->get_host()));
} else if (dvfs_governor == "ondemand") {
return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
- new simgrid::plugin::dvfs::OnDemand(daemonProc->getHost()));
+ new simgrid::plugin::dvfs::OnDemand(daemon_proc->get_host()));
} else if (dvfs_governor == "performance") {
return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
- new simgrid::plugin::dvfs::Performance(daemonProc->getHost()));
+ new simgrid::plugin::dvfs::Performance(daemon_proc->get_host()));
} else if (dvfs_governor == "powersave") {
return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
- new simgrid::plugin::dvfs::Powersave(daemonProc->getHost()));
+ new simgrid::plugin::dvfs::Powersave(daemon_proc->get_host()));
} else {
XBT_CRITICAL("No governor specified for host %s, falling back to Performance",
- daemonProc->getHost()->get_cname());
+ daemon_proc->get_host()->get_cname());
return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
- new simgrid::plugin::dvfs::Performance(daemonProc->getHost()));
+ new simgrid::plugin::dvfs::Performance(daemon_proc->get_host()));
}
}();
simgrid::s4u::this_actor::getHost()->actorList(actor_list);
for (auto const& actor : *actor_list) {
- XBT_INFO("Actor (pid=%ld, ppid=%ld, name=%s)", actor->getPid(), actor->getPpid(), actor->get_cname());
- if (simgrid::s4u::this_actor::getPid() != actor->getPid())
+ XBT_INFO("Actor (pid=%ld, ppid=%ld, name=%s)", actor->get_pid(), actor->get_ppid(), actor->get_cname());
+ if (simgrid::s4u::this_actor::getPid() != actor->get_pid())
actor->kill();
}
simgrid::s4u::ActorPtr actor =
- simgrid::s4u::Actor::createActor("worker from master", simgrid::s4u::this_actor::getHost(), worker);
+ simgrid::s4u::Actor::create("worker from master", simgrid::s4u::this_actor::getHost(), worker);
simgrid::s4u::this_actor::sleep_for(2);
- XBT_INFO("Suspend Actor (pid=%ld)", actor->getPid());
+ XBT_INFO("Suspend Actor (pid=%ld)", actor->get_pid());
actor->suspend();
- XBT_INFO("Actor (pid=%ld) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
+ XBT_INFO("Actor (pid=%ld) is %ssuspended", actor->get_pid(), actor->isSuspended() ? "" : "not ");
simgrid::s4u::this_actor::sleep_for(2);
- XBT_INFO("Resume Actor (pid=%ld)", actor->getPid());
+ XBT_INFO("Resume Actor (pid=%ld)", actor->get_pid());
actor->resume();
- XBT_INFO("Actor (pid=%ld) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
+ XBT_INFO("Actor (pid=%ld) is %ssuspended", actor->get_pid(), actor->isSuspended() ? "" : "not ");
simgrid::s4u::this_actor::sleep_for(2);
actor->kill();
simgrid::s4u::Engine e(&argc, argv);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("master", simgrid::s4u::Host::by_name("Tremblay"), master);
- simgrid::s4u::Actor::createActor("worker", simgrid::s4u::Host::by_name("Tremblay"), worker);
+ simgrid::s4u::Actor::create("master", simgrid::s4u::Host::by_name("Tremblay"), master);
+ simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Tremblay"), worker);
e.run();
XBT_INFO("Simulation time %g", e.getClock());
static simgrid::s4u::ActorPtr vm_migrate_async(simgrid::s4u::VirtualMachine* vm, simgrid::s4u::Host* dst_pm)
{
- return simgrid::s4u::Actor::createActor("mig_wrk", simgrid::s4u::Host::current(), vm_migrate, vm, dst_pm);
+ return simgrid::s4u::Actor::create("mig_wrk", simgrid::s4u::Host::current(), vm_migrate, vm, dst_pm);
}
static void master_main()
/* load the platform file */
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("master_", simgrid::s4u::Host::by_name("Fafard"), master_main);
+ simgrid::s4u::Actor::create("master_", simgrid::s4u::Host::by_name("Fafard"), master_main);
e.run();
std::vector<simgrid::s4u::Host*> hosts = e.getAllHosts();
- simgrid::s4u::Actor::createActor("sender", hosts[0], sender, argSend);
- simgrid::s4u::Actor::createActor("recver", hosts[1], receiver, argRecv);
+ simgrid::s4u::Actor::create("sender", hosts[0], sender, argSend);
+ simgrid::s4u::Actor::create("recver", hosts[1], receiver, argRecv);
e.run();
XBT_INFO("Simulation time %g", e.getClock());
e.loadPlatform(argv[1]);
for (int i = 0; i < 5; i++)
- simgrid::s4u::Actor::createActor("host", simgrid::s4u::Host::by_name("bob"), host);
+ simgrid::s4u::Actor::create("host", simgrid::s4u::Host::by_name("bob"), host);
e.run();
XBT_INFO("Simulation time %g", e.getClock());
simgrid::s4u::Engine e(&argc, argv);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("master", simgrid::s4u::Host::by_name("Tremblay"), master);
- simgrid::s4u::Actor::createActor("worker", simgrid::s4u::Host::by_name("Jupiter"), worker);
+ simgrid::s4u::Actor::create("master", simgrid::s4u::Host::by_name("Tremblay"), master);
+ simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Jupiter"), worker);
e.run();
XBT_INFO("Simulation time %g", e.getClock());
simgrid::s4u::Engine e(&argc, argv);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("test", simgrid::s4u::Host::by_name("Tremblay"), server);
+ simgrid::s4u::Actor::create("test", simgrid::s4u::Host::by_name("Tremblay"), server);
e.run();
simgrid::s4u::Actor::killAll();
- simgrid::s4u::Actor::createActor("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid);
- simgrid::s4u::Actor::createActor("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid);
- simgrid::s4u::Actor::createActor("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid);
- simgrid::s4u::Actor::createActor("killall", simgrid::s4u::Host::by_name("Tremblay"), killall);
+ simgrid::s4u::Actor::create("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid);
+ simgrid::s4u::Actor::create("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid);
+ simgrid::s4u::Actor::create("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid);
+ simgrid::s4u::Actor::create("killall", simgrid::s4u::Host::by_name("Tremblay"), killall);
e.run();
xbt_assert(argc == 2, "Usage: %s platform_file\n", argv[0]);
e.loadPlatform(argv[1]);
- simgrid::s4u::Actor::createActor("server", simgrid::s4u::Host::by_name("alice"), server);
- simgrid::s4u::Actor::createActor("client", simgrid::s4u::Host::by_name("bob"), client);
+ simgrid::s4u::Actor::create("server", simgrid::s4u::Host::by_name("alice"), server);
+ simgrid::s4u::Actor::create("client", simgrid::s4u::Host::by_name("bob"), client);
e.run();