XBT_LOG_NEW_DEFAULT_CATEGORY(actor_daemon, "Messages specific for this example");
-/* The worker process, working for a while before leaving */
+/* The worker actor, working for a while before leaving */
static void worker(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
{
XBT_INFO("Let's do some work (for 10 sec on Boivin).");
XBT_INFO("I'm done now. I leave even if it makes the daemon die.");
}
-/* The daemon, displaying a message every 3 seconds until all other processes stop */
+/* The daemon, displaying a message every 3 seconds until all other actors stop */
static void my_daemon(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
{
sg_actor_daemonize(sg_actor_self());
sg_actor_sleep_for(3.0);
}
- XBT_INFO("I will never reach that point: daemons are killed when regular processes are done");
+ XBT_INFO("I will never reach that point: daemons are killed when regular actors are done");
}
int main(int argc, char* argv[])
static void killer_fun(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
{
- XBT_INFO("Hello!"); /* - First start a victim process */
+ XBT_INFO("Hello!"); /* - First start a victim actor */
sg_actor_t victimA = sg_actor_create("victim A", sg_host_by_name("Fafard"), victimA_fun, 0, NULL);
sg_actor_t victimB = sg_actor_create("victim B", sg_host_by_name("Jupiter"), victimB_fun, 0, NULL);
simgrid_load_platform(argv[1]);
- /* - Create and deploy killer process, that will create the victim process */
+ /* - Create and deploy killer actor, that will create the victim actor */
sg_actor_create("killer", sg_host_by_name("Tremblay"), killer_fun, 0, NULL);
simgrid_run();
XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Messages specific for this example");
-/* Executed on process termination*/
+/* Executed on actor termination*/
static int my_onexit(XBT_ATTRIB_UNUSED int ignored1, XBT_ATTRIB_UNUSED void* ignored2)
{
XBT_INFO("Exiting now (done sleeping or got killed)."); /* - Just display an informative message (see tesh file) */
simgrid_load_platform(argv[1]); /* - Load the platform description */
simgrid_register_function("sleeper", sleeper);
- simgrid_load_deployment(argv[2]); /* - Deploy the sleeper processes with explicit start/kill times */
+ simgrid_load_deployment(argv[2]); /* - Deploy the sleeper actors with explicit start/kill times */
simgrid_run(); /* - Run the simulation */
sg_actor_sleep_for(5);
- XBT_INFO("After 5 seconds, move the process to %s", sg_host_get_name(jacquelin));
+ XBT_INFO("After 5 seconds, move the actor to %s", sg_host_get_name(jacquelin));
sg_actor_set_host(actor, jacquelin);
sg_actor_sleep_until(15);
- XBT_INFO("At t=15, move the process to %s and resume it.", sg_host_get_name(fafard));
+ XBT_INFO("At t=15, move the actor to %s and resume it.", sg_host_get_name(fafard));
sg_actor_set_host(actor, fafard);
sg_actor_resume(actor);
}
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
simgrid_load_platform(argv[1]); /* - Load the platform description */
- /* - Create and deploy the emigrant and policeman processes */
sg_actor_create("monitor", sg_host_by_name("Boivin"), monitor, 0, NULL);
simgrid_run();
$ ${bindir:=.}/actor-migrate-c ${platfdir:=.}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
> [ 0.000000] (worker@Fafard) Let's move to Boivin to execute 1177.14 Mflops (5sec on Boivin and 5sec on Jacquelin)
-> [ 5.000000] (monitor@Boivin) After 5 seconds, move the process to Jacquelin
+> [ 5.000000] (monitor@Boivin) After 5 seconds, move the actor to Jacquelin
> [ 10.000000] (worker@Jacquelin) I wake up on Jacquelin. Let's suspend a bit
-> [ 15.000000] (monitor@Boivin) At t=15, move the process to Fafard and resume it.
+> [ 15.000000] (monitor@Boivin) At t=15, move the actor to Fafard and resume it.
> [ 15.000000] (worker@Fafard) I wake up on Fafard
> [ 15.000000] (worker@Fafard) Done
XBT_LOG_NEW_DEFAULT_CATEGORY(actor_suspend, "Messages specific for this example");
-/* The Lazy guy only wants to sleep, but can be awaken by the dream_master process. */
+/* The Lazy guy only wants to sleep, but can be awaken by the dream_master actor. */
static void lazy_guy(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
{
XBT_INFO("Nobody's watching me ? Let's go to sleep.");
/* The Dream master: */
static void dream_master(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
{
- XBT_INFO("Let's create a lazy guy."); /* - Create a lazy_guy process */
+ XBT_INFO("Let's create a lazy guy."); /* - Create a lazy_guy actor */
sg_actor_t lazy = sg_actor_create("Lazy", sg_host_self(), lazy_guy, 0, NULL);
XBT_INFO("Let's wait a little bit...");
sg_actor_sleep_for(10.0); /* - Wait for 10 seconds */
#include "xbt/log.h"
#include "xbt/str.h"
-/* This example does not much: It just spans over-polite processes that yield a large amount
+/* This example does not much: It just spans over-polite actors that yield a large amount
* of time before ending.
*
- * This serves as an example for the sg_process_yield() function, with which a process can request
- * to be rescheduled after the other processes that are ready at the current timestamp.
+ * This serves as an example for the sg_actor_yield() function, with which an actor can request
+ * to be rescheduled after the other actors that are ready at the current timestamp.
*
* It can also be used to benchmark our context-switching mechanism.
*/
XBT_LOG_NEW_DEFAULT_CATEGORY(actor_yield, "Messages specific for this example");
-/* Main function of the Yielder process */
+/* Main function of the Yielder actor */
static void yielder(int argc, char* argv[])
{
xbt_assert(argc == 2, "The sender function expects 1 arguments from the XML deployment file");
simgrid_load_platform(argv[1]); /* - Load the platform description */
simgrid_register_function("yielder", yielder);
- simgrid_load_deployment(argv[2]); /* - Deploy the sender and receiver processes */
+ simgrid_load_deployment(argv[2]); /* - Deploy the sender and receiver actors */
simgrid_run();
return 0;
XBT_INFO("Number of hosts '%zu'", host_count);
for (size_t i = 0; i < host_count; i++) {
- /* - Give a unique rank to each host and create a @ref relay_runner process on each */
+ /* - Give a unique rank to each host and create a @ref relay_runner actor on each */
char* name_host = bprintf("%zu", i);
sg_actor_create(name_host, hosts[i], relay_runner, 0, NULL);
free(name_host);
XBT_LOG_NEW_DEFAULT_CATEGORY(async_wait, "Messages specific for this example");
-/* Main function of the Sender process */
+/* Main function of the Sender actor */
static void sender(int argc, char* argv[])
{
xbt_assert(argc == 5, "The sender function expects 4 arguments from the XML deployment file");
sg_mailbox_put(mailbox, xbt_strdup("finalize"), 0);
}
-/* Receiver process expects 3 arguments: */
+/* Receiver actor expects 3 arguments: */
static void receiver(int argc, char* argv[])
{
xbt_assert(argc == 3, "The relay_runner function does not accept any parameter from the XML deployment file");
<argument value="1"/> <!-- Sleep_start_time -->
<argument value="0.1"/> <!-- Time for test -->
</actor>
- <!-- The receiver processes -->
+ <!-- The receiver actor -->
<actor host="Ruby" function="receiver">
<argument value="5"/> <!-- Sleep_start_time -->
<argument value="0.1"/> <!-- Time for test -->
<argument value="5"/> <!-- Sleep_start_time -->
<argument value="0"/> <!-- Time for test -->
</actor>
- <!-- The receiver processes -->
+ <!-- The receiver actor -->
<actor host="Ruby" function="receiver">
<argument value="1"/> <!-- Sleep_start_time -->
<argument value="0"/> <!-- Time for test -->
<argument value="1"/> <!-- Sleep_start_time -->
<argument value="0"/> <!-- Time for test -->
</actor>
- <!-- The receiver processes -->
+ <!-- The receiver actor -->
<actor host="Ruby" function="receiver">
<argument value="5"/> <!-- Sleep_start_time -->
<argument value="0"/> <!-- Time for test -->
<argument value="5"/> <!-- Sleep_start_time -->
<argument value="0.1"/> <!-- Time for test -->
</actor>
- <!-- The receiver processes -->
+ <!-- The receiver actor -->
<actor host="Ruby" function="receiver">
<argument value="1"/> <!-- Sleep_start_time -->
<argument value="0.1"/> <!-- Time for test -->
simgrid_load_platform(argv[1]);
- /* Pick a process, no matter which, from the platform file */
+ /* Pick the first host from the platform file */
sg_host_t* all_hosts = sg_host_list();
sg_host_t first_host = all_hosts[0];
free(all_hosts);
#!/usr/bin/env tesh
-p Start remote processes
$ ${bindir:=.}/exec-basic-c ${platfdir}/small_platform.xml
> [Tremblay:privileged:(2) 0.001500] [exec_basic/INFO] Done.
> [Tremblay:executor:(1) 0.002000] [exec_basic/INFO] Done.
> [ 0.000000] (5:worker@Ginette) Waiting a message on worker-3
> [ 0.000000] (6:worker@Bourassa) Waiting a message on worker-4
> [ 0.010309] (1:master@Tremblay) Send a message to worker-1
-> [ 1.000000] (0:maestro@) Restart processes on host Fafard
+> [ 1.000000] (0:maestro@) Restart actors on host Fafard
> [ 1.000000] (7:worker@Fafard) Waiting a message on worker-2
> [ 1.000000] (1:master@Tremblay) Mmh. The communication with 'worker-1' failed. Nevermind. Let's keep going!
> [ 1.000000] (1:master@Tremblay) Send a message to worker-2
> [ 2.000000] (1:master@Tremblay) Mmh. The communication with 'worker-2' failed. Nevermind. Let's keep going!
-> [ 2.000000] (0:maestro@) Restart processes on host Jupiter
+> [ 2.000000] (0:maestro@) Restart actors on host Jupiter
> [ 2.000000] (1:master@Tremblay) Send a message to worker-3
> [ 2.000000] (8:worker@Jupiter) Waiting a message on worker-1
> [ 2.010309] (2:worker@Tremblay) Execution complete.
> [ 0.010825] (2:worker@Tremblay) Start execution...
> [ 0.010825] (1:master@Tremblay) Send to worker-0 completed
> [ 0.010825] (1:master@Tremblay) Send a message to worker-1
-> [ 1.000000] (0:maestro@) Restart processes on host Fafard
+> [ 1.000000] (0:maestro@) Restart actors on host Fafard
> [ 1.000000] (7:worker@Fafard) Waiting a message on worker-2
> [ 1.000000] (1:master@Tremblay) Mmh. The communication with 'worker-1' failed. Nevermind. Let's keep going!
> [ 1.000000] (1:master@Tremblay) Send a message to worker-2
-> [ 2.000000] (0:maestro@) Restart processes on host Jupiter
+> [ 2.000000] (0:maestro@) Restart actors on host Jupiter
> [ 2.000000] (8:worker@Jupiter) Waiting a message on worker-1
> [ 2.000000] (1:master@Tremblay) Mmh. The communication with 'worker-2' failed. Nevermind. Let's keep going!
> [ 2.000000] (1:master@Tremblay) Send a message to worker-3
sg_host_t host = sg_host_by_name("MyHost1");
sg_actor_sleep_for(10.5);
XBT_INFO("I slept until now, but now I'll change the speed of this host "
- "while the other process is still computing! This should slow the computation down.");
+ "while the other actor is still computing! This should slow the computation down.");
sg_host_set_pstate(host, 2);
}
> [ 0.000000] (1:load_test@MyHost1) Sleep for 10 seconds
> [ 10.000000] (1:load_test@MyHost1) Done sleeping 10.00s; peak speed: 1E+08 flop/s; number of flops computed so far: 0E+00 (nothing should have changed)
> [ 10.000000] (1:load_test@MyHost1) Run a task of 2E+08 flops at current speed of 1E+08 flop/s
-> [ 10.500000] (2:change_speed@MyHost1) I slept until now, but now I'll change the speed of this host while the other process is still computing! This should slow the computation down.
+> [ 10.500000] (2:change_speed@MyHost1) I slept until now, but now I'll change the speed of this host while the other actor is still computing! This should slow the computation down.
> [ 18.000000] (1:load_test@MyHost1) Done working on my task; this took 8.00s; current peak speed: 2E+07 flop/s (when I started the computation, the speed was set to 1E+08 flop/s); number of flops computed so far: 2.00E+08, average load as reported by the HostLoad plugin: 0.04167 (should be 0.04167)
> [ 18.000000] (1:load_test@MyHost1) ========= Requesting pstate 1 (speed should be of 5E+07 flop/s and is of 5E+07 flop/s, average load is 0.04167)
> [ 18.000000] (1:load_test@MyHost1) Run a task of 1E+08 flops
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_daemon, "Messages specific for this s4u example");
-/* The worker process, working for a while before leaving */
+/* The worker actor, working for a while before leaving */
static void worker()
{
XBT_INFO("Let's do some work (for 10 sec on Boivin).");
XBT_INFO("I'm done now. I leave even if it makes the daemon die.");
}
-/* The daemon, displaying a message every 3 seconds until all other processes stop */
+/* The daemon, displaying a message every 3 seconds until all other actors stop */
static void my_daemon()
{
simgrid::s4u::Actor::self()->daemonize();
simgrid::s4u::this_actor::sleep_for(3.0);
}
- XBT_INFO("I will never reach that point: daemons are killed when regular processes are done");
+ XBT_INFO("I will never reach that point: daemons are killed when regular actors are done");
}
int main(int argc, char* argv[])
#!/usr/bin/env tesh
-p Testing the process daemonization feature
+p Testing the actor daemonization feature
$ ${bindir:=.}/s4u-actor-daemon ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
> [ 0.000000] (worker@Boivin) Let's do some work (for 10 sec on Boivin).
static void killer()
{
- XBT_INFO("Hello!"); /* - First start a victim process */
+ XBT_INFO("Hello!"); /* - First start a victim actor */
simgrid::s4u::ActorPtr victimA =
simgrid::s4u::Actor::create("victim A", simgrid::s4u::Host::by_name("Fafard"), victimA_fun);
simgrid::s4u::ActorPtr victimB =
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/small_platform.xml\n", argv[0], argv[0]);
e.load_platform(argv[1]); /* - Load the platform description */
- /* - Create and deploy killer process, that will create the victim actors */
+ /* - Create and deploy killer actor, that will create the victim actors */
simgrid::s4u::Actor::create("killer", simgrid::s4u::Host::by_name("Tremblay"), killer);
e.run(); /* - Run the simulation */
explicit sleeper(std::vector<std::string> /*args*/)
{
simgrid::s4u::this_actor::on_exit([](bool /*failed*/) {
- /* Executed on process termination, to display a message helping to understand the output */
+ /* Executed on actor termination, to display a message helping to understand the output */
XBT_INFO("Exiting now (done sleeping or got killed).");
});
}
e.load_platform(argv[1]); /* Load the platform description */
e.register_actor<sleeper>("sleeper");
- e.load_deployment(argv[2]); /* Deploy the sleeper processes with explicit start/kill times */
+ e.load_deployment(argv[2]); /* Deploy the sleeper actors with explicit start/kill times */
e.run(); /* - Run the simulation */
simgrid::s4u::this_actor::sleep_for(5);
- XBT_INFO("After 5 seconds, move the process to %s", jacquelin->get_cname());
+ XBT_INFO("After 5 seconds, move the actor to %s", jacquelin->get_cname());
actor->set_host(jacquelin);
simgrid::s4u::this_actor::sleep_until(15);
- XBT_INFO("At t=15, move the process to %s and resume it.", fafard->get_cname());
+ XBT_INFO("At t=15, move the actor to %s and resume it.", fafard->get_cname());
actor->set_host(fafard);
actor->resume();
}
$ ${bindir:=.}/s4u-actor-migrate ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
> [ 0.000000] (worker@Fafard) Let's move to Boivin to execute 1177.14 Mflops (5sec on Boivin and 5sec on Jacquelin)
-> [ 5.000000] (monitor@Boivin) After 5 seconds, move the process to Jacquelin
+> [ 5.000000] (monitor@Boivin) After 5 seconds, move the actor to Jacquelin
> [ 10.000000] (worker@Jacquelin) I wake up on Jacquelin. Let's suspend a bit
-> [ 15.000000] (monitor@Boivin) At t=15, move the process to Fafard and resume it.
+> [ 15.000000] (monitor@Boivin) At t=15, move the actor to Fafard and resume it.
> [ 15.000000] (worker@Fafard) I wake up on Fafard
> [ 15.000000] (worker@Fafard) Done
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_suspend, "Messages specific for this s4u example");
-/* The Lazy guy only wants to sleep, but can be awaken by the dream_master process. */
+/* The Lazy guy only wants to sleep, but can be awaken by the dream_master actor. */
static void lazy_guy()
{
XBT_INFO("Nobody's watching me ? Let's go to sleep.");
/* The Dream master: */
static void dream_master()
{
- XBT_INFO("Let's create a lazy guy."); /* - Create a lazy_guy process */
+ XBT_INFO("Let's create a lazy guy."); /* - Create a lazy_guy actor */
simgrid::s4u::ActorPtr lazy = simgrid::s4u::Actor::create("Lazy", simgrid::s4u::this_actor::get_host(), lazy_guy);
XBT_INFO("Let's wait a little bit...");
simgrid::s4u::this_actor::sleep_for(10); /* - Wait for 10 seconds */
* It can also be used to benchmark our context-switching mechanism.
*/
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_yield, "Messages specific for this s4u example");
-/* Main function of the Yielder process */
+/* Main function of the Yielder actor */
class yielder {
long number_of_yields;
#!/usr/bin/env tesh
-p Start remote processes
$ ${bindir:=.}/s4u-exec-basic ${platfdir}/small_platform.xml
> [Tremblay:privileged:(2) 0.001500] [s4u_test/INFO] Done.
> [Tremblay:executor:(1) 0.002000] [s4u_test/INFO] Done.
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example");
-int timer_start; // set as 1 in the master process
+int timer_start; // set as 1 in the master actor
#define NTASKS 1500
double start_time;
> [ 0.000000] (5:worker@Ginette) Waiting a message on worker-3
> [ 0.000000] (6:worker@Bourassa) Waiting a message on worker-4
> [ 0.010309] (1:master@Tremblay) Send a message to worker-1
-> [ 1.000000] (0:maestro@) Restart processes on host Fafard
+> [ 1.000000] (0:maestro@) Restart actors on host Fafard
> [ 1.000000] (7:worker@Fafard) Waiting a message on worker-2
> [ 1.000000] (1:master@Tremblay) Mmh. The communication with 'worker-1' failed. Nevermind. Let's keep going!
> [ 1.000000] (1:master@Tremblay) Send a message to worker-2
> [ 2.000000] (1:master@Tremblay) Mmh. The communication with 'worker-2' failed. Nevermind. Let's keep going!
-> [ 2.000000] (0:maestro@) Restart processes on host Jupiter
+> [ 2.000000] (0:maestro@) Restart actors on host Jupiter
> [ 2.000000] (1:master@Tremblay) Send a message to worker-3
> [ 2.000000] (8:worker@Jupiter) Waiting a message on worker-1
> [ 2.010309] (2:worker@Tremblay) Execution complete.
> [ 0.010825] (2:worker@Tremblay) Start execution...
> [ 0.010825] (1:master@Tremblay) Send to worker-0 completed
> [ 0.010825] (1:master@Tremblay) Send a message to worker-1
-> [ 1.000000] (0:maestro@) Restart processes on host Fafard
+> [ 1.000000] (0:maestro@) Restart actors on host Fafard
> [ 1.000000] (7:worker@Fafard) Waiting a message on worker-2
> [ 1.000000] (1:master@Tremblay) Mmh. The communication with 'worker-1' failed. Nevermind. Let's keep going!
> [ 1.000000] (1:master@Tremblay) Send a message to worker-2
-> [ 2.000000] (0:maestro@) Restart processes on host Jupiter
+> [ 2.000000] (0:maestro@) Restart actors on host Jupiter
> [ 2.000000] (8:worker@Jupiter) Waiting a message on worker-1
> [ 2.000000] (1:master@Tremblay) Mmh. The communication with 'worker-2' failed. Nevermind. Let's keep going!
> [ 2.000000] (1:master@Tremblay) Send a message to worker-3
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_platform_profile, "Messages specific for this s4u example");
-/* Main function of the Yielder process */
+/* Main function of the Yielder actor */
static void watcher()
{
const simgrid::s4u::Host* jupiter = simgrid::s4u::Host::by_name("Jupiter");
XBT_INFO(" Zone property: date -> %s", root->get_property("date"));
XBT_INFO(" Zone property: author -> %s", root->get_property("author"));
- /* Get the property list of current bob process */
+ /* Get the property list of current bob actor */
const std::unordered_map<std::string, std::string>* props = simgrid::s4u::Actor::self()->get_properties();
const char* noexist = "UnknownProcessProp";
XBT_ATTRIB_UNUSED const char* value;
s4u_Host* host = simgrid::s4u::Host::by_name("MyHost1");
simgrid::s4u::this_actor::sleep_for(10.5);
XBT_INFO("I slept until now, but now I'll change the speed of this host "
- "while the other process is still computing! This should slow the computation down.");
+ "while the other actor is still computing! This should slow the computation down.");
host->set_pstate(2);
}
> [ 0.000000] (1:load_test@MyHost1) Sleep for 10 seconds
> [ 10.000000] (1:load_test@MyHost1) Done sleeping 10.00s; peak speed: 1E+08 flop/s; number of flops computed so far: 0E+00 (nothing should have changed)
> [ 10.000000] (1:load_test@MyHost1) Run a task of 2E+08 flops at current speed of 1E+08 flop/s
-> [ 10.500000] (2:change_speed@MyHost1) I slept until now, but now I'll change the speed of this host while the other process is still computing! This should slow the computation down.
+> [ 10.500000] (2:change_speed@MyHost1) I slept until now, but now I'll change the speed of this host while the other actor is still computing! This should slow the computation down.
> [ 18.000000] (1:load_test@MyHost1) Done working on my task; this took 8.00s; current peak speed: 2E+07 flop/s (when I started the computation, the speed was set to 1E+08 flop/s); number of flops computed so far: 2.00E+08, average load as reported by the HostLoad plugin: 0.04167 (should be 0.04167)
> [ 18.000000] (1:load_test@MyHost1) ========= Requesting pstate 1 (speed should be of 5E+07 flop/s and is of 5E+07 flop/s, average load is 0.04167)
> [ 18.000000] (1:load_test@MyHost1) Run a task of 1E+08 flops
XBT_INFO("Bye");
}
-/// Spawn process_count-1 workers and do a barrier with them
-static void master(int process_count)
+/// Spawn actor_count-1 workers and do a barrier with them
+static void master(int actor_count)
{
- simgrid::s4u::BarrierPtr barrier = simgrid::s4u::Barrier::create(process_count);
+ simgrid::s4u::BarrierPtr barrier = simgrid::s4u::Barrier::create(actor_count);
- XBT_INFO("Spawning %d workers", process_count-1);
- for (int i = 0; i < process_count-1; i++)
- {
- simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Jupiter"), worker, barrier);
- }
+ XBT_INFO("Spawning %d workers", actor_count - 1);
+ for (int i = 0; i < actor_count - 1; i++) {
+ simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Jupiter"), worker, barrier);
+ }
XBT_INFO("Waiting on the barrier");
barrier->wait();
{
simgrid::s4u::Engine e(&argc, argv);
- // Parameter: Number of processes in the barrier
- xbt_assert(argc >= 2, "Usage: %s <process-count>\n", argv[0]);
- int process_count = std::stoi(argv[1]);
- xbt_assert(process_count > 0, "<process-count> must be greater than 0");
+ // Parameter: Number of actores in the barrier
+ xbt_assert(argc >= 2, "Usage: %s <actor-count>\n", argv[0]);
+ int actor_count = std::stoi(argv[1]);
+ xbt_assert(actor_count > 0, "<actor-count> must be greater than 0");
e.load_platform("../../platforms/two_hosts.xml");
- simgrid::s4u::Actor::create("master", simgrid::s4u::Host::by_name("Tremblay"), master, process_count);
+ simgrid::s4u::Actor::create("master", simgrid::s4u::Host::by_name("Tremblay"), master, actor_count);
e.run();
return 0;
if (value > 0) {
if (not is_on()) {
- XBT_VERB("Restart processes on host %s", get_host()->get_cname());
+ XBT_VERB("Restart actors on host %s", get_host()->get_cname());
get_host()->turn_on();
}
} else {
} else if (event == state_event_) {
if (value > 0) {
if (not is_on()) {
- XBT_VERB("Restart processes on host %s", get_host()->get_cname());
+ XBT_VERB("Restart actors on host %s", get_host()->get_cname());
get_host()->turn_on();
}
} else {
} else if (triggered == state_event_) {
if (value > 0) {
if (not is_on()) {
- XBT_VERB("Restart processes on host %s", get_host()->get_cname());
+ XBT_VERB("Restart actors on host %s", get_host()->get_cname());
get_host()->turn_on();
}
} else