Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 23 Jan 2017 21:52:33 +0000 (22:52 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 23 Jan 2017 21:52:33 +0000 (22:52 +0100)
61 files changed:
ChangeLog
include/simgrid/forward.h
include/simgrid/modelchecker.h
include/simgrid/s4u/NetZone.hpp
include/simgrid/s4u/engine.hpp
include/simgrid/s4u/host.hpp
src/bindings/lua/lua_platf.cpp
src/include/mc/mc.h
src/instr/instr_interface.cpp
src/instr/instr_paje_containers.cpp
src/kernel/EngineImpl.cpp
src/kernel/EngineImpl.hpp
src/kernel/routing/ClusterZone.cpp
src/kernel/routing/ClusterZone.hpp
src/kernel/routing/DijkstraZone.cpp
src/kernel/routing/DijkstraZone.hpp
src/kernel/routing/DragonflyZone.cpp
src/kernel/routing/DragonflyZone.hpp
src/kernel/routing/EmptyZone.cpp
src/kernel/routing/EmptyZone.hpp
src/kernel/routing/FatTreeZone.cpp
src/kernel/routing/FatTreeZone.hpp
src/kernel/routing/FloydZone.cpp
src/kernel/routing/FloydZone.hpp
src/kernel/routing/FullZone.cpp
src/kernel/routing/FullZone.hpp
src/kernel/routing/NetPoint.cpp [moved from src/kernel/routing/NetCard.cpp with 74% similarity]
src/kernel/routing/NetPoint.hpp [moved from src/kernel/routing/NetCard.hpp with 79% similarity]
src/kernel/routing/NetZoneImpl.cpp
src/kernel/routing/NetZoneImpl.hpp
src/kernel/routing/RoutedZone.cpp
src/kernel/routing/RoutedZone.hpp
src/kernel/routing/TorusZone.cpp
src/kernel/routing/TorusZone.hpp
src/kernel/routing/VivaldiZone.cpp
src/kernel/routing/VivaldiZone.hpp
src/mc/Process.hpp
src/mc/VisitedState.cpp
src/mc/checker/CommunicationDeterminismChecker.cpp
src/mc/checker/LivenessChecker.cpp
src/mc/checker/SafetyChecker.cpp
src/mc/mc_base.cpp
src/mc/mc_checkpoint.cpp
src/mc/mc_config.cpp
src/mc/mc_state.cpp
src/plugins/vm/VirtualMachineImpl.cpp
src/plugins/vm/s4u_VirtualMachine.cpp
src/s4u/s4u_engine.cpp
src/s4u/s4u_host.cpp
src/s4u/s4u_netzone.cpp
src/simgrid/host.cpp
src/surf/network_ns3.cpp
src/surf/ns3/ns3_interface.h
src/surf/sg_platf.cpp
src/surf/storage_n11.cpp
src/surf/surf_interface.cpp
src/surf/xml/platf_private.hpp
src/surf/xml/surfxml_sax_cb.cpp
teshsuite/simdag/flatifier/flatifier.cpp
teshsuite/simdag/is-router/is-router.cpp
tools/cmake/DefinePackages.cmake

index 4e58ce7..7db8399 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 SimGrid (3.15) UNRELEASED; urgency=low
 
+ - Rename NetCards to NetPoints.
+   This was intended to help NS3 users, but that's not a netcard.
+   That's a point in the routing algorithm, let's avoid do wrong simplifications.
+
  -- target_date=March 20 2017 -- Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
 SimGrid (3.14.159) stable; urgency=low
index 10cf0ec..610f34f 100644 (file)
@@ -22,7 +22,7 @@ namespace simgrid {
        class ActivityImpl;
      }
      namespace routing {
-       class NetCard;
+     class NetPoint;
      }
   }
   namespace simix {
@@ -43,7 +43,7 @@ namespace simgrid {
 typedef simgrid::s4u::NetZone simgrid_NetZone;
 typedef simgrid::s4u::Host simgrid_Host;
 typedef simgrid::kernel::activity::ActivityImpl kernel_Activity;
-typedef simgrid::kernel::routing::NetCard routing_NetCard;
+typedef simgrid::kernel::routing::NetPoint routing_NetPoint;
 typedef simgrid::surf::Cpu surf_Cpu;
 typedef simgrid::surf::Link Link;
 typedef simgrid::surf::Resource surf_Resource;
@@ -58,7 +58,7 @@ typedef struct simgrid_NetZone simgrid_NetZone;
 typedef struct simgrid_Host simgrid_Host;
 typedef struct kernel_Activity kernel_Activity;
 typedef struct surf_Cpu surf_Cpu;
-typedef struct routing_NetCard routing_NetCard;
+typedef struct routing_NetPoint routing_NetPoint;
 typedef struct surf_Resource surf_Resource;
 typedef struct Link Link;
 typedef struct Trace tmgr_Trace;
@@ -72,7 +72,7 @@ typedef simgrid_Host* sg_host_t;
 typedef kernel_Activity *smx_activity_t;
 
 typedef surf_Cpu *surf_cpu_t;
-typedef routing_NetCard *sg_netcard_t;
+typedef routing_NetPoint* sg_netcard_t;
 typedef surf_Resource *sg_resource_t;
 
 // Types which are in fact dictelmt:
index 0579ca6..a097953 100644 (file)
@@ -31,10 +31,10 @@ XBT_PUBLIC(int) MC_random(int min, int max);
  *
  * Please don't use directly: you should use MC_is_active. */
 extern XBT_PUBLIC(int) _sg_do_model_check;
-extern XBT_PUBLIC(int) _sg_mc_visited;
+extern XBT_PUBLIC(int) _sg_mc_max_visited_states;
 
 #define MC_is_active()                  _sg_do_model_check
-#define MC_visited_reduction()          _sg_mc_visited
+#define MC_visited_reduction() _sg_mc_max_visited_states
 
 /** Assertion for the model-checker
  *
index bf96c02..155a95c 100644 (file)
@@ -58,18 +58,18 @@ public:
   void setProperty(const char* key, const char* value);
 
   /* Add content to the netzone, at parsing time. It should be sealed afterward. */
-  virtual int addComponent(kernel::routing::NetCard * elm); /* A host, a router or a netzone, whatever */
+  virtual int addComponent(kernel::routing::NetPoint * elm); /* A host, a router or a netzone, whatever */
   virtual void addRoute(sg_platf_route_cbarg_t route);
   virtual void addBypassRoute(sg_platf_route_cbarg_t e_route) = 0;
 
   /*** Called on each newly created regular route (not on bypass routes) */
-  static simgrid::xbt::signal<void(bool symmetrical, kernel::routing::NetCard* src, kernel::routing::NetCard* dst,
-                                   kernel::routing::NetCard* gw_src, kernel::routing::NetCard* gw_dst,
+  static simgrid::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<Link*>* link_list)>
       onRouteCreation;
 
 protected:
-  std::vector<kernel::routing::NetCard*>
+  std::vector<kernel::routing::NetPoint*>
       vertices_; // our content, as known to our graph routing algorithm (maps vertexId -> vertex)
 
 private:
index 7f5177a..3caf268 100644 (file)
@@ -73,10 +73,10 @@ public:
   simgrid::s4u::NetZone* netzoneByNameOrNull(const char* name);
 
   /** @brief Retrieve the netcard of the given name (or nullptr if not found) */
-  simgrid::kernel::routing::NetCard* netcardByNameOrNull(const char* name);
-  void netcardList(std::vector<simgrid::kernel::routing::NetCard*> * list);
-  void netcardRegister(simgrid::kernel::routing::NetCard * card);
-  void netcardUnregister(simgrid::kernel::routing::NetCard * card);
+  simgrid::kernel::routing::NetPoint* netcardByNameOrNull(const char* name);
+  void netcardList(std::vector<simgrid::kernel::routing::NetPoint*> * list);
+  void netcardRegister(simgrid::kernel::routing::NetPoint * card);
+  void netcardUnregister(simgrid::kernel::routing::NetPoint * card);
 
   template<class F>
   void registerFunction(const char* name)
index b037535..23e91e2 100644 (file)
@@ -114,7 +114,7 @@ public:
   /** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */
   surf::Cpu     *pimpl_cpu = nullptr;
   /** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */
-  kernel::routing::NetCard *pimpl_netcard = nullptr;
+  kernel::routing::NetPoint* pimpl_netpoint = nullptr;
 
 public:
   /*** Called on each newly created object */
index c662f75..bdcfef6 100644 (file)
@@ -7,7 +7,7 @@
 /* SimGrid Lua bindings                                                     */
 
 #include "lua_private.h"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 #include "src/surf/xml/platf_private.hpp"
 #include "surf/surf_routing.h"
index 39213e1..2d37e15 100644 (file)
@@ -39,7 +39,7 @@ extern XBT_PUBLIC(char*) _sg_mc_property_file;
 extern XBT_PRIVATE int _sg_mc_timeout;
 extern XBT_PRIVATE int _sg_mc_hash;
 extern XBT_PRIVATE int _sg_mc_max_depth;
-extern XBT_PUBLIC(int) _sg_mc_visited;
+extern XBT_PUBLIC(int) _sg_mc_max_visited_states;
 extern XBT_PRIVATE char* _sg_mc_dot_output_file;
 extern XBT_PUBLIC(int) _sg_mc_comms_determinism;
 extern XBT_PUBLIC(int) _sg_mc_send_determinism;
index 6801500..da48497 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "simgrid_config.h"
 #include "src/instr/instr_private.h"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 #include "src/surf/surf_private.h"
 #include "surf/surf.h"
index 6af90f2..48d1af1 100644 (file)
@@ -68,7 +68,7 @@ container_t PJ_container_new (const char *name, e_container_types kind, containe
   //Search for network_element_t
   switch (kind){
     case INSTR_HOST:
-      newContainer->netcard = sg_host->pimpl_netcard;
+      newContainer->netcard = sg_host->pimpl_netpoint;
       xbt_assert(newContainer->netcard, "Element '%s' not found",name);
       break;
     case INSTR_ROUTER:
index f88b59c..3375539 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/kernel/EngineImpl.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/kernel/routing/NetZoneImpl.hpp"
 #include <simgrid/s4u/host.hpp>
 
@@ -15,7 +15,7 @@ EngineImpl::EngineImpl() = default;
 EngineImpl::~EngineImpl()
 {
   delete netRoot_;
-  for (auto kv : netcards_)
+  for (auto kv : netpoints_)
     delete kv.second;
 }
 }
index d3501dc..c25063d 100644 (file)
@@ -13,7 +13,7 @@ namespace simgrid {
 namespace kernel {
 namespace routing {
 class NetZoneImpl;
-class NetCard;
+class NetPoint;
 }
 
 class EngineImpl {
@@ -23,7 +23,7 @@ public:
   kernel::routing::NetZoneImpl* netRoot_ = nullptr;
 
 protected:
-  std::unordered_map<std::string,simgrid::kernel::routing::NetCard*> netcards_;
+  std::unordered_map<std::string, simgrid::kernel::routing::NetPoint*> netpoints_;
   friend simgrid::s4u::Engine;
 };
 }
index d2eb784..c6e2679 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/kernel/routing/ClusterZone.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/kernel/routing/RoutedZone.hpp"
 #include "src/surf/network_interface.hpp"
 
@@ -20,7 +20,7 @@ ClusterZone::ClusterZone(NetZone* father, const char* name) : NetZoneImpl(father
 {
 }
 
-void ClusterZone::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat)
+void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
 {
   XBT_VERB("cluster getLocalRoute from '%s'[%d] to '%s'[%d]", src->cname(), src->id(), dst->cname(), dst->id());
   xbt_assert(!privateLinks_.empty(),
index a906518..0137d37 100644 (file)
@@ -69,7 +69,7 @@ class XBT_PRIVATE ClusterZone : public NetZoneImpl {
 public:
   explicit ClusterZone(NetZone* father, const char* name);
 
-  void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
+  void getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t into, double* latency) override;
   void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) override;
 
   virtual void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position);
@@ -81,7 +81,7 @@ public:
 
   Link* backbone_                = nullptr;
   void* loopback_                = nullptr;
-  NetCard* router_               = nullptr;
+  NetPoint* router_              = nullptr;
   bool hasLimiter_               = false;
   bool hasLoopback_              = false;
   unsigned int linkCountPerNode_ = 1; /* may be 1 (if only a private link), 2 or 3 (if limiter and loopback) */
index 7506809..08fd443 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/kernel/routing/DijkstraZone.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 
 #include <float.h>
@@ -141,7 +141,7 @@ void DijkstraZone::newRoute(int src_id, int dst_id, sg_platf_route_cbarg_t e_rou
   xbt_graph_new_edge(routeGraph_, src, dst, e_route);
 }
 
-void DijkstraZone::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat)
+void DijkstraZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
 {
   getRouteCheckParams(src, dst);
   int src_id = src->id();
@@ -239,8 +239,8 @@ void DijkstraZone::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbar
   }
 
   /* compose route path with links */
-  NetCard *gw_src = nullptr, *gw_dst, *prev_gw_src, *first_gw = nullptr;
-  NetCard *gw_dst_net_elm = nullptr, *prev_gw_src_net_elm = nullptr;
+  NetPoint *gw_src = nullptr, *gw_dst, *prev_gw_src, *first_gw = nullptr;
+  NetPoint *gw_dst_net_elm = nullptr, *prev_gw_src_net_elm = nullptr;
 
   for (int v = dst_node_id; v != src_node_id; v = pred_arr[v]) {
     xbt_node_t node_pred_v = xbt_dynar_get_as(nodes, pred_arr[v], xbt_node_t);
@@ -315,8 +315,8 @@ DijkstraZone::DijkstraZone(NetZone* father, const char* name, bool cached) : Rou
 
 void DijkstraZone::addRoute(sg_platf_route_cbarg_t route)
 {
-  NetCard* src        = route->src;
-  NetCard* dst        = route->dst;
+  NetPoint* src       = route->src;
+  NetPoint* dst       = route->dst;
   const char* srcName = src->name().c_str();
   const char* dstName = dst->name().c_str();
 
@@ -353,7 +353,7 @@ void DijkstraZone::addRoute(sg_platf_route_cbarg_t route)
              route->gw_src->name().c_str());
 
     if (route->gw_dst && route->gw_src) {
-      NetCard* gw_tmp = route->gw_src;
+      NetPoint* gw_tmp = route->gw_src;
       route->gw_src   = route->gw_dst;
       route->gw_dst   = gw_tmp;
     }
index bf443fb..b19cd34 100644 (file)
@@ -58,7 +58,7 @@ public:
    * After this function returns, any node in the graph
    * will have a loopback attached to it.
    */
-  void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat) override;
+  void getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat) override;
   void addRoute(sg_platf_route_cbarg_t route) override;
 
   xbt_graph_t routeGraph_  = nullptr; /* xbt_graph */
index 02d4f02..0de5c30 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/kernel/routing/DragonflyZone.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 
 #include <boost/algorithm/string/classification.hpp>
@@ -245,7 +245,7 @@ void DragonflyZone::generateLinks()
   }
 }
 
