Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill some dead code
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 26 Apr 2019 12:22:58 +0000 (14:22 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 26 Apr 2019 12:23:08 +0000 (14:23 +0200)
examples/deprecated/msg/platform-failures/platform-failures.c
examples/s4u/platform-failures/s4u-platform-failures.cpp
teshsuite/s4u/activity-lifecycle/activity-lifecycle.cpp
teshsuite/s4u/actor-autorestart/actor-autorestart.cpp

index f575ea8..229a929 100644 (file)
@@ -31,11 +31,6 @@ static int master(int argc, char *argv[])
       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);
@@ -58,10 +53,6 @@ static int master(int argc, char *argv[])
     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);
@@ -108,17 +99,10 @@ static int worker(int argc, char *argv[])
       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 {
index 75669f5..dea2f30 100644 (file)
@@ -58,10 +58,6 @@ static int master(int argc, char* argv[])
     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());
@@ -99,10 +95,6 @@ static int worker(int argc, char* argv[])
       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));
index 1b83b80..f324b17 100644 (file)
@@ -366,10 +366,6 @@ static void test_host_off_while_receive()
        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;
index c52156e..cc86142 100644 (file)
@@ -10,12 +10,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example")
 static void dummy()
 {
   XBT_INFO("I start");
-  try {
     simgrid::s4u::this_actor::sleep_for(200);
     XBT_INFO("I stop");
-  } catch (simgrid::HostFailureException& e) {
-    XBT_DEBUG("The host has died ... as expected. This actor silently stops");
-  }
 }
 
 static void dummy_daemon()