Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove deprecated features for next release (3.32).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 22 Mar 2022 12:54:44 +0000 (13:54 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 22 Mar 2022 12:54:44 +0000 (13:54 +0100)
FIXME: NetZoneImpl::on_route_creation is not removed.

12 files changed:
docs/source/Doxyfile
include/simgrid/s4u/Comm.hpp
include/simgrid/s4u/Exec.hpp
include/simgrid/s4u/NetZone.hpp
include/simgrid/s4u/VirtualMachine.hpp
include/simgrid/simix.h
include/xbt/base.h
src/bindings/python/simgrid_python.cpp
src/kernel/EngineImpl.cpp
src/kernel/routing/RoutedZone.cpp
src/s4u/s4u_Engine.cpp
src/s4u/s4u_Netzone.cpp

index 35eefa0..cc03b94 100644 (file)
@@ -69,7 +69,6 @@ PREDEFINED             += \
     XBT_ATTRIB_NORETURN= \
     XBT_ATTRIB_UNUSED= \
     XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cname,parent,desc)= \
-    XBT_ATTRIB_DEPRECATED_v332(mesg)= \
     XBT_ATTRIB_DEPRECATED_v333(mesg)= \
     XBT_ATTRIB_DEPRECATED_v334(mesg)= \
     XBT_ATTRIB_DEPRECATED_v335(mesg)=
index 6070543..d2ca548 100644 (file)
@@ -176,29 +176,6 @@ public:
   /*! Same as wait_all, but with a timeout. Return the number of terminated comm (less than comms.size() if the timeout
    * occurs). */
   static size_t wait_all_for(const std::vector<CommPtr>& comms, double timeout);
-
-#ifndef DOXYGEN
-  XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for parameter") static int wait_any(
-      const std::vector<CommPtr>* comms)
-  {
-    return static_cast<int>(wait_any_for(*comms, -1));
-  }
-  XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for first parameter") static int wait_any_for(
-      const std::vector<CommPtr>* comms, double timeout)
-  {
-    return static_cast<int>(wait_any_for(*comms, timeout));
-  }
-  XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for parameter") static void wait_all(
-      const std::vector<CommPtr>* comms)
-  {
-    wait_all(*comms);
-  }
-  XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for parameter") static int test_any(
-      const std::vector<CommPtr>* comms)
-  {
-    return static_cast<int>(test_any(*comms));
-  }
-#endif
 };
 } // namespace s4u
 } // namespace simgrid
index 3458593..b0cdbf2 100644 (file)
@@ -61,13 +61,6 @@ public:
   /*! Same as wait_any, but with a timeout. If the timeout occurs, parameter last is returned.*/
   static ssize_t wait_any_for(const std::vector<ExecPtr>& execs, double timeout);
 
-#ifndef DOXYGEN
-  XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for parameter")
-  static int wait_any(std::vector<ExecPtr>* execs) { return static_cast<int>(wait_any_for(*execs, -1)); }
-  XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for first parameter")
-  static int wait_any_for(std::vector<ExecPtr>* execs, double timeout) { return static_cast<int>(wait_any_for(*execs, timeout)); }
-#endif
-
   /** @brief On sequential executions, returns the amount of flops that remain to be done; This cannot be used on
    * parallel executions. */
   double get_remaining() const override;
index 1eadf70..bb6fb7f 100644 (file)
@@ -59,11 +59,6 @@ public:
   /** @brief Get the netpoint associated to this netzone */
   kernel::routing::NetPoint* get_netpoint();
 
-#ifndef DOXYGEN
-  XBT_ATTRIB_DEPRECATED_v332("Please use set_parent() to manage NetZone's relationship") NetZone* add_child(
-      NetZone* new_zone);
-#endif
-
   void extract_xbt_graph(const s_xbt_graph_t* graph, std::map<std::string, xbt_node_t, std::less<>>* nodes,
                          std::map<std::string, xbt_edge_t, std::less<>>* edges);
 
@@ -87,34 +82,12 @@ public:
   void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
                  kernel::routing::NetPoint* gw_dst, const std::vector<LinkInRoute>& link_list, bool symmetrical = true);
 
-#ifndef DOXYGEN
-  XBT_ATTRIB_DEPRECATED_v332(
-      "Please use add_route() method which uses s4u::LinkInRoute instead of "
-      "LinkImpl") void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                                 kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                                 const std::vector<kernel::resource::StandardLinkImpl*>& link_list, bool symmetrical);
-
-  XBT_ATTRIB_DEPRECATED_v332(
-      "Please use add_bypass_route() method which uses s4u::LinkInRoute instead of "
-      "LinkImpl") void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                                        kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                                        const std::vector<kernel::resource::StandardLinkImpl*>& link_list,
-                                        bool /*symmetrical*/);
-#endif
-
   void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
                         kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
                         const std::vector<LinkInRoute>& link_list);
 