-void DragonflyZone::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* latency)
+void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* latency)
 {
   // Minimal routing version.
   // TODO : non-minimal random one, and adaptive ?
index 2cc15a5..bb3117d 100644 (file)
@@ -63,7 +63,7 @@ public:
   explicit DragonflyZone(NetZone* father, const char* name);
   ~DragonflyZone() override;
   //      void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position) override;
-  void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
+  void getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t into, double* latency) override;
   void parse_specific_arguments(sg_platf_cluster_cbarg_t cluster) override;
   void seal() override;
   void generateRouters();
index 66729e6..b861258 100644 (file)
@@ -21,7 +21,7 @@ EmptyZone::EmptyZone(NetZone* father, const char* name) : NetZoneImpl(father, na
 
 EmptyZone::~EmptyZone() = default;
 
-void EmptyZone::getLocalRoute(NetCard* /*src*/, NetCard* /*dst*/, sg_platf_route_cbarg_t /*res*/, double* /*lat*/)
+void EmptyZone::getLocalRoute(NetPoint* /*src*/, NetPoint* /*dst*/, sg_platf_route_cbarg_t /*res*/, double* /*lat*/)
 {
 }
 
index 09b2fda..90036ff 100644 (file)
@@ -24,7 +24,7 @@ public:
   explicit EmptyZone(NetZone* father, const char* name);
   ~EmptyZone() override;
 
-  void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
+  void getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t into, double* latency) override;
   void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) override;
 };
 }
index 7a0222a..9475591 100644 (file)
@@ -7,7 +7,7 @@
 #include <sstream>
 
 #include "src/kernel/routing/FatTreeZone.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 
 #include "xbt/lib.h"
