Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
chain reaction when solving implicit cast smells
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Fri, 3 Sep 2021 08:48:17 +0000 (10:48 +0200)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Fri, 3 Sep 2021 08:48:17 +0000 (10:48 +0200)
24 files changed:
examples/c/exec-dvfs/exec-dvfs.c
examples/cpp/exec-dvfs/s4u-exec-dvfs.cpp
examples/smpi/energy/energy.c
include/simgrid/host.h
include/simgrid/kernel/routing/ClusterZone.hpp
include/simgrid/kernel/routing/NetPoint.hpp
include/simgrid/s4u/Host.hpp
include/simgrid/s4u/NetZone.hpp
src/instr/instr_platform.cpp
src/kernel/activity/MailboxImpl.hpp
src/kernel/routing/DijkstraZone.cpp
src/kernel/routing/DragonflyZone.cpp
src/kernel/routing/FatTreeZone.cpp
src/kernel/routing/FloydZone.cpp
src/kernel/routing/FullZone.cpp
src/kernel/routing/NetZoneImpl.cpp
src/kernel/routing/StarZone.cpp
src/kernel/routing/TorusZone.cpp
src/kernel/routing/VivaldiZone.cpp
src/kernel/routing/WifiZone.cpp
src/plugins/host_dvfs.cpp
src/s4u/s4u_Host.cpp
src/s4u/s4u_Netzone.cpp
src/surf/sg_platf.cpp