-#ifndef DOXYGEN
-  /*** Called on each newly created regular route (not on bypass routes) */
-  static xbt::signal<void(bool symmetrical, kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                          kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                          std::vector<kernel::resource::StandardLinkImpl*> const& link_list)>
-      on_route_creation; // XBT_ATTRIB_DEPRECATED_v332 : should not be used by users, used by ns3.. if necessary,
-                         // signal shouldn't use LinkImpl*
-
 private:
+#ifndef DOXYGEN
   static xbt::signal<void(NetZone const&)> on_creation;
   static xbt::signal<void(NetZone const&)> on_seal;
 #endif
@@ -180,13 +153,6 @@ public:
 
   /** @brief Seal this netzone configuration */
   NetZone* seal();
-
-private:
-#ifndef DOXYGEN
-  /** @brief XBT_ATTRIB_DEPRECATED_v332 Auxiliary function to convert types */
-  static std::vector<LinkInRoute>
-  convert_to_linkInRoute(const std::vector<kernel::resource::StandardLinkImpl*>& link_list);
-#endif
 };
 
 // External constructors so that the types (and the types of their content) remain hidden
index 8a7a33c..f902d64 100644 (file)
@@ -61,9 +61,6 @@ public:
     SUSPENDED, /**< Suspend/resume does not involve disk I/O, so we assume there is no transition states. */
     DESTROYED
   );
-#ifndef DOXYGEN
-  using state XBT_ATTRIB_DEPRECATED_v332("Please use VirtualMachine::State") = State;
-#endif
 
   kernel::resource::VirtualMachineImpl* get_vm_impl() const { return pimpl_vm_; }
   void start();
index 4d77ec2..a7b6705 100644 (file)
@@ -35,10 +35,6 @@ XBT_ATTRIB_DEPRECATED_v333("Please use Actor::is_maestro()") XBT_PUBLIC int SIMI
 XBT_ATTRIB_DEPRECATED_v333("Please use simgrid_set_maestro()") XBT_PUBLIC
     void SIMIX_set_maestro(void (*code)(void*), void* data);
 
-/* Simulation execution */
-XBT_ATTRIB_DEPRECATED_v332("Please use EngineImpl:run()") XBT_PUBLIC void SIMIX_run();
-XBT_ATTRIB_DEPRECATED_v332("Please use simgrid_get_clock() or Engine::get_clock()") XBT_PUBLIC double SIMIX_get_clock();
-
 SG_END_DECL
 
 /********************************* Process ************************************/
index 8698afe..3f680db 100644 (file)
@@ -53,8 +53,6 @@
 #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg)))
 #endif
 
-#define XBT_ATTRIB_DEPRECATED_v332(mesg)                                                                               \
-  XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.31)")
 #define XBT_ATTRIB_DEPRECATED_v333(mesg)                                                                               \
   XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.32)")
 #define XBT_ATTRIB_DEPRECATED_v334(mesg)                                                                               \
index d08e791..c7762da 100644 (file)
@@ -719,9 +719,8 @@ PYBIND11_MODULE(simgrid, m)
            py::return_value_policy::reference_internal,
            py::call_guard<py::gil_scoped_release>(),
            "Start the comm, and ignore its result. It can be completely forgotten after that.")
-      // use py::overload_cast for wait_all/wait_any, until the overload marked XBT_ATTRIB_DEPRECATED_v332 is removed
       .def_static(
-          "wait_all", py::overload_cast<const std::vector<simgrid::s4u::CommPtr>&>(&simgrid::s4u::Comm::wait_all),
+          "wait_all", &simgrid::s4u::Comm::wait_all,
           py::arg("comms"),
           py::call_guard<py::gil_scoped_release>(),
           "Block until the completion of all communications in the list.")
@@ -731,13 +730,13 @@ PYBIND11_MODULE(simgrid, m)
                   "Block until the completion of all communications in the list, or raises TimeoutException after "
                   "the specified timeout.")
       .def_static(
-          "wait_any", py::overload_cast<const std::vector<simgrid::s4u::CommPtr>&>(&simgrid::s4u::Comm::wait_any),
+          "wait_any", &simgrid::s4u::Comm::wait_any,
           py::arg("comms"),
           py::call_guard<py::gil_scoped_release>(),
           "Block until the completion of any communication in the list and return the index of the terminated one.")
       .def_static(
           "wait_any_for",
-          py::overload_cast<const std::vector<simgrid::s4u::CommPtr>&, double>(&simgrid::s4u::Comm::wait_any_for),
+          &simgrid::s4u::Comm::wait_any_for,
           py::arg("comms"), py::arg("timeout"),
           py::call_guard<py::gil_scoped_release>(),
           "Block until the completion of any communication in the list and return the index of the terminated "
index bb3d098..6572a17 100644 (file)
@@ -10,9 +10,6 @@
 #include <simgrid/s4u/Host.hpp>
 #include <simgrid/sg_config.hpp>
 
-#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v332)
-#include <simgrid/simix.h>
-
 #include "mc/mc.h"
 #include "src/kernel/EngineImpl.hpp"
 #include "src/kernel/resource/StandardLinkImpl.hpp"
@@ -769,8 +766,3 @@ double EngineImpl::get_clock()
 }
 } // namespace kernel
 } // namespace simgrid