@@ -57,7 +57,7 @@ bool FatTreeZone::isInSubTree(FatTreeNode* root, FatTreeNode* node)
   return true;
 }
 
-void FatTreeZone::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency)
+void FatTreeZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t into, double* latency)
 {
 
   if (dst->isRouter() || src->isRouter())
index 5077667..8d85387 100644 (file)
@@ -100,7 +100,7 @@ class XBT_PRIVATE FatTreeZone : public ClusterZone {
 public:
   explicit FatTreeZone(NetZone* father, const char* name);
   ~FatTreeZone() override;
-  void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
+  void getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t into, double* latency) override;
 
   /** \brief Generate the fat tree
    *
index 0caacff..1c20629 100644 (file)
@@ -3,9 +3,8 @@
 /* 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. */
 
-
 #include "src/kernel/routing/FloydZone.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 #include "xbt/log.h"
 
@@ -44,7 +43,7 @@ FloydZone::~FloydZone()
   xbt_free(costTable_);
 }
 
-void FloydZone::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat)
+void FloydZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
 {
   size_t table_size = vertices_.size();
 
@@ -136,7 +135,7 @@ void FloydZone::addRoute(sg_platf_route_cbarg_t route)
                  route->dst->name().c_str(), route->src->name().c_str());
 
     if (route->gw_dst && route->gw_src) {
-      NetCard* gw_tmp = route->gw_src;
+      NetPoint* gw_tmp = route->gw_src;
       route->gw_src   = route->gw_dst;
       route->gw_dst   = gw_tmp;
     }
index 74f0868..f1cb156 100644 (file)
@@ -26,7 +26,7 @@ public:
   explicit FloydZone(NetZone* father, const char* name);
   ~FloydZone() override;
 
-  void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
+  void getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t into, double* latency) override;
   void addRoute(sg_platf_route_cbarg_t route) override;
   void seal() override;
 
index d9b0bab..71723c7 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/kernel/routing/FullZone.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf");
@@ -58,7 +58,7 @@ FullZone::~FullZone()
   }
 }
 
