Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Finally kill surf_interface.hpp watched_host was actually useless
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 19 Feb 2023 14:45:51 +0000 (15:45 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 19 Feb 2023 14:45:51 +0000 (15:45 +0100)
MANIFEST.in
src/kernel/EngineImpl.cpp
src/kernel/actor/ActorImpl.cpp
src/surf/surf_interface.hpp [deleted file]
tools/cmake/DefinePackages.cmake

index b1ade22..5c50b59 100644 (file)
@@ -2439,7 +2439,6 @@ include src/smpi/smpitools.sh
 include src/sthread/sthread.c
 include src/sthread/sthread.h
 include src/sthread/sthread_impl.cpp
-include src/surf/surf_interface.hpp
 include src/xbt/OsSemaphore.hpp
 include src/xbt/PropertyHolder.cpp
 include src/xbt/automaton/automaton.c
index 2f7d81a..092c697 100644 (file)
@@ -19,7 +19,6 @@
 #include "src/simgrid/math_utils.h"
 #include "src/simgrid/sg_config.hpp"
 #include "src/smpi/include/smpi_actor.hpp"
-#include "src/surf/surf_interface.hpp"
 #include "src/xbt/xbt_modinter.h" /* whether initialization was already done */
 #include "xbt/module.h"
 
@@ -553,7 +552,7 @@ double EngineImpl::solve(double max_date) const
     while (auto* event = profile::future_evt_set.pop_leq(next_event_date, &value, &resource)) {
       if(value<0)
              continue;
-      if (resource->is_used() || (watched_hosts().find(resource->get_cname()) != watched_hosts().end())) {
+      if (resource->is_used()) {
         time_delta = next_event_date - now_;
         XBT_DEBUG("This event invalidates the next_occurring_event() computation of models. Next event set to %f",
                   time_delta);
index 4fb6bf5..05de3b4 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "src/internal_config.h"
 #include "src/kernel/EngineImpl.hpp"
-#include "src/surf/surf_interface.hpp"
 #if HAVE_SMPI
 #include "src/smpi/include/private.hpp"
 #endif
@@ -128,12 +127,6 @@ void ActorImpl::cleanup_from_kernel()
   if (not kernel_destroy_list_hook.is_linked())
     engine->add_actor_to_destroy_list(*this);
 
-  if (has_to_auto_restart() && not get_host()->is_on()) {
-    XBT_DEBUG("Insert host %s to watched_hosts because it's off and %s needs to restart", get_host()->get_cname(),
-              get_cname());
-    watched_hosts().insert(get_host()->get_name());
-  }
-
   undaemonize();
   s4u::Actor::on_termination(*get_ciface());
 
diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp
deleted file mode 100644 (file)
index 7453d35..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved.          */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef SURF_MODEL_H_
-#define SURF_MODEL_H_
-
-#include <set>
-#include <string>
-
-/** set of hosts for which one want to be notified if they ever restart */
-inline auto& watched_hosts() // avoid static initialization order fiasco
-{
-  static std::set<std::string, std::less<>> value;
-  return value;
-}
-#endif /* SURF_MODEL_H_ */
index 07dedb3..c30d4cd 100644 (file)
@@ -41,7 +41,6 @@ set(EXTRA_DIST
   src/smpi/include/smpi_utils.hpp
   src/smpi/smpi_main.c
   src/smpi/smpi_replay_main.cpp
-  src/surf/surf_interface.hpp
   src/kernel/xml/simgrid.dtd
   src/kernel/xml/simgrid_dtd.c
   src/kernel/xml/simgrid_dtd.h