-
-void SIMIX_run() // XBT_ATTRIB_DEPRECATED_v332
-{
-  simgrid::kernel::EngineImpl::get_instance()->run(-1);
-}
index 021c7b8..ebdeeee 100644 (file)
@@ -165,7 +165,6 @@ void RoutedZone::add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint*
     xbt_assert(not dst->is_netzone(),
                "When defining a route, dst cannot be a netzone such as '%s'. Did you meant to have a NetzoneRoute?",
                dstName);
-    s4u::NetZone::on_route_creation(symmetrical, src, dst, gw_src, gw_dst, get_link_list_impl(link_list, false));
     NetZoneImpl::on_route_creation(symmetrical, src, dst, gw_src, gw_dst, get_link_list_impl(link_list, false));
   } else {
     XBT_DEBUG("Load NetzoneRoute from %s@%s to %s@%s", srcName, gw_src->get_cname(), dstName, gw_dst->get_cname());
@@ -196,7 +195,6 @@ void RoutedZone::add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint*
                "Invalid NetzoneRoute from %s@%s to %s@%s: gw_dst %s belongs to %s, not to %s.", srcName,
                gw_src->get_cname(), dstName, gw_dst->get_cname(), gw_dst->get_cname(),
                gw_dst->get_englobing_zone()->get_cname(), dst->get_cname());
-    s4u::NetZone::on_route_creation(symmetrical, gw_src, gw_dst, gw_src, gw_dst, get_link_list_impl(link_list, false));
     NetZoneImpl::on_route_creation(symmetrical, gw_src, gw_dst, gw_src, gw_dst, get_link_list_impl(link_list, false));
   }
 }
index ea62433..9f4dd40 100644 (file)
@@ -462,11 +462,6 @@ Engine* Engine::set_default_comm_data_copy_callback(
 } // namespace s4u
 } // namespace simgrid
 
-double SIMIX_get_clock() // XBT_ATTRIB_DEPRECATED_v332
-{
-  return simgrid::s4u::Engine::get_clock();
-}
-
 /* **************************** Public C interface *************************** */
 void simgrid_init(int* argc, char** argv)
 {
index 06950ef..699116c 100644 (file)
 namespace simgrid {
 namespace s4u {
 
-xbt::signal<void(bool symmetrical, kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                 kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                 std::vector<kernel::resource::StandardLinkImpl*> const& link_list)>
-    NetZone::on_route_creation;
 xbt::signal<void(NetZone const&)> NetZone::on_creation;
 xbt::signal<void(NetZone const&)> NetZone::on_seal;
 
@@ -50,12 +46,6 @@ std::vector<NetZone*> NetZone::get_children() const
   return res;
 }
 
-NetZone* NetZone::add_child(NetZone* new_zone) // XBT_ATTRIB_DEPRECATED_v332
-{
-  new_zone->set_parent(this);
-  return this;
-}
-
 const std::string& NetZone::get_name() const
 {
   return pimpl_->get_name();
@@ -97,17 +87,6 @@ unsigned long NetZone::add_component(kernel::routing::NetPoint* elm)
   return pimpl_->add_component(elm);
 }
 
-// XBT_ATTRIB_DEPRECATED_v332
-std::vector<LinkInRoute>
-NetZone::convert_to_linkInRoute(const std::vector<kernel::resource::StandardLinkImpl*>& link_list)
-{
-  std::vector<LinkInRoute> links;
-  for (const auto* link : link_list) {
-    links.emplace_back(LinkInRoute(link->get_iface()));
-  }
-  return links;
-}
-
 void NetZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
                         kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
                         const std::vector<LinkInRoute>& link_list, bool symmetrical)
@@ -115,22 +94,6 @@ void NetZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoin
   pimpl_->add_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
 }
 
-// XBT_ATTRIB_DEPRECATED_v332
-void NetZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                        kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                        const std::vector<kernel::resource::StandardLinkImpl*>& link_list, bool symmetrical)
-{
-  pimpl_->add_route(src, dst, gw_src, gw_dst, convert_to_linkInRoute(link_list), symmetrical);
-}
-
-// XBT_ATTRIB_DEPRECATED_v332
-void NetZone::add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                               kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                               const std::vector<kernel::resource::StandardLinkImpl*>& link_list, bool /*symmetrical*/)
-{
-  pimpl_->add_bypass_route(src, dst, gw_src, gw_dst, convert_to_linkInRoute(link_list));
-}
-
 void NetZone::add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
                                kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
                                const std::vector<LinkInRoute>& link_list)