-void FullZone::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t res, double* lat)
+void FullZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t res, double* lat)
 {
   XBT_DEBUG("full getLocalRoute from %s[%d] to %s[%d]", src->cname(), src->id(), dst->cname(), dst->id());
 
@@ -78,8 +78,8 @@ void FullZone::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t
 
 void FullZone::addRoute(sg_platf_route_cbarg_t route)
 {
-  NetCard* src = route->src;
-  NetCard* dst = route->dst;
+  NetPoint* src = route->src;
+  NetPoint* dst = route->dst;
   addRouteCheckParams(route);
 
   size_t table_size = vertices_.size();
@@ -102,7 +102,7 @@ void FullZone::addRoute(sg_platf_route_cbarg_t route)
 
   if (route->symmetrical == true && src != dst) {
     if (route->gw_dst && route->gw_src) {
-      NetCard* gw_tmp = route->gw_src;
+      NetPoint* gw_tmp = route->gw_src;
       route->gw_src   = route->gw_dst;
       route->gw_dst   = gw_tmp;
     }
index e81519c..f13764f 100644 (file)
@@ -25,7 +25,7 @@ public:
   void seal() override;
   ~FullZone() override;
 
-  void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
+  void getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t into, double* latency) override;
   void addRoute(sg_platf_route_cbarg_t route) override;
 
   sg_platf_route_cbarg_t* routingTable_ = nullptr;
similarity index 74%
rename from src/kernel/routing/NetCard.cpp
rename to src/kernel/routing/NetPoint.cpp
index d875e89..5bf404b 100644 (file)
@@ -4,7 +4,8 @@
 /* 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. */
 
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
+
 #include "simgrid/s4u/engine.hpp"
 #include "simgrid/s4u/host.hpp"
 #include "surf/surf_routing.h"
@@ -15,15 +16,15 @@ namespace simgrid {
 namespace kernel {
 namespace routing {
 
-simgrid::xbt::signal<void(NetCard*)> NetCard::onCreation;
+simgrid::xbt::signal<void(NetPoint*)> NetPoint::onCreation;
 
-NetCard::NetCard(std::string name, NetCard::Type componentType, NetZoneImpl* netzone_p)
+NetPoint::NetPoint(std::string name, NetPoint::Type componentType, NetZoneImpl* netzone_p)
     : name_(name), componentType_(componentType), netzone_(netzone_p)
 {
   if (netzone_p != nullptr)
     id_ = netzone_p->addComponent(this);
   simgrid::s4u::Engine::instance()->netcardRegister(this);
-  simgrid::kernel::routing::NetCard::onCreation(this);
+  simgrid::kernel::routing::NetPoint::onCreation(this);
 }
 }
 }
@@ -33,7 +34,7 @@ NetCard::NetCard(std::string name, NetCard::Type componentType, NetZoneImpl* net
  *
  * Netcards are the thing that connect host or routers to the network
  */
-simgrid::kernel::routing::NetCard* sg_netcard_by_name_or_null(const char* name)
+simgrid::kernel::routing::NetPoint* sg_netcard_by_name_or_null(const char* name)
 {
   return simgrid::s4u::Engine::instance()->netcardByNameOrNull(name);
 }
similarity index 79%
rename from src/kernel/routing/NetCard.hpp
rename to src/kernel/routing/NetPoint.hpp
index 0f0b45d..b077a37 100644 (file)
@@ -22,15 +22,15 @@ namespace routing {
 /** @ingroup ROUTING_API
  *  @brief Network cards are the vertices in the graph representing the network, used to compute paths between nodes.
  *
- * @details This represents a position in the network. One can send information between two netcards
+ * @details This represents a position in the network. One can send information between two netpoints
  */
-class NetCard : public simgrid::xbt::Extendable<NetCard> {
+class NetPoint : public simgrid::xbt::Extendable<NetPoint> {
 
 public:
   enum class Type { Host, Router, NetZone };
 
-  NetCard(std::string name, NetCard::Type componentType, NetZoneImpl* netzone_p);
-  ~NetCard() = default;
+  NetPoint(std::string name, NetPoint::Type componentType, NetZoneImpl* netzone_p);
+  ~NetPoint() = default;
 
   // Our rank in the vertices_ array of the netzone that contains us.
   unsigned int id() { return id_; }
@@ -43,14 +43,14 @@ public:
   bool isHost() { return componentType_ == Type::Host; }
   bool isRouter() { return componentType_ == Type::Router; }
 
-  static simgrid::xbt::signal<void(NetCard*)> onCreation;
+  static simgrid::xbt::signal<void(NetPoint*)> onCreation;
 
-  bool operator<(const NetCard &rhs) const { return name_ < rhs.name_; }
+  bool operator<(const NetPoint& rhs) const { return name_ < rhs.name_; }
 
 private:
   unsigned int id_;
   std::string name_;
-  NetCard::Type componentType_;
+  NetPoint::Type componentType_;
   NetZoneImpl* netzone_;
 };
 }
index d4637b3..464e973 100644 (file)
@@ -6,7 +6,7 @@
 #include "src/kernel/routing/NetZoneImpl.hpp"
 #include "simgrid/s4u/engine.hpp"
 #include "simgrid/s4u/host.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/cpu_interface.hpp"
 #include "src/surf/network_interface.hpp"
 
@@ -20,9 +20,9 @@ namespace routing {
 
 class BypassRoute {
 public:
-  explicit BypassRoute(NetCard* gwSrc, NetCard* gwDst) : gw_src(gwSrc), gw_dst(gwDst) {}
-  const NetCard* gw_src;
-  const NetCard* gw_dst;
+  explicit BypassRoute(NetPoint* gwSrc, NetPoint* gwDst) : gw_src(gwSrc), gw_dst(gwDst) {}
+  const NetPoint* gw_src;
+  const NetPoint* gw_dst;
   std::vector<Link*> links;
 };
 
@@ -31,7 +31,7 @@ NetZoneImpl::NetZoneImpl(NetZone* father, const char* name) : NetZone(father, na
   xbt_assert(nullptr == simgrid::s4u::Engine::instance()->netcardByNameOrNull(name),
              "Refusing to create a second NetZone called '%s'.", name);
 
-  netcard_ = new NetCard(name, NetCard::Type::NetZone, static_cast<NetZoneImpl*>(father));
+  netcard_ = new NetPoint(name, NetPoint::Type::NetZone, static_cast<NetZoneImpl*>(father));
   XBT_DEBUG("NetZone '%s' created with the id '%d'", name, netcard_->id());
 }
 NetZoneImpl::~NetZoneImpl()
@@ -50,7 +50,7 @@ simgrid::s4u::Host* NetZoneImpl::createHost(const char* name, std::vector<double
   if (hierarchy_ == RoutingMode::unset)
     hierarchy_ = RoutingMode::base;
 
-  res->pimpl_netcard = new NetCard(name, NetCard::Type::Host, this);
+  res->pimpl_netpoint = new NetPoint(name, NetPoint::Type::Host, this);
 
   surf_cpu_model_pm->createCpu(res, speedPerPstate, coreAmount);
 
@@ -141,7 +141,7 @@ void NetZoneImpl::addBypassRoute(sg_platf_route_cbarg_t e_route)
  *                 dst
  *  @endverbatim
  */
-static void find_common_ancestors(NetCard* src, NetCard* dst,
+static void find_common_ancestors(NetPoint* src, NetPoint* dst,
                                   /* OUT */ NetZoneImpl** common_ancestor, NetZoneImpl** src_ancestor,
                                   NetZoneImpl** dst_ancestor)
 {
@@ -201,7 +201,7 @@ static void find_common_ancestors(NetCard* src, NetCard* dst,
 }
 
 /* PRECONDITION: this is the common ancestor of src and dst */
-bool NetZoneImpl::getBypassRoute(routing::NetCard* src, routing::NetCard* dst,
+bool NetZoneImpl::getBypassRoute(routing::NetPoint* src, routing::NetPoint* dst,
                                  /* OUT */ std::vector<surf::Link*>* links, double* latency)
 {
   // If never set a bypass route return nullptr without any further computations
@@ -255,7 +255,7 @@ bool NetZoneImpl::getBypassRoute(routing::NetCard* src, routing::NetCard* dst,
 
   /* (3) Search for a bypass making the path up to the ancestor useless */
   BypassRoute* bypassedRoute = nullptr;
-  std::pair<kernel::routing::NetCard*, kernel::routing::NetCard*> key;
+  std::pair<kernel::routing::NetPoint*, kernel::routing::NetPoint*> key;
   for (int max = 0; max <= max_index; max++) {
     for (int i = 0; i < max; i++) {
       if (i <= max_index_src && max <= max_index_dst) {
@@ -292,21 +292,21 @@ bool NetZoneImpl::getBypassRoute(routing::NetCard* src, routing::NetCard* dst,
               "calls to getRoute",
               src->cname(), dst->cname(), bypassedRoute->links.size());
     if (src != key.first)
-      getGlobalRoute(src, const_cast<NetCard*>(bypassedRoute->gw_src), links, latency);
+      getGlobalRoute(src, const_cast<NetPoint*>(bypassedRoute->gw_src), links, latency);
     for (surf::Link* link : bypassedRoute->links) {
       links->push_back(link);
       if (latency)
         *latency += link->latency();
     }
     if (dst != key.second)
-      getGlobalRoute(const_cast<NetCard*>(bypassedRoute->gw_dst), dst, links, latency);
+      getGlobalRoute(const_cast<NetPoint*>(bypassedRoute->gw_dst), dst, links, latency);
     return true;
   }
   XBT_DEBUG("No bypass route from '%s' to '%s'.", src->cname(), dst->cname());
   return false;
 }
 
-void NetZoneImpl::getGlobalRoute(routing::NetCard* src, routing::NetCard* dst,
+void NetZoneImpl::getGlobalRoute(routing::NetPoint* src, routing::NetPoint* dst,
                                  /* OUT */ std::vector<surf::Link*>* links, double* latency)
 {
   s_sg_platf_route_cbarg_t route;
index bac785d..bc92279 100644 (file)
@@ -72,10 +72,10 @@ protected:
    * @param into Container into which the traversed links and gateway informations should be pushed
    * @param latency Accumulator in which the latencies should be added (caller must set it to 0)
    */
-  virtual void getLocalRoute(NetCard * src, NetCard * dst, sg_platf_route_cbarg_t into, double* latency) = 0;
+  virtual void getLocalRoute(NetPoint * src, NetPoint * dst, sg_platf_route_cbarg_t into, double* latency) = 0;
   /** @brief retrieves the list of all routes of size 1 (of type src x dst x Link) */
   /* returns whether we found a bypass path */
-  bool getBypassRoute(routing::NetCard * src, routing::NetCard * dst,
+  bool getBypassRoute(routing::NetPoint * src, routing::NetPoint * dst,
                       /* OUT */ std::vector<surf::Link*> * links, double* latency);
 
 public:
@@ -86,7 +86,7 @@ public:
    * @param links Accumulator in which all traversed links should be pushed (caller must empty it)
    * @param latency Accumulator in which the latencies should be added (caller must set it to 0)
    */
-  static void getGlobalRoute(routing::NetCard * src, routing::NetCard * dst,
+  static void getGlobalRoute(routing::NetPoint * src, routing::NetPoint * dst,
                              /* OUT */ std::vector<surf::Link*> * links, double* latency);
 
   virtual void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) = 0;
@@ -99,8 +99,8 @@ public:
   RoutingMode hierarchy_ = RoutingMode::unset;
 
 private:
-  std::map<std::pair<NetCard*, NetCard*>, BypassRoute*> bypassRoutes_; // src x dst -> route
-  routing::NetCard* netcard_ = nullptr;                                // Our representative in the father NetZone
+  std::map<std::pair<NetPoint*, NetPoint*>, BypassRoute*> bypassRoutes_; // src x dst -> route
+  routing::NetPoint* netcard_ = nullptr;                                 // Our representative in the father NetZone
 };
 }
 }
index 5209a95..deaadbe 100644 (file)
@@ -9,7 +9,7 @@
 #include "xbt/log.h"
 #include "xbt/sysdep.h"
 
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/kernel/routing/RoutedZone.hpp"
 #include "src/surf/network_interface.hpp"
 
@@ -157,7 +157,7 @@ sg_platf_route_cbarg_t RoutedZone::newExtendedRoute(RoutingMode hierarchy, sg_pl
   return result;
 }
 
-void RoutedZone::getRouteCheckParams(NetCard* src, NetCard* dst)
+void RoutedZone::getRouteCheckParams(NetPoint* src, NetPoint* dst)
 {
   xbt_assert(src, "Cannot find a route from nullptr to %s", dst->cname());
   xbt_assert(dst, "Cannot find a route from %s to nullptr", src->cname());
@@ -175,8 +175,8 @@ void RoutedZone::getRouteCheckParams(NetCard* src, NetCard* dst)
 }
 void RoutedZone::addRouteCheckParams(sg_platf_route_cbarg_t route)
 {
-  NetCard* src        = route->src;
-  NetCard* dst        = route->dst;
+  NetPoint* src       = route->src;
+  NetPoint* dst       = route->dst;
   const char* srcName = src->cname();
   const char* dstName = dst->cname();
 
index c90df9d..25be9b4 100644 (file)
@@ -57,7 +57,7 @@ public:
                                                   bool change_order);
 
 protected:
-  void getRouteCheckParams(NetCard* src, NetCard* dst);
+  void getRouteCheckParams(NetPoint* src, NetPoint* dst);
   void addRouteCheckParams(sg_platf_route_cbarg_t route);
 };
 }
index 226d0f1..a7fc92c 100644 (file)
@@ -4,8 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/kernel/routing/TorusZone.hpp"
-#include "src/kernel/routing/NetCard.hpp"
-
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster_torus, surf_route_cluster, "Torus Routing part of surf");
@@ -110,7 +109,7 @@ void TorusZone::parse_specific_arguments(sg_platf_cluster_cbarg_t cluster)
   xbt_dynar_free(&dimensions);
 }
 
-void TorusZone::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat)
+void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
 {
 
   XBT_VERB("torus getLocalRoute from '%s'[%d] to '%s'[%d]", src->name().c_str(), src->id(), dst->name().c_str(),
index 8d8c7a1..94a9880 100644 (file)
@@ -22,7 +22,7 @@ public:
   explicit TorusZone(NetZone* father, const char* name);
   ~TorusZone() override;
   void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position) override;
-  void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
+  void getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t into, double* latency) override;
   void parse_specific_arguments(sg_platf_cluster_cbarg_t cluster) override;
 
 private:
index f4d289b..9c54ab7 100644 (file)
@@ -8,7 +8,7 @@
 #include "simgrid/s4u/engine.hpp"
 #include "simgrid/s4u/host.hpp"
 
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/kernel/routing/VivaldiZone.hpp"
 #include "src/surf/network_interface.hpp"
 
@@ -18,12 +18,12 @@ namespace simgrid {
 namespace kernel {
 namespace routing {
 namespace vivaldi {
-simgrid::xbt::Extension<NetCard, Coords> Coords::EXTENSION_ID;
+simgrid::xbt::Extension<NetPoint, Coords> Coords::EXTENSION_ID;
 
-Coords::Coords(NetCard* netcard, const char* coordStr)
+Coords::Coords(NetPoint* netcard, const char* coordStr)
 {
   if (!Coords::EXTENSION_ID.valid())
-    Coords::EXTENSION_ID = NetCard::extension_create<Coords>();
+    Coords::EXTENSION_ID = NetPoint::extension_create<Coords>();
 
   std::vector<std::string> string_values;
   boost::split(string_values, coordStr, boost::is_any_of(" "));
@@ -47,7 +47,7 @@ static inline double euclidean_dist_comp(int index, std::vector<double>* src, st
   return (src_coord - dst_coord) * (src_coord - dst_coord);
 }
 
-static std::vector<double>* getCoordsFromNetcard(NetCard* nc)
+static std::vector<double>* getCoordsFromNetcard(NetPoint* nc)
 {
   simgrid::kernel::routing::vivaldi::Coords* coords = nc->extension<simgrid::kernel::routing::vivaldi::Coords>();
   xbt_assert(coords, "Please specify the Vivaldi coordinates of %s %s (%p)",
@@ -58,7 +58,7 @@ VivaldiZone::VivaldiZone(NetZone* father, const char* name) : ClusterZone(father
 {
 }
 
-void VivaldiZone::setPeerLink(NetCard* netcard, double bw_in, double bw_out, const char* coord)
+void VivaldiZone::setPeerLink(NetPoint* netcard, double bw_in, double bw_out, const char* coord)
 {
   xbt_assert(netcard->netzone() == this, "Cannot add a peer link to a netcard that is not in this netzone");
 
@@ -71,7 +71,7 @@ void VivaldiZone::setPeerLink(NetCard* netcard, double bw_in, double bw_out, con
   privateLinks_.insert({netcard->id(), {linkUp, linkDown}});
 }
 
-void VivaldiZone::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat)
+void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
 {
   XBT_DEBUG("vivaldi getLocalRoute from '%s'[%d] '%s'[%d]", src->cname(), src->id(), dst->cname(), dst->id());
 
index 300b7e4..e2a6e62 100644 (file)
@@ -47,15 +47,15 @@ class XBT_PRIVATE VivaldiZone : public ClusterZone {
 public:
   explicit VivaldiZone(NetZone* father, const char* name);
 
-  void setPeerLink(NetCard* netcard, double bw_in, double bw_out, const char* coord);
-  void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
+  void setPeerLink(NetPoint* netcard, double bw_in, double bw_out, const char* coord);
+  void getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t into, double* latency) override;
 };
 
 namespace vivaldi {
 class XBT_PRIVATE Coords {
 public:
-  static simgrid::xbt::Extension<NetCard, Coords> EXTENSION_ID;
-  explicit Coords(NetCard* host, const char* str);
+  static simgrid::xbt::Extension<NetPoint, Coords> EXTENSION_ID;
+  explicit Coords(NetPoint* host, const char* str);
   virtual ~Coords();
 
   std::vector<double> coords;
index a109f83..07f510c 100644 (file)
@@ -147,7 +147,7 @@ public:
       this->refresh_heap();
     return this->heap.get();
   }
-  malloc_info* get_malloc_info()
+  const malloc_info* get_malloc_info()
   {
     if (!(this->cache_flags_ & Process::cache_malloc))
       this->refresh_malloc_info();
index c57bf9c..a2348a8 100644 (file)
@@ -60,7 +60,7 @@ VisitedState::~VisitedState()
 
 void VisitedStates::prune()
 {
-  while (states_.size() > (std::size_t) _sg_mc_visited) {
+  while (states_.size() > (std::size_t)_sg_mc_max_visited_states) {
     XBT_DEBUG("Try to remove visited state (maximum number of stored states reached)");
     auto min_element = boost::range::min_element(states_,
       [](std::unique_ptr<simgrid::mc::VisitedState>& a, std::unique_ptr<simgrid::mc::VisitedState>& b) {
index fa5ab40..e899990 100644 (file)
@@ -512,9 +512,9 @@ void CommunicationDeterminismChecker::main(void)
       bool compare_snapshots = all_communications_are_finished()
         && this->initial_communications_pattern_done;
 
-      if (_sg_mc_visited == 0
-          || (visited_state = visitedStates_.addVisitedState(
-            expandedStatesCount_, next_state.get(), compare_snapshots)) == nullptr) {
+      if (_sg_mc_max_visited_states == 0 ||
+          (visited_state = visitedStates_.addVisitedState(expandedStatesCount_, next_state.get(), compare_snapshots)) ==
+              nullptr) {
 
         /* Get enabled actors and insert them in the interleave set of the next state */
         for (auto& actor : mc_model_checker->process().actors())
index a28aa51..a505e09 100644 (file)
@@ -220,7 +220,7 @@ void LivenessChecker::replay()
  */
 int LivenessChecker::insertVisitedPair(std::shared_ptr<VisitedPair> visited_pair, simgrid::mc::Pair* pair)
 {
-  if (_sg_mc_visited == 0)
+  if (_sg_mc_max_visited_states == 0)
     return -1;
 
   if (visited_pair == nullptr)
@@ -258,7 +258,7 @@ int LivenessChecker::insertVisitedPair(std::shared_ptr<VisitedPair> visited_pair
 
 void LivenessChecker::purgeVisitedPairs()
 {
-  if (_sg_mc_visited != 0 && visitedPairs_.size() > (std::size_t) _sg_mc_visited) {
+  if (_sg_mc_max_visited_states != 0 && visitedPairs_.size() > (std::size_t)_sg_mc_max_visited_states) {
     // Remove the oldest entry with a linear search:
     visitedPairs_.erase(boost::min_element(visitedPairs_,
       [](std::shared_ptr<VisitedPair> const a, std::shared_ptr<VisitedPair> const& b) {
index 52e1e70..2185577 100644 (file)
@@ -158,7 +158,7 @@ void SafetyChecker::run()
       this->checkNonTermination(next_state.get());
 
     /* Check whether we already explored next_state in the past (but only if interested in state-equality reduction) */
-    if (_sg_mc_visited == true)
+    if (_sg_mc_max_visited_states == true)
       visitedState_ = visitedStates_.addVisitedState(expandedStatesCount_, next_state.get(), true);
 
     /* If this is a new state (or if we don't care about state-equality reduction) */
index f5530bd..e6e2a77 100644 (file)
@@ -113,8 +113,8 @@ bool request_is_enabled(smx_simcall_t req)
 #if HAVE_MC
     // Fetch from MCed memory:
     // HACK, type puning
-    simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_comm;
     if (mc_model_checker != nullptr) {
+      simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_comm;
       mc_model_checker->process().read(temp_comm, remote(act));
       act = static_cast<simgrid::kernel::activity::Comm*>(temp_comm.getBuffer());
     }
index 6deee1c..3716919 100644 (file)
@@ -578,7 +578,7 @@ std::shared_ptr<simgrid::mc::Snapshot> take_snapshot(int num_state)
 
   snapshot->to_ignore = mc_model_checker->process().ignored_heap();
 
-  if (_sg_mc_visited > 0 || strcmp(_sg_mc_property_file, "")) {
+  if (_sg_mc_max_visited_states > 0 || strcmp(_sg_mc_property_file, "")) {
     snapshot->stacks = take_snapshot_stacks(snapshot.get());
     if (_sg_mc_hash)
       snapshot->hash = simgrid::mc::hash(*snapshot);
index 84b8b07..67bebd4 100644 (file)
@@ -55,7 +55,7 @@ int _sg_mc_ksm = 0;
 char *_sg_mc_property_file = nullptr;
 int _sg_mc_hash = 0;
 int _sg_mc_max_depth = 1000;
-int _sg_mc_visited = 0;
+int _sg_mc_max_visited_states = 0;
 char *_sg_mc_dot_output_file = nullptr;
 int _sg_mc_comms_determinism = 0;
 int _sg_mc_send_determinism = 0;
@@ -144,7 +144,7 @@ void _mc_cfg_cb_visited(const char *name)
     xbt_die
         ("You are specifying a number of stored visited states after the initialization (through MSG_config?), but model-checking was not activated at config time (through bu the program was not runned under the model-checker (with simgrid-mc)). This won't work, sorry.");
 
-  _sg_mc_visited = xbt_cfg_get_int(name);
+  _sg_mc_max_visited_states = xbt_cfg_get_int(name);
 }
 
 void _mc_cfg_cb_dot_output(const char *name)
index 861e399..e85574f 100644 (file)
@@ -165,11 +165,10 @@ static inline smx_simcall_t MC_state_get_request_for_process(
   if (!req)
     return nullptr;
 
-  // Fetch the data of the request and translate it:
-
   state->transition.pid = process->pid;
-
   state->executed_req = *req;
+  // Fetch the data of the request and translate it:
+  state->internal_req = *req;
 
   /* The waitany and testany request are transformed into a wait or test request
    * over the corresponding communication action so it can be treated later by
@@ -177,7 +176,6 @@ static inline smx_simcall_t MC_state_get_request_for_process(
   switch (req->call) {
   case SIMCALL_COMM_WAITANY: {
     state->internal_req.call = SIMCALL_COMM_WAIT;
-    state->internal_req.issuer = req->issuer;
     smx_activity_t remote_comm;
     read_element(mc_model_checker->process(),
       &remote_comm, remote(simcall_comm_waitany__get__comms(req)),
@@ -191,7 +189,6 @@ static inline smx_simcall_t MC_state_get_request_for_process(
 
   case SIMCALL_COMM_TESTANY:
     state->internal_req.call = SIMCALL_COMM_TEST;
-    state->internal_req.issuer = req->issuer;
 
     if (state->transition.argument > 0) {
       smx_activity_t remote_comm = mc_model_checker->process().read(
@@ -205,7 +202,6 @@ static inline smx_simcall_t MC_state_get_request_for_process(
     break;
 
   case SIMCALL_COMM_WAIT:
-    state->internal_req = *req;
     mc_model_checker->process().read_bytes(&state->internal_comm ,
       sizeof(state->internal_comm), remote(simcall_comm_wait__get__comm(req)));
     simcall_comm_wait__set__comm(&state->executed_req, state->internal_comm.getBuffer());
@@ -213,7 +209,6 @@ static inline smx_simcall_t MC_state_get_request_for_process(
     break;
 
   case SIMCALL_COMM_TEST:
-    state->internal_req = *req;
     mc_model_checker->process().read_bytes(&state->internal_comm,
       sizeof(state->internal_comm), remote(simcall_comm_test__get__comm(req)));
     simcall_comm_test__set__comm(&state->executed_req, state->internal_comm.getBuffer());
@@ -221,7 +216,7 @@ static inline smx_simcall_t MC_state_get_request_for_process(
     break;
 
   default:
-    state->internal_req = *req;
+    /* No translation needed */
     break;
   }
 
index 2e9179a..5bd81fd 100644 (file)
@@ -236,7 +236,7 @@ void VirtualMachineImpl::setPm(s4u::Host* destination)
   const char* pm_name_dst = destination->cname();
 
   /* update net_elm with that of the destination physical host */
-  piface_->pimpl_netcard = destination->pimpl_netcard;
+  piface_->pimpl_netpoint = destination->pimpl_netpoint;
 
   hostPM_ = destination;
 
index f0884c9..97d2749 100644 (file)
@@ -19,7 +19,7 @@ VirtualMachine::VirtualMachine(const char* name, s4u::Host* pm) : Host(name)
 
   pimpl_vm_ = new vm::VirtualMachineImpl(this, pm);
   /* Currently, a VM uses the network resource of its physical host */
-  pimpl_netcard = pm->pimpl_netcard;
+  pimpl_netpoint = pm->pimpl_netpoint;
   // Create a VCPU for this VM
   surf::CpuCas01* sub_cpu = dynamic_cast<surf::CpuCas01*>(pm->pimpl_cpu);
 
@@ -51,7 +51,7 @@ VirtualMachine::~VirtualMachine()
   extension_set<simgrid::simix::Host>(nullptr);
 
   /* Don't free these things twice: they are the ones of my physical host */
-  pimpl_netcard = nullptr;
+  pimpl_netpoint = nullptr;
 }
 
 bool VirtualMachine::isMigrating()
index 6cff0b1..49844d1 100644 (file)
 #include "simgrid/s4u/storage.hpp"
 #include "simgrid/simix.h"
 #include "src/kernel/EngineImpl.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/kernel/routing/NetZoneImpl.hpp"
-#include "src/kernel/routing/NetCard.hpp"
-
-
 #include "src/surf/network_interface.hpp"
 #include "surf/surf.h"               // routing_platf. FIXME:KILLME. SOON
 
@@ -114,31 +112,31 @@ NetZone* Engine::netzoneByNameOrNull(const char* name)
 }
 
 /** @brief Retrieve the netcard of the given name (or nullptr if not found) */
-simgrid::kernel::routing::NetCard* Engine::netcardByNameOrNull(const char* name)
+simgrid::kernel::routing::NetPoint* Engine::netcardByNameOrNull(const char* name)
 {
-  if (pimpl->netcards_.find(name) == pimpl->netcards_.end())
+  if (pimpl->netpoints_.find(name) == pimpl->netpoints_.end())
     return nullptr;
-  return pimpl->netcards_.at(name);
+  return pimpl->netpoints_.at(name);
 }
 /** @brief Fill the provided vector with all existing netcards */
-void Engine::netcardList(std::vector<simgrid::kernel::routing::NetCard*>* list)
+void Engine::netcardList(std::vector<simgrid::kernel::routing::NetPoint*>* list)
 {
-  for (auto kv: pimpl->netcards_)
+  for (auto kv : pimpl->netpoints_)
     list->push_back(kv.second);
 }
 /** @brief Register a new netcard to the system */
-void Engine::netcardRegister(simgrid::kernel::routing::NetCard* card)
+void Engine::netcardRegister(simgrid::kernel::routing::NetPoint* card)
 {
 //  simgrid::simix::kernelImmediate([&]{ FIXME: this segfaults in set_thread
-      pimpl->netcards_[card->name()] = card;
+pimpl->netpoints_[card->name()] = card;
 //  });
 }
 /** @brief Unregister a given netcard */
-void Engine::netcardUnregister(simgrid::kernel::routing::NetCard* card)
+void Engine::netcardUnregister(simgrid::kernel::routing::NetPoint* card)
 {
-  simgrid::simix::kernelImmediate([&]{
-      pimpl->netcards_.erase(card->name());
-      delete card;
+  simgrid::simix::kernelImmediate([&] {
+    pimpl->netpoints_.erase(card->name());
+    delete card;
   });
 }
 }
index d918006..e602ceb 100644 (file)
@@ -14,7 +14,7 @@
 #include "simgrid/s4u/host.hpp"
 #include "simgrid/s4u/storage.hpp"
 #include "simgrid/simix.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/msg/msg_private.h"
 #include "src/simix/ActorImpl.hpp"
 #include "src/simix/smx_private.h"
@@ -54,8 +54,8 @@ Host::~Host()
   xbt_assert(currentlyDestroying_, "Please call h->destroy() instead of manually deleting it.");
 
   delete pimpl_;
-  if (pimpl_netcard != nullptr) // not removed yet by a children class
-    simgrid::s4u::Engine::instance()->netcardUnregister(pimpl_netcard);
+  if (pimpl_netpoint != nullptr) // not removed yet by a children class
+    simgrid::s4u::Engine::instance()->netcardUnregister(pimpl_netpoint);
   delete pimpl_cpu;
   delete mounts;
 }
@@ -142,7 +142,7 @@ int Host::pstatesCount() const {
  */
 void Host::routeTo(Host* dest, std::vector<Link*>* links, double* latency)
 {
-  simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(pimpl_netcard, dest->pimpl_netcard, links, latency);
+  simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(pimpl_netpoint, dest->pimpl_netpoint, links, latency);
   if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) {
     XBT_CDEBUG(surf_route, "Route from '%s' to '%s' (latency: %f):", cname(), dest->cname(),
                (latency == nullptr ? -1 : *latency));
index 1124461..1ab825e 100644 (file)
@@ -8,7 +8,7 @@
 #include "simgrid/s4u/NetZone.hpp"
 #include "simgrid/s4u/host.hpp"
 #include "simgrid/simix.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp" // Link FIXME: move to proper header
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_netzone, "S4U Networking Zones");
@@ -16,8 +16,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_netzone, "S4U Networking Zones");
 namespace simgrid {
 namespace s4u {
 
-simgrid::xbt::signal<void(bool symmetrical, kernel::routing::NetCard* src, kernel::routing::NetCard* dst,
-                          kernel::routing::NetCard* gw_src, kernel::routing::NetCard* gw_dst,
+simgrid::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<Link*>* link_list)>
     NetZone::onRouteCreation;
 
@@ -84,7 +84,7 @@ xbt_dynar_t NetZone::hosts()
   return res;
 }
 
-int NetZone::addComponent(kernel::routing::NetCard* elm)
+int NetZone::addComponent(kernel::routing::NetPoint* elm)
 {
   vertices_.push_back(elm);
   return vertices_.size() - 1; // The rank of the newly created object
index e655063..9808aa6 100644 (file)
@@ -11,7 +11,7 @@
 #include <xbt/Extendable.hpp>
 #include <simgrid/s4u/host.hpp>
 
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/HostImpl.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sg_host, sd, "Logging specific to sg_hosts");
@@ -91,8 +91,8 @@ xbt_dynar_t sg_hosts_as_dynar()
 
   for (auto kv : host_list) {
     simgrid::s4u::Host* host = kv.second;
-    if (host && host->pimpl_netcard && host->pimpl_netcard->isHost())
-       xbt_dynar_push(res, &host);
+    if (host && host->pimpl_netpoint && host->pimpl_netpoint->isHost())
+      xbt_dynar_push(res, &host);
   }
   xbt_dynar_sort(res, hostcmp_voidp);
   return res;
index 16d6986..c354669 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "simgrid/sg_config.h"
 #include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/surf_private.h"
 
@@ -44,7 +44,7 @@ static int number_of_links = 1;
 static int number_of_networks = 1;
 static int port_number = 1025; //Port number is limited from 1025 to 65 000
 
-simgrid::xbt::Extension<simgrid::kernel::routing::NetCard, NetCardNs3> NetCardNs3::EXTENSION_ID;
+simgrid::xbt::Extension<simgrid::kernel::routing::NetPoint, NetCardNs3> NetCardNs3::EXTENSION_ID;
 
 NetCardNs3::NetCardNs3()
 {
@@ -58,7 +58,7 @@ NetCardNs3::NetCardNs3()
  * Callbacks *
  *************/
 
-static void netcardCreation_cb(simgrid::kernel::routing::NetCard* netcard)
+static void netcardCreation_cb(simgrid::kernel::routing::NetPoint* netcard)
 {
   netcard->extension_set<NetCardNs3>(new NetCardNs3());
 }
@@ -75,7 +75,7 @@ static void clusterCreation_cb(sg_platf_cluster_cbarg_t cluster)
 
     // Create private link
     char* host_id = bprintf("%s%d%s", cluster->prefix, i, cluster->suffix);
-    NetCardNs3* host_src = sg_host_by_name(host_id)->pimpl_netcard->extension<NetCardNs3>();
+    NetCardNs3* host_src = sg_host_by_name(host_id)->pimpl_netpoint->extension<NetCardNs3>();
     xbt_assert(host_src, "Cannot find a NS3 host of name %s", host_id);
 
     ns3_add_link(host_src->node_num, host_dst->node_num, bw,lat);
@@ -94,9 +94,9 @@ static void clusterCreation_cb(sg_platf_cluster_cbarg_t cluster)
   xbt_free(bw);
 }
 
-static void routeCreation_cb(bool symmetrical, simgrid::kernel::routing::NetCard* src,
-                             simgrid::kernel::routing::NetCard* dst, simgrid::kernel::routing::NetCard* gw_src,
-                             simgrid::kernel::routing::NetCard* gw_dst, std::vector<Link*>* link_list)
+static void routeCreation_cb(bool symmetrical, simgrid::kernel::routing::NetPoint* src,
+                             simgrid::kernel::routing::NetPoint* dst, simgrid::kernel::routing::NetPoint* gw_src,
+                             simgrid::kernel::routing::NetPoint* gw_dst, std::vector<Link*>* link_list)
 {
   if (link_list->size() == 1) {
     simgrid::surf::LinkNS3* link = static_cast<simgrid::surf::LinkNS3*>(link_list->at(0));
@@ -154,11 +154,11 @@ namespace simgrid {
 namespace surf {
 
 NetworkNS3Model::NetworkNS3Model() : NetworkModel() {
-  NetCardNs3::EXTENSION_ID = simgrid::kernel::routing::NetCard::extension_create<NetCardNs3>();
+  NetCardNs3::EXTENSION_ID = simgrid::kernel::routing::NetPoint::extension_create<NetCardNs3>();
 
   ns3_initialize(ns3_tcp_model.get().c_str());
 
-  simgrid::kernel::routing::NetCard::onCreation.connect(&netcardCreation_cb);
+  simgrid::kernel::routing::NetPoint::onCreation.connect(&netcardCreation_cb);
   simgrid::surf::on_cluster.connect(&clusterCreation_cb);
   simgrid::surf::on_postparse.connect(&postparse_cb);
   simgrid::s4u::NetZone::onRouteCreation.connect(&routeCreation_cb);
@@ -343,8 +343,8 @@ void ns3_simulator(double maxSeconds)
 void ns3_create_flow(simgrid::s4u::Host* src, simgrid::s4u::Host* dst, double startTime, u_int32_t TotalBytes,
                      simgrid::surf::NetworkNS3Action* action)
 {
-  int node1 = src->pimpl_netcard->extension<NetCardNs3>()->node_num;
-  int node2 = dst->pimpl_netcard->extension<NetCardNs3>()->node_num;
+  int node1 = src->pimpl_netpoint->extension<NetCardNs3>()->node_num;
+  int node2 = dst->pimpl_netpoint->extension<NetCardNs3>()->node_num;
 
   ns3::Ptr<ns3::Node> src_node = nodes.Get(node1);
   ns3::Ptr<ns3::Node> dst_node = nodes.Get(node2);
index b9270f9..3a92354 100644 (file)
@@ -16,7 +16,7 @@ class NetworkNS3Action;
 
 class NetCardNs3 {
 public:
-  static simgrid::xbt::Extension<simgrid::kernel::routing::NetCard, NetCardNs3> EXTENSION_ID;
+  static simgrid::xbt::Extension<simgrid::kernel::routing::NetPoint, NetCardNs3> EXTENSION_ID;
 
   explicit NetCardNs3();
   int node_num;
index 3271fc0..3dff876 100644 (file)
@@ -21,7 +21,7 @@
 #include "src/kernel/routing/FatTreeZone.hpp"
 #include "src/kernel/routing/FloydZone.hpp"
 #include "src/kernel/routing/FullZone.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/kernel/routing/NetZoneImpl.hpp"
 #include "src/kernel/routing/TorusZone.hpp"
 #include "src/kernel/routing/VivaldiZone.hpp"
@@ -89,14 +89,14 @@ void sg_platf_new_host(sg_platf_host_cbarg_t args)
   if (args->pstate != 0)
     host->pimpl_cpu->setPState(args->pstate);
   if (args->coord && strcmp(args->coord, ""))
-    new simgrid::kernel::routing::vivaldi::Coords(host->pimpl_netcard, args->coord);
+    new simgrid::kernel::routing::vivaldi::Coords(host->pimpl_netpoint, args->coord);
 
   if (TRACE_is_enabled() && TRACE_needs_platform())
     sg_instr_new_host(*host);
 }
 
 /** @brief Add a "router" to the network element list */
-simgrid::kernel::routing::NetCard* sg_platf_new_router(const char* name, const char* coords)
+simgrid::kernel::routing::NetPoint* sg_platf_new_router(const char* name, const char* coords)
 {
   simgrid::kernel::routing::NetZoneImpl* current_routing = routing_get_current();
 
@@ -105,8 +105,8 @@ simgrid::kernel::routing::NetCard* sg_platf_new_router(const char* name, const c
   xbt_assert(nullptr == simgrid::s4u::Engine::instance()->netcardByNameOrNull(name),
              "Refusing to create a router named '%s': this name already describes a node.", name);
 
-  simgrid::kernel::routing::NetCard* netcard =
-      new simgrid::kernel::routing::NetCard(name, simgrid::kernel::routing::NetCard::Type::Router, current_routing);
+  simgrid::kernel::routing::NetPoint* netcard =
+      new simgrid::kernel::routing::NetPoint(name, simgrid::kernel::routing::NetPoint::Type::Router, current_routing);
   XBT_DEBUG("Router '%s' has the id %d", name, netcard->id());
 
   if (coords && strcmp(coords, ""))
@@ -557,7 +557,7 @@ void sg_platf_new_peer(sg_platf_peer_cbarg_t peer)
   speedPerPstate.push_back(peer->speed);
   simgrid::s4u::Host* host = as->createHost(peer->id, &speedPerPstate, 1, nullptr);
 
-  as->setPeerLink(host->pimpl_netcard, peer->bw_in, peer->bw_out, peer->coord);
+  as->setPeerLink(host->pimpl_netpoint, peer->bw_in, peer->bw_out, peer->coord);
 
   /* Change from the defaults */
   if (peer->state_trace)
@@ -720,7 +720,7 @@ void sg_platf_new_AS_seal()
 /** @brief Add a link connecting an host to the rest of its AS (which must be cluster or vivaldi) */
 void sg_platf_new_hostlink(sg_platf_host_link_cbarg_t hostlink)
 {
-  simgrid::kernel::routing::NetCard *netcard = sg_host_by_name(hostlink->id)->pimpl_netcard;
+  simgrid::kernel::routing::NetPoint* netcard = sg_host_by_name(hostlink->id)->pimpl_netpoint;
   xbt_assert(netcard, "Host '%s' not found!", hostlink->id);
   xbt_assert(dynamic_cast<simgrid::kernel::routing::ClusterZone*>(current_routing),
              "Only hosts from Cluster and Vivaldi ASes can get an host_link.");
index 62939cd..6644b52 100644 (file)
@@ -5,9 +5,10 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "storage_n11.hpp"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "surf_private.h"
 #include <math.h> /*ceil*/
+
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_storage);
 
 /*************
@@ -41,7 +42,7 @@ static void check_disk_attachment()
     if (xbt_lib_get_level(xbt_lib_get_elm_or_null(storage_lib, key), SURF_STORAGE_LEVEL) != nullptr) {
       simgrid::surf::Storage* storage =
           static_cast<simgrid::surf::Storage*>(xbt_lib_get_or_null(storage_lib, key, SURF_STORAGE_LEVEL));
-      simgrid::kernel::routing::NetCard* host_elm = sg_netcard_by_name_or_null(storage->attach_);
+      simgrid::kernel::routing::NetPoint* host_elm = sg_netcard_by_name_or_null(storage->attach_);
       if (!host_elm)
         surf_parse_error("Unable to attach storage %s: host %s does not exist.", storage->getName(), storage->attach_);
     }
index 45ccea0..623aeba 100644 (file)
@@ -12,7 +12,7 @@
 #include "simgrid/sg_config.h"
 #include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
 #include "src/internal_config.h"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/simix/smx_host_private.h"
 #include "src/surf/HostImpl.hpp"
 #include "surf_private.h"
index e3edce6..017ce08 100644 (file)
@@ -199,7 +199,7 @@ XBT_PUBLIC(void) sg_platf_new_AS_seal();                     // That AS is fully
 
 XBT_PUBLIC(void) sg_platf_new_host   (sg_platf_host_cbarg_t   host);   // Add an host   to the currently described AS
 XBT_PUBLIC(void) sg_platf_new_hostlink(sg_platf_host_link_cbarg_t h); // Add an host_link to the currently described AS
-XBT_PUBLIC(simgrid::kernel::routing::NetCard*)
+XBT_PUBLIC(simgrid::kernel::routing::NetPoint*)
 sg_platf_new_router(const char* name, const char* coords);             // Add a router  to the currently described AS
 XBT_PUBLIC(void) sg_platf_new_link   (sg_platf_link_cbarg_t link);     // Add a link    to the currently described AS
 XBT_PUBLIC(void) sg_platf_new_peer   (sg_platf_peer_cbarg_t peer);     // Add a peer    to the currently described AS
index 8e5a7cd..47cf277 100644 (file)
@@ -11,7 +11,7 @@
 #include "simgrid/link.h"
 #include "simgrid/s4u/engine.hpp"
 #include "simgrid/sg_config.h"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 #include "src/surf/surf_private.h"
 #include "xbt/dict.h"
index 710bb1a..5fbf34c 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <simgrid/simdag.h>
 
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 
 
@@ -87,12 +87,12 @@ int main(int argc, char **argv)
 
   create_environment(parse_time, platformFile);
 
-  std::vector<simgrid::kernel::routing::NetCard*> netcardList;
+  std::vector<simgrid::kernel::routing::NetPoint*> netcardList;
   simgrid::s4u::Engine::instance()->netcardList(&netcardList);
   std::sort(netcardList.begin(), netcardList.end(),
-      [](simgrid::kernel::routing::NetCard* a, simgrid::kernel::routing::NetCard* b) {
-      return a->name() < b->name();
-  });
+            [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
+              return a->name() < b->name();
+            });
 
   if (timings) {
     XBT_INFO("Parsing time: %fs (%zu hosts, %d links)", xbt_os_timer_elapsed(parse_time),
@@ -150,11 +150,11 @@ int main(int argc, char **argv)
 
     for (unsigned int it_src = 0; it_src < totalHosts; it_src++) { // Routes from host
       simgrid::s4u::Host* host1 = hosts[it_src];
-      simgrid::kernel::routing::NetCard* netcardSrc = host1->pimpl_netcard;
+      simgrid::kernel::routing::NetPoint* netcardSrc = host1->pimpl_netpoint;
       for (unsigned int it_dst = 0; it_dst < totalHosts; it_dst++) { // Routes to host
         simgrid::s4u::Host* host2 = hosts[it_dst];
         std::vector<Link*> route;
-        simgrid::kernel::routing::NetCard* netcardDst = host2->pimpl_netcard;
+        simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
         simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr);
         if (!route.empty()) {
           std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", host1->cname(), host2->cname());
@@ -191,7 +191,7 @@ int main(int argc, char **argv)
           simgrid::s4u::Host* host2 = hosts[it_dst];
           std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", value1->cname(), host2->cname());
           std::vector<Link*> route;
-          simgrid::kernel::routing::NetCard* netcardDst = host2->pimpl_netcard;
+          simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
           simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, netcardDst, &route, nullptr);
           for (auto link : route)
             std::printf("<link_ctn id=\"%s\"/>",link->getName());
index 4e873ef..a3401de 100644 (file)
@@ -6,7 +6,7 @@
 #include "simgrid/s4u/engine.hpp"
 #include "simgrid/s4u/host.hpp"
 #include "simgrid/simdag.h"
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "surf/surf_routing.h"
 #include <stdio.h>
 
@@ -18,17 +18,17 @@ int main(int argc, char **argv)
   xbt_dynar_t hosts = sg_hosts_as_dynar();
   std::printf("Host count: %zu, link number: %d\n", sg_host_count(), sg_link_count());
 
-  std::vector<simgrid::kernel::routing::NetCard*> netcardList;
+  std::vector<simgrid::kernel::routing::NetPoint*> netcardList;
   simgrid::s4u::Engine::instance()->netcardList(&netcardList);
   std::sort(netcardList.begin(), netcardList.end(),
-      [](simgrid::kernel::routing::NetCard* a, simgrid::kernel::routing::NetCard* b) {
-      return a->name() < b->name();
-  });
+            [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
+              return a->name() < b->name();
+            });
 
   int it;
   sg_host_t host;
   xbt_dynar_foreach(hosts, it, host) {
-    simgrid::kernel::routing::NetCard * nc = host->pimpl_netcard;
+    simgrid::kernel::routing::NetPoint* nc = host->pimpl_netpoint;
     std::printf("   - Seen: \"%s\". Type: %s\n", host->cname(),
                 nc->isRouter() ? "router" : (nc->isNetZone() ? "netzone" : (nc->isHost() ? "host" : "buggy")));
   }
index 114ea20..94262a0 100644 (file)
@@ -295,8 +295,8 @@ set(SURF_SRC
   src/kernel/routing/FloydZone.hpp
   src/kernel/routing/FullZone.cpp
   src/kernel/routing/FullZone.hpp
-  src/kernel/routing/NetCard.cpp
-  src/kernel/routing/NetCard.hpp
+  src/kernel/routing/NetPoint.cpp
+  src/kernel/routing/NetPoint.hpp
   src/kernel/routing/NetZoneImpl.cpp
   src/kernel/routing/NetZoneImpl.hpp
   src/kernel/routing/RoutedZone.cpp