// Run a task
start = simgrid_get_clock();
XBT_INFO("Run a task of %.0E flops at current speed of %.0E flop/s", 200e6, sg_host_speed(host));
- sg_actor_self_execute(200e6);
+ sg_actor_execute(200e6);
XBT_INFO("Done working on my task; this took %.2fs; current peak speed: %.0E flop/s (when I started the computation, "
"the speed was set to %.0E flop/s); number of flops computed so "
// Run a second task
start = simgrid_get_clock();
XBT_INFO("Run a task of %.0E flops", 100e6);
- sg_actor_self_execute(100e6);
+ sg_actor_execute(100e6);
XBT_INFO("Done working on my task; this took %.2fs; current peak speed: %.0E flop/s; number of flops computed so "
"far: %.2E",
simgrid_get_clock() - start, sg_host_speed(host), sg_host_get_computed_flops(host));
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);
}
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
simgrid_load_platform(argv[1]);
- sg_actor_t actor = sg_actor_init("load_test", sg_host_by_name("MyHost1"));
- sg_actor_start(actor, execute_load_test, 0, NULL);
+ sg_actor_create("load_test", sg_host_by_name("MyHost1"), execute_load_test, 0, NULL);
- sg_actor_t actor2 = sg_actor_init("change_speed", sg_host_by_name("MyHost1"));
- sg_actor_start(actor2, change_speed, 0, NULL);
+ sg_actor_create("change_speed", sg_host_by_name("MyHost1"), change_speed, 0, NULL);
simgrid_run();