XBT_INFO("Send to %s completed", mailbox);
break;
- case MSG_HOST_FAILURE:
- XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
- MSG_task_destroy(task);
- return 0;
-
case MSG_TRANSFER_FAILURE:
XBT_INFO("Mmh. Something went wrong with '%s'. Nevermind. Let's keep going!", mailbox);
MSG_task_destroy(task);
msg_task_t task = MSG_task_create("finalize", 0, 0, FINALIZE);
switch (MSG_task_send_with_timeout(task,mailbox,1.0)) {
- case MSG_HOST_FAILURE:
- XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
- MSG_task_destroy(task);
- break;
case MSG_TRANSFER_FAILURE:
XBT_INFO("Mmh. Can't reach '%s'! Nevermind. Let's keep going!", mailbox);
if (retcode == MSG_OK) {
XBT_INFO("Execution complete.");
MSG_task_destroy(task);
- } else if (retcode == MSG_HOST_FAILURE) {
- XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
- MSG_task_destroy(task);
- return 0;
} else {
XBT_INFO("Hey ?! What's up ? ");
xbt_die("Unexpected behavior");
}
- } else if (retcode == MSG_HOST_FAILURE) {
- XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
- return 0;
} else if (retcode == MSG_TRANSFER_FAILURE) {
XBT_INFO("Mmh. Something went wrong. Nevermind. Let's keep going!");
} else {
double* payload = new double(-1.0);
try {
mailbox->put(payload, 0, 1.0);
- } catch (simgrid::HostFailureException& e) {
- delete payload;
- XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
- return -1;
} catch (simgrid::TimeoutError& e) {
delete payload;
XBT_INFO("Mmh. Got timeouted while speaking to '%s'. Nevermind. Let's keep going!", mailbox->get_cname());
XBT_INFO("Start execution...");
simgrid::s4u::this_actor::execute(comp_size);
XBT_INFO("Execution complete.");
- } catch (simgrid::HostFailureException& e) {
- XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
- delete payload;
- return -1;
} catch (xbt_ex& e) {
if (e.category != network_error)
xbt_die("Unexpected behavior. Category: %s", xbt_ex_catname(e.category));
assert_exit(true, 1);
try {
simgrid::s4u::Mailbox::by_name("mb")->get();
- } catch (simgrid::HostFailureException const&) {
- // Shouldn't get in here
- in_catch_before_on_exit = not in_on_exit;
- in_catch_after_on_exit = in_on_exit;
} catch (simgrid::NetworkFailureException const&) {
// Shouldn't get in here
in_catch_before_on_exit = not in_on_exit;