XBT_INFO("Initializing the chaos monkey");
// delay the initialization until after the parameter are parsed
- sg4::Engine::on_platform_created_cb([]() {
+ sg4::Engine::on_simulation_start_cb([]() {
auto engine = sg4::Engine::get_instance();
auto hosts = engine->get_all_hosts();
auto links = engine->get_all_links();
auto payload = mailbox->get_unique<double>(10);
xbt_assert(payload != nullptr, "mailbox->get() failed");
double comp_size = *payload;
- if (comp_size < 0) { /* - Exit when -1.0 is received */
- XBT_INFO("I'm done. See you!");
- break;
- }
- /* - Otherwise, process the task */
+
XBT_INFO("Start execution...");
sg4::this_actor::execute(comp_size);
XBT_INFO("Execution complete.");
}
}
rootzone->seal();
- sg4::Engine::on_platform_created(); // FIXME this should not be necessary
sg4::Actor::create("master", main, master)->set_auto_restart(true);
int id = 0;
msg = f"ERROR (retcode: {run.returncode}). Output:\n"
msg += out
print(msg)
- os.exit(1)
+ sys.exit(1)
for line in out.split("\n"):
if re.match("==.* in use at exit: ", line) and not re.match("==.* in use at exit: 0 bytes in 0 blocks", line):
m = re.match("==.* in use at exit: (.*)", line)