Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
the host_that_restart global is now useless
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 15 Aug 2018 01:35:19 +0000 (03:35 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 15 Aug 2018 01:35:19 +0000 (03:35 +0200)
can close issue #22

examples/msg/platform-failures/platform-failures.tesh
examples/s4u/platform-failures/s4u-platform-failures.tesh
src/simix/smx_global.cpp
src/surf/cpu_cas01.cpp
src/surf/cpu_ti.cpp
src/surf/ptask_L07.cpp
src/surf/surf_interface.cpp
src/surf/surf_interface.hpp

index 33043db..eb31d21 100644 (file)
@@ -3,7 +3,7 @@
 p Testing a simple master/worker example application handling failures TCP crosstraffic DISABLED
 
 ! output sort 19
 p Testing a simple master/worker example application handling failures TCP crosstraffic DISABLED
 
 ! output sort 19
-$ $SG_TEST_EXENV ${bindir:=.}/platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_with_failures.xml ${srcdir}/../app-masterworker/app-masterworker_d.xml --cfg=path:${srcdir} --cfg=network/crosstraffic:0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_with_failures.xml ${srcdir}/../app-masterworker/app-masterworker_d.xml --cfg=path:${srcdir} --cfg=network/crosstraffic:0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose
 > [  0.000000] (0:maestro@) Cannot launch process 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
 > [  0.000000] (0:maestro@) Cannot launch process 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
@@ -110,7 +110,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/platform-failures$EXEEXT --log=xbt_cfg.thres:criti
 p Testing a simple master/worker example application handling failures. TCP crosstraffic ENABLED
 
 ! output sort 19
 p Testing a simple master/worker example application handling failures. TCP crosstraffic ENABLED
 
 ! output sort 19
-$ $SG_TEST_EXENV ${bindir:=.}/platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_with_failures.xml ${srcdir}/../app-masterworker/app-masterworker_d.xml --cfg=path:${srcdir} "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_with_failures.xml ${srcdir}/../app-masterworker/app-masterworker_d.xml --cfg=path:${srcdir} "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose
 > [  0.000000] (0:maestro@) Cannot launch process 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
 > [  0.000000] (0:maestro@) Cannot launch process 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
@@ -217,7 +217,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/platform-failures$EXEEXT --log=xbt_cfg.thres:criti
 p Testing a simple master/worker example application handling failures. CPU_TI optimization enabled
 
 ! output sort 19
 p Testing a simple master/worker example application handling failures. CPU_TI optimization enabled
 
 ! output sort 19
-$ $SG_TEST_EXENV ${bindir:=.}/platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_with_failures.xml ${srcdir}/../app-masterworker/app-masterworker_d.xml --cfg=path:${srcdir} --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_with_failures.xml ${srcdir}/../app-masterworker/app-masterworker_d.xml --cfg=path:${srcdir} --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose
 > [  0.000000] (0:maestro@) Cannot launch process 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
 > [  0.000000] (0:maestro@) Cannot launch process 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
index 59e09e0..53a3e42 100644 (file)
@@ -3,7 +3,7 @@
 p Testing a simple master/worker example application handling failures TCP crosstraffic DISABLED
 
 ! output sort 19
 p Testing a simple master/worker example application handling failures TCP crosstraffic DISABLED
 
 ! output sort 19
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_with_failures.xml ${srcdir:=.}/s4u-masterworker-failures_d.xml --cfg=path:${srcdir} --cfg=network/crosstraffic:0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_with_failures.xml ${srcdir:=.}/s4u-masterworker-failures_d.xml --cfg=path:${srcdir} --cfg=network/crosstraffic:0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose
 > [  0.000000] (0:maestro@) Cannot launch process 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
 > [  0.000000] (0:maestro@) Cannot launch process 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
@@ -110,7 +110,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:c
 p Testing a simple master/worker example application handling failures. TCP crosstraffic ENABLED
 
 ! output sort 19
 p Testing a simple master/worker example application handling failures. TCP crosstraffic ENABLED
 
 ! output sort 19
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_with_failures.xml ${srcdir:=.}/s4u-masterworker-failures_d.xml --cfg=path:${srcdir} "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_with_failures.xml ${srcdir:=.}/s4u-masterworker-failures_d.xml --cfg=path:${srcdir} "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose
 > [  0.000000] (0:maestro@) Cannot launch process 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
 > [  0.000000] (0:maestro@) Cannot launch process 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
index eecd1d4..d61721f 100644 (file)
@@ -503,13 +503,6 @@ void SIMIX_run()
       SIMIX_wake_processes();
     } while (again);
 
       SIMIX_wake_processes();
     } while (again);
 
