From 257ef25fc79344fb650172a46d3548d0164e5a3a Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Wed, 15 Aug 2018 03:35:19 +0200 Subject: [PATCH] the host_that_restart global is now useless can close issue #22 --- examples/msg/platform-failures/platform-failures.tesh | 6 +++--- examples/s4u/platform-failures/s4u-platform-failures.tesh | 4 ++-- src/simix/smx_global.cpp | 7 ------- src/surf/cpu_cas01.cpp | 2 +- src/surf/cpu_ti.cpp | 2 +- src/surf/ptask_L07.cpp | 2 +- src/surf/surf_interface.cpp | 1 - src/surf/surf_interface.hpp | 5 ----- 8 files changed, 8 insertions(+), 21 deletions(-) diff --git a/examples/msg/platform-failures/platform-failures.tesh b/examples/msg/platform-failures/platform-failures.tesh index 33043dbc08..eb31d21baa 100644 --- a/examples/msg/platform-failures/platform-failures.tesh +++ b/examples/msg/platform-failures/platform-failures.tesh @@ -3,7 +3,7 @@ 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 @@ -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 -$ $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 @@ -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 -$ $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 diff --git a/examples/s4u/platform-failures/s4u-platform-failures.tesh b/examples/s4u/platform-failures/s4u-platform-failures.tesh index 59e09e0416..53a3e42bd3 100644 --- a/examples/s4u/platform-failures/s4u-platform-failures.tesh +++ b/examples/s4u/platform-failures/s4u-platform-failures.tesh @@ -3,7 +3,7 @@ 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 @@ -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 -$ $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 diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index eecd1d4c2b..d61721f99a 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -503,13 +503,6 @@ void SIMIX_run() 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(); diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index b59498075f..344e8ca37e 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -131,7 +131,7 @@ void CpuCas01::apply_event(tmgr_trace_event_t event, double value) 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 { diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index c7f6266ce2..d78897b4dc 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -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()) { - host_that_restart.push_back(get_host()); + XBT_VERB("Restart processes on host %s", get_host()->get_cname()); get_host()->turn_on(); } } else { diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 6e7546186d..75f1027130 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -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()) { - host_that_restart.push_back(get_host()); + XBT_VERB("Restart processes on host %s", get_host()->get_cname()); get_host()->turn_on(); } } else diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 30481fa6ee..875c7cca5c 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -31,7 +31,6 @@ std::vector all_existing_models; /* to destro simgrid::trace_mgr::future_evt_set future_evt_set; std::vector surf_path; -std::vector host_that_restart; /** set of hosts for which one want to be notified if they ever restart. */ std::set watched_hosts; extern std::map storage_types; diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index 5e937a85f0..17a3994a39 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -52,11 +52,6 @@ static inline int double_equals(double value1, double value2, double 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 host_that_restart; - /** @ingroup SURF_models * @brief Initializes the CPU model with the model Cas01 * -- 2.20.1