index 405d494..afe68b1 100644 (file)
@@ -17,8 +17,8 @@ static void dvfs(int argc, char* argv[])
 {
   sg_host_t host = sg_host_self();
 
-  int nb = sg_host_get_nb_pstates(host);
-  XBT_INFO("Count of Processor states=%d", nb);
+  unsigned long nb = sg_host_get_nb_pstates(host);
+  XBT_INFO("Count of Processor states=%lu", nb);
 
   double current_peak = sg_host_get_speed(host);
   XBT_INFO("Current power peak=%f", current_peak);
@@ -29,12 +29,12 @@ static void dvfs(int argc, char* argv[])
   XBT_INFO("Task1 simulation time: %e", task_time);
 
   // Change power peak
-  int new_pstate = 2;
-  xbt_assert(new_pstate < nb, "Cannot set the host %s at pstate %d because it only provides %d pstates.",
+  unsigned long new_pstate = 2;
+  xbt_assert(new_pstate < nb, "Cannot set the host %s at pstate %lu because it only provides %lu pstates.",
              sg_host_get_name(host), new_pstate, nb);
 
   double peak_at = sg_host_get_pstate_speed(host, new_pstate);
-  XBT_INFO("Changing power peak value to %f (at index %d)", peak_at, new_pstate);
+  XBT_INFO("Changing power peak value to %f (at index %lu)", peak_at, new_pstate);
 
   sg_host_set_pstate(host, new_pstate);
 
@@ -48,8 +48,8 @@ static void dvfs(int argc, char* argv[])
 
   // Verify the default pstate is set to 0
   host    = sg_host_by_name("MyHost2");
-  int nb2 = sg_host_get_nb_pstates(host);
-  XBT_INFO("Count of Processor states=%d", nb2);
+  unsigned long nb2 = sg_host_get_nb_pstates(host);
+  XBT_INFO("Count of Processor states=%lu", nb2);
 
   double current_peak2 = sg_host_get_speed(host);
   XBT_INFO("Current power peak=%f", current_peak2);
index 1f4e28b..7df0140 100644 (file)
@@ -24,9 +24,9 @@ static int dvfs()
   XBT_INFO("Computation1 duration: %.2f", exec_time);
 
   // Change power peak
-  int new_pstate = 2;
+  unsigned long new_pstate = 2;
 
-  XBT_INFO("Changing power peak value to %f (at index %d)", host->get_pstate_speed(new_pstate), new_pstate);
+  XBT_INFO("Changing power peak value to %f (at index %lu)", host->get_pstate_speed(new_pstate), new_pstate);
 
   host->set_pstate(new_pstate);
 
index 6126811..9a733c9 100644 (file)
@@ -15,7 +15,7 @@
 int main(int argc, char *argv[])
 {
   int rank;
-  int i;
+  unsigned long i;
   char buf[1024];
 
   int err = MPI_Init(&argc, &argv);
@@ -31,13 +31,12 @@ int main(int argc, char *argv[])
     exit(EXIT_FAILURE);
   }
 
-  int pstates = sg_host_get_nb_pstates(sg_host_self());
+  unsigned long pstates = sg_host_get_nb_pstates(sg_host_self());
 
   char *s = buf;
   size_t sz = sizeof buf;
-  size_t x = snprintf(s, sz,
-               "[%.6f] [rank %d] Pstates: %d; Powers: %.0f",
-               MPI_Wtime(), rank, pstates, sg_host_get_pstate_speed(sg_host_self(), 0));
+  size_t x  = snprintf(s, sz, "[%.6f] [rank %d] Pstates: %lu; Powers: %.0f", MPI_Wtime(), rank, pstates,
+                      sg_host_get_pstate_speed(sg_host_self(), 0));
   if (x < sz) {
     s += x;
     sz -= x;
@@ -55,7 +54,7 @@ int main(int argc, char *argv[])
 
   for (i = 0; i < pstates; i++) {
     sg_host_set_pstate(sg_host_self(), i);
-    fprintf(stderr, "[%.6f] [rank %d] Current pstate: %d; Current power: %.0f\n", MPI_Wtime(), rank, i,
+    fprintf(stderr, "[%.6f] [rank %d] Current pstate: %lu; Current power: %.0f\n", MPI_Wtime(), rank, i,
             sg_host_get_speed(sg_host_self()));
 
     SMPI_SAMPLE_FLOPS(1e9) {
index bb73630..77d3617 100644 (file)
@@ -91,8 +91,8 @@ XBT_PUBLIC const char* sg_host_self_get_name();
  */
 XBT_PUBLIC unsigned long sg_host_get_nb_pstates(const_sg_host_t host);
 
-XBT_PUBLIC int sg_host_get_pstate(const_sg_host_t host);
-XBT_PUBLIC void sg_host_set_pstate(sg_host_t host, int pstate);
+XBT_PUBLIC unsigned long sg_host_get_pstate(const_sg_host_t host);
+XBT_PUBLIC void sg_host_set_pstate(sg_host_t host, unsigned long pstate);
 
 XBT_PUBLIC void sg_host_turn_on(sg_host_t host);
 XBT_PUBLIC void sg_host_turn_off(sg_host_t host);
index 489a91a..86ac407 100644 (file)
@@ -104,8 +104,8 @@ class XBT_PRIVATE ClusterBase : public ClusterZone {
 protected:
   using ClusterZone::ClusterZone;
   void set_num_links_per_node(unsigned long num) { num_links_per_node_ = num; }
-  resource::LinkImpl* get_uplink_from(unsigned int position) const { return private_links_.at(position).first; }
-  resource::LinkImpl* get_downlink_to(unsigned int position) const { return private_links_.at(position).second; }
+  resource::LinkImpl* get_uplink_from(unsigned long position) const { return private_links_.at(position).first; }
+  resource::LinkImpl* get_downlink_to(unsigned long position) const { return private_links_.at(position).second; }
 
   double get_link_latency() const { return link_lat_; }
   double get_link_bandwidth() const { return link_bw_; }
index 5afa2eb..5375856 100644 (file)
@@ -31,7 +31,7 @@ public:
   NetPoint(const std::string& name, NetPoint::Type component_type);
 
   // Our rank in the vertices_ array of the netzone that contains us.
-  unsigned int id() const { return id_; }
+  unsigned long id() const { return id_; }
   const std::string& get_name() const { return name_; }
   const char* get_cname() const { return name_.c_str(); }
   /** @brief the NetZone in which this NetPoint is included */
@@ -49,7 +49,7 @@ public:
   bool operator<(const NetPoint& rhs) const { return name_ < rhs.name_; }
 
 private:
-  unsigned int id_ = -1;
+  unsigned long id_ = -1;
   std::string name_;
   NetPoint::Type component_type_;
   NetZoneImpl* englobing_zone_ = nullptr;
index 5ca3ce3..cd0797a 100644 (file)
@@ -189,8 +189,8 @@ public:
 
   unsigned long get_pstate_count() const;
   int get_pstate() const;
-  double get_pstate_speed(int pstate_index) const;
-  Host* set_pstate(int pstate_index);
+  double get_pstate_speed(unsigned long pstate_index) const;
+  Host* set_pstate(unsigned long pstate_index);
   Host* set_coordinates(const std::string& coords);
 
   std::vector<Disk*> get_disks() const;
index d2d706e..c9625fa 100644 (file)
@@ -69,7 +69,7 @@ public:
                          std::map<std::string, xbt_edge_t, std::less<>>* edges);
 
   /* Add content to the netzone, at parsing time. It should be sealed afterward. */
-  int add_component(kernel::routing::NetPoint* elm); /* A host, a router or a netzone, whatever */
+  unsigned long add_component(kernel::routing::NetPoint* elm); /* A host, a router or a netzone, whatever */
 
   /**
    * @brief Add a route between 2 netpoints
index d096c42..de15eee 100644 (file)
@@ -113,7 +113,7 @@ static void linkContainers(simgrid::instr::Container* src, simgrid::instr::Conta
   XBT_DEBUG("  linkContainers %s <-> %s", src->get_cname(), dst->get_cname());
 }
 
-static void recursiveGraphExtraction(const simgrid::s4u::NetZone* netzone, simgrid::instr::Container* container,
+static void recursiveGraphExtraction(const simgrid::s4u::NetZone* netzone, const simgrid::instr::Container* container,
                                      std::set<std::string, std::less<>>* filter)
 {
   if (not TRACE_platform_topology()) {
index 2ae2631..61bbb4d 100644 (file)
@@ -53,7 +53,7 @@ public:
   CommImplPtr find_matching_comm(CommImpl::Type type, bool (*match_fun)(void*, void*, CommImpl*), void* this_user_data,
                                  const CommImplPtr& my_synchro, bool done, bool remove_matching);
   bool is_permanent() const { return permanent_receiver_ != nullptr; }
-  actor::ActorImplPtr get_permanent_receiver() { return permanent_receiver_; }
+  actor::ActorImplPtr get_permanent_receiver() const { return permanent_receiver_; }
   bool empty() const { return comm_queue_.empty(); }
   size_t size() const { return comm_queue_.size(); }
   CommImplPtr front() const { return comm_queue_.front(); }
index e7b9d2c..740b69a 100644 (file)
@@ -87,8 +87,8 @@ xbt_node_t DijkstraZone::node_map_search(int id)
 void DijkstraZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* route, double* lat)
 {
   get_route_check_params(src, dst);
-  int src_id = src->id();
-  int dst_id = dst->id();
+  unsigned long src_id = src->id();
+  unsigned long dst_id = dst->id();
 
   const_xbt_dynar_t nodes = xbt_graph_get_nodes(route_graph_.get());
 
index e75ea57..54970fe 100644 (file)
@@ -284,7 +284,7 @@ void DragonflyZone::get_local_route(const NetPoint* src, const NetPoint* dst, Ro
   if (dst->is_router() || src->is_router())
     return;
 
-  XBT_VERB("dragonfly getLocalRoute from '%s'[%u] to '%s'[%u]", src->get_cname(), src->id(), dst->get_cname(),
+  XBT_VERB("dragonfly getLocalRoute from '%s'[%lu] to '%s'[%lu]", src->get_cname(), src->id(), dst->get_cname(),
            dst->id());
 
   if ((src->id() == dst->id()) && has_loopback()) {
index 27665e6..8642501 100644 (file)
@@ -50,16 +50,16 @@ void FatTreeZone::get_local_route(const NetPoint* src, const NetPoint* dst, Rout
 
   /* Let's find the source and the destination in our internal structure */
   auto searchedNode = this->compute_nodes_.find(src->id());
-  xbt_assert(searchedNode != this->compute_nodes_.end(), "Could not find the source %s [%u] in the fat tree",
+  xbt_assert(searchedNode != this->compute_nodes_.end(), "Could not find the source %s [%lu] in the fat tree",
              src->get_cname(), src->id());
   const FatTreeNode* source = searchedNode->second.get();
 
   searchedNode = this->compute_nodes_.find(dst->id());
-  xbt_assert(searchedNode != this->compute_nodes_.end(), "Could not find the destination %s [%u] in the fat tree",
+  xbt_assert(searchedNode != this->compute_nodes_.end(), "Could not find the destination %s [%lu] in the fat tree",
              dst->get_cname(), dst->id());
   const FatTreeNode* destination = searchedNode->second.get();
 
-  XBT_VERB("Get route and latency from '%s' [%u] to '%s' [%u] in a fat tree", src->get_cname(), src->id(),
+  XBT_VERB("Get route and latency from '%s' [%lu] to '%s' [%lu] in a fat tree", src->get_cname(), src->id(),
            dst->get_cname(), dst->id());
 
   /* In case destination is the source, and there is a loopback, let's use it instead of going up to a switch */
index 6674f5b..feda4ac 100644 (file)
@@ -39,7 +39,7 @@ void FloydZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route*
 
   /* create a result route */
   std::vector<Route*> route_stack;
-  unsigned int cur = dst->id();
+  unsigned long cur = dst->id();
   do {
     int pred = predecessor_table_[src->id()][cur];
     if (pred == -1)
index dcbf949..6ec3408 100644 (file)
@@ -43,7 +43,7 @@ void FullZone::do_seal()
 
 void FullZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* res, double* lat)
 {
-  XBT_DEBUG("full getLocalRoute from %s[%u] to %s[%u]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
+  XBT_DEBUG("full getLocalRoute from %s[%lu] to %s[%lu]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
 
   const auto& e_route = routing_table_[src->id()][dst->id()];
 
index b803a4c..bd320c8 100644 (file)
@@ -94,7 +94,7 @@ NetZoneImpl::NetZoneImpl(const std::string& name) : piface_(this), name_(name)
   xbt_assert(nullptr == s4u::Engine::get_instance()->netpoint_by_name_or_null(get_name()),
              "Refusing to create a second NetZone called '%s'.", get_cname());
   netpoint_ = new NetPoint(name_, NetPoint::Type::NetZone);
-  XBT_DEBUG("NetZone '%s' created with the id '%u'", get_cname(), netpoint_->id());
+  XBT_DEBUG("NetZone '%s' created with the id '%lu'", get_cname(), netpoint_->id());
   _sg_cfg_init_status = 2; /* HACK: direct access to the global controlling the level of configuration to prevent
                             * any further config now that we created some real content */
   simgrid::s4u::NetZone::on_creation(piface_); // notify the signal
index dad133f..c30a638 100644 (file)
@@ -29,7 +29,7 @@ void StarZone::add_links_to_route(const std::vector<resource::LinkImpl*>& links,
 
 void StarZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* route, double* latency)
 {
-  XBT_VERB("StarZone getLocalRoute from '%s'[%u] to '%s'[%u]", src->get_cname(), src->id(), dst->get_cname(),
+  XBT_VERB("StarZone getLocalRoute from '%s'[%lu] to '%s'[%lu]", src->get_cname(), src->id(), dst->get_cname(),
            dst->id());
 
   const auto& src_route = routes_.at(src->id());
index f17a7d3..033df68 100644 (file)
@@ -79,7 +79,7 @@ void TorusZone::set_topology(const std::vector<unsigned int>& dimensions)
 
 void TorusZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* route, double* lat)
 {
-  XBT_VERB("torus getLocalRoute from '%s'[%u] to '%s'[%u]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
+  XBT_VERB("torus getLocalRoute from '%s'[%lu] to '%s'[%lu]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
 
   if (dst->is_router() || src->is_router())
     return;
index 295660c..d15f521 100644 (file)
@@ -72,7 +72,7 @@ void VivaldiZone::set_peer_link(NetPoint* netpoint, double bw_in, double bw_out)
 
 void VivaldiZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* route, double* lat)
 {
-  XBT_DEBUG("vivaldi getLocalRoute from '%s'[%u] '%s'[%u]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
+  XBT_DEBUG("vivaldi getLocalRoute from '%s'[%lu] '%s'[%lu]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
 
   if (src->is_netzone()) {
     std::string srcName = "router_" + src->get_name();
index 26df5eb..2acdb0e 100644 (file)
@@ -30,7 +30,7 @@ void WifiZone::do_seal()
 
 void WifiZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* res, double* lat)
 {
-  XBT_DEBUG("full getLocalRoute from %s[%u] to %s[%u]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
+  XBT_DEBUG("full getLocalRoute from %s[%lu] to %s[%lu]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
 
   if (wifi_link_ != nullptr) {
     // If src and dst are nodes, not access_point, we need to traverse the link twice
index 9ab9a25..cd54f15 100644 (file)
@@ -103,8 +103,8 @@ public:
   virtual ~Governor() = default;
   virtual std::string get_name() const = 0;
   simgrid::s4u::Host* get_host() const { return host_; }
-  int get_min_pstate() const { return min_pstate; }
-  int get_max_pstate() const { return max_pstate; }
+  unsigned long get_min_pstate() const { return min_pstate; }
+  unsigned long get_max_pstate() const { return max_pstate; }
 
   void init()
   {
@@ -194,7 +194,7 @@ public:
 
     if (load > freq_up_threshold_) {
       get_host()->set_pstate(get_min_pstate()); /* Run at max. performance! */
-      XBT_INFO("Load: %f > threshold: %f --> changed to pstate %i", load, freq_up_threshold_, get_min_pstate());
+      XBT_INFO("Load: %f > threshold: %f --> changed to pstate %lu", load, freq_up_threshold_, get_min_pstate());
     } else {
       /* The actual implementation uses a formula here: (See Kernel file cpufreq_ondemand.c:158)
        *
@@ -205,12 +205,12 @@ public:
        */
       // Load is now < freq_up_threshold; exclude pstate 0 (the fastest)
       // because pstate 0 can only be selected if load > freq_up_threshold_
-      int new_pstate = static_cast<int>(get_max_pstate() - load * (get_max_pstate() + 1));
+      unsigned long new_pstate = static_cast<int>(get_max_pstate() - load * (get_max_pstate() + 1));
       if (new_pstate < get_min_pstate())
         new_pstate = get_min_pstate();
       get_host()->set_pstate(new_pstate);
 
-      XBT_DEBUG("Load: %f < threshold: %f --> changed to pstate %i", load, freq_up_threshold_, new_pstate);
+      XBT_DEBUG("Load: %f < threshold: %f --> changed to pstate %lu", load, freq_up_threshold_, new_pstate);
     }
   }
 };
@@ -238,24 +238,24 @@ public:
   void update() override
   {
     double load = get_host()->get_core_count() * sg_host_get_avg_load(get_host());
-    int pstate  = get_host()->get_pstate();
+    unsigned long pstate = get_host()->get_pstate();
     sg_host_load_reset(get_host()); // Only consider the period between two calls to this method!
 
     if (load > freq_up_threshold_) {
       if (pstate != get_min_pstate()) {
         get_host()->set_pstate(pstate - 1);
-        XBT_INFO("Load: %f > threshold: %f -> increasing performance to pstate %d", load, freq_up_threshold_,
+        XBT_INFO("Load: %f > threshold: %f -> increasing performance to pstate %lu", load, freq_up_threshold_,
                  pstate - 1);
       } else {
-        XBT_DEBUG("Load: %f > threshold: %f -> but cannot speed up even more, already in highest pstate %d", load,
+        XBT_DEBUG("Load: %f > threshold: %f -> but cannot speed up even more, already in highest pstate %lu", load,
                   freq_up_threshold_, pstate);
       }
     } else if (load < freq_down_threshold_) {
       if (pstate != get_max_pstate()) { // Are we in the slowest pstate already?
         get_host()->set_pstate(pstate + 1);
-        XBT_INFO("Load: %f < threshold: %f -> slowing down to pstate %d", load, freq_down_threshold_, pstate + 1);
+        XBT_INFO("Load: %f < threshold: %f -> slowing down to pstate %lu", load, freq_down_threshold_, pstate + 1);
       } else {
-        XBT_DEBUG("Load: %f < threshold: %f -> cannot slow down even more, already in slowest pstate %d", load,
+        XBT_DEBUG("Load: %f < threshold: %f -> cannot slow down even more, already in slowest pstate %lu", load,
                   freq_down_threshold_, pstate);
       }
     }
@@ -345,7 +345,7 @@ public:
       }
     }
 
-    for (int pstate = get_host()->get_pstate_count() - 1; pstate >= 0; pstate--) {
+    for (unsigned long pstate = get_host()->get_pstate_count() - 1; pstate != 0; pstate--) {
       if (computed_flops / rates[task_id][pstate] <= target_time) {
         // We just found the pstate we want to use!
         best_pstate = pstate;
index fba8ef4..b9a3b7a 100644 (file)
@@ -246,7 +246,7 @@ Host* Host::set_speed_profile(kernel::profile::Profile* p)
 }
 
 /** @brief Get the peak processor speed (in flops/s), at the specified pstate  */
-double Host::get_pstate_speed(int pstate_index) const
+double Host::get_pstate_speed(unsigned long pstate_index) const
 {
   return this->pimpl_cpu_->get_pstate_peak_speed(pstate_index);
 }
@@ -314,7 +314,7 @@ Host* Host::set_pstate_speed(const std::vector<std::string>& speed_per_state)
 }
 
 /** @brief Set the pstate at which the host should run */
-Host* Host::set_pstate(int pstate_index)
+Host* Host::set_pstate(unsigned long pstate_index)
 {
   kernel::actor::simcall([this, pstate_index] { this->pimpl_cpu_->set_pstate(pstate_index); });
   return this;
@@ -547,7 +547,7 @@ unsigned long sg_host_get_nb_pstates(const_sg_host_t host)
  *
  *  See also @ref plugin_host_energy.
  */
-int sg_host_get_pstate(const_sg_host_t host)
+unsigned long sg_host_get_pstate(const_sg_host_t host)
 {
   return host->get_pstate();
 }
@@ -555,7 +555,7 @@ int sg_host_get_pstate(const_sg_host_t host)
  *
  *  See also @ref plugin_host_energy.
  */
-void sg_host_set_pstate(sg_host_t host, int pstate)
+void sg_host_set_pstate(sg_host_t host, unsigned long pstate)
 {
   host->set_pstate(pstate);
 }
index 086e1ad..a791b03 100644 (file)
@@ -95,7 +95,7 @@ int NetZone::get_host_count() const
   return pimpl_->get_host_count();
 }
 
-int NetZone::add_component(kernel::routing::NetPoint* elm)
+unsigned long NetZone::add_component(kernel::routing::NetPoint* elm)
 {
   return pimpl_->add_component(elm);
 }
index d4e7434..5810642 100644 (file)
@@ -109,7 +109,7 @@ void sg_platf_new_peer(const simgrid::kernel::routing::PeerCreationArgs* args)
 simgrid::kernel::routing::NetPoint* sg_platf_new_router(const std::string& name, const std::string& coords)
 {
   auto* netpoint = current_routing->create_router(name)->set_coordinates(coords);
-  XBT_DEBUG("Router '%s' has the id %u", netpoint->get_cname(), netpoint->id());
+  XBT_DEBUG("Router '%s' has the id %lu", netpoint->get_cname(), netpoint->id());
 
   return netpoint;
 }
@@ -358,7 +358,7 @@ static void sg_platf_cluster_set_hostlink(simgrid::kernel::routing::StarZone* zo
                                           const simgrid::s4u::Link* link_up, const simgrid::s4u::Link* link_down,
                                           const simgrid::s4u::Link* backbone)
 {
-  XBT_DEBUG("Push Host_link for host '%s' to position %u", netpoint->get_cname(), netpoint->id());
+  XBT_DEBUG("Push Host_link for host '%s' to position %lu", netpoint->get_cname(), netpoint->id());
   simgrid::s4u::LinkInRoute linkUp{link_up};
   simgrid::s4u::LinkInRoute linkDown{link_down};
   if (backbone) {