-    /* Autorestart all process */
-    for (auto const& host : host_that_restart) {
-      XBT_INFO("Restart processes on host %s", host->get_cname());
-      host->turn_on();
-    }
-    host_that_restart.clear();
-
     /* Clean processes to destroy */
     SIMIX_process_empty_trash();
 
     /* Clean processes to destroy */
     SIMIX_process_empty_trash();
 
index b594980..344e8ca 100644 (file)
@@ -131,7 +131,7 @@ void CpuCas01::apply_event(tmgr_trace_event_t event, double value)
 
     if (value > 0) {
       if (is_off()) {
 
     if (value > 0) {
       if (is_off()) {
-        host_that_restart.push_back(get_host());
+        XBT_VERB("Restart processes on host %s", get_host()->get_cname());
         get_host()->turn_on();
       }
     } else {
         get_host()->turn_on();
       }
     } else {
index c7f6266..d78897b 100644 (file)
@@ -399,7 +399,7 @@ void CpuTi::apply_event(tmgr_trace_event_t event, double value)
   } else if (event == state_event_) {
     if (value > 0) {
       if (is_off()) {
   } else if (event == state_event_) {
     if (value > 0) {
       if (is_off()) {
-        host_that_restart.push_back(get_host());
+        XBT_VERB("Restart processes on host %s", get_host()->get_cname());
         get_host()->turn_on();
       }
     } else {
         get_host()->turn_on();
       }
     } else {
index 6e75461..75f1027 100644 (file)
@@ -317,7 +317,7 @@ void CpuL07::apply_event(tmgr_trace_event_t triggered, double value)
   } else if (triggered == state_event_) {
     if (value > 0) {
       if (is_off()) {
   } else if (triggered == state_event_) {
     if (value > 0) {
       if (is_off()) {
-        host_that_restart.push_back(get_host());
+        XBT_VERB("Restart processes on host %s", get_host()->get_cname());
         get_host()->turn_on();
       }
     } else
         get_host()->turn_on();
       }
     } else
index 30481fa..875c7cc 100644 (file)
@@ -31,7 +31,6 @@ std::vector<simgrid::kernel::resource::Model*> all_existing_models; /* to destro
 
 simgrid::trace_mgr::future_evt_set future_evt_set;
 std::vector<std::string> surf_path;
 
 simgrid::trace_mgr::future_evt_set future_evt_set;
 std::vector<std::string> surf_path;
-std::vector<simgrid::s4u::Host*> host_that_restart;
 /**  set of hosts for which one want to be notified if they ever restart. */
 std::set<std::string> watched_hosts;
 extern std::map<std::string, simgrid::surf::StorageType*> storage_types;
 /**  set of hosts for which one want to be notified if they ever restart. */
 std::set<std::string> watched_hosts;
 extern std::map<std::string, simgrid::surf::StorageType*> storage_types;
index 5e937a8..17a3994 100644 (file)
@@ -52,11 +52,6 @@ static inline int double_equals(double value1, double value2, double precision)
   return (fabs(value1 - value2) < precision);
 }
 
   return (fabs(value1 - value2) < precision);
 }
 
-/** @ingroup SURF_simulation
- *  @brief List of hosts that have just restarted and whose autorestart process should be restarted.
- */
-XBT_PUBLIC_DATA std::vector<sg_host_t> host_that_restart;
-
 /** @ingroup SURF_models
  *  @brief Initializes the CPU model with the model Cas01
  *
 /** @ingroup SURF_models
  *  @brief Initializes the CPU model with the model Cas01
  *