Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change cname() to getCname() and add getName() in surf::Resource.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 14 Oct 2017 12:03:03 +0000 (14:03 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 14 Oct 2017 21:48:41 +0000 (23:48 +0200)
20 files changed:
src/instr/instr_interface.cpp
src/kernel/routing/ClusterZone.cpp
src/kernel/routing/RoutedZone.cpp
src/s4u/s4u_host.cpp
src/s4u/s4u_link.cpp
src/s4u/s4u_storage.cpp
src/simix/smx_global.cpp
src/surf/FileImpl.cpp
src/surf/cpu_cas01.cpp
src/surf/cpu_interface.cpp
src/surf/cpu_ti.cpp
src/surf/network_cm02.cpp
src/surf/network_interface.cpp
src/surf/network_ns3.cpp
src/surf/ptask_L07.cpp
src/surf/storage_n11.cpp
src/surf/surf_c_bindings.cpp
src/surf/surf_interface.cpp
src/surf/surf_interface.hpp
teshsuite/simdag/flatifier/flatifier.cpp

index f7c89a2..a0899f6 100644 (file)
@@ -310,7 +310,7 @@ static void instr_user_srcdst_variable(double time, const char *src, const char
   std::vector<simgrid::surf::LinkImpl*> route;
   simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(src_elm, dst_elm, &route, nullptr);
   for (auto const& link : route)
-    instr_user_variable(time, link->cname(), variable, father_type, value, what, nullptr, &user_link_variables);
+    instr_user_variable(time, link->getCname(), variable, father_type, value, what, nullptr, &user_link_variables);
 }
 
 /** \ingroup TRACE_API
index 894e08f..78e3d89 100644 (file)
@@ -81,7 +81,7 @@ void ClusterZone::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges
 
   xbt_node_t backboneNode = nullptr;
   if (backbone_) {
-    backboneNode = new_xbt_graph_node(graph, backbone_->cname(), nodes);
+    backboneNode = new_xbt_graph_node(graph, backbone_->getCname(), nodes);
     new_xbt_graph_edge(graph, routerNode, backboneNode, edges);
   }
 
@@ -92,7 +92,7 @@ void ClusterZone::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges
       std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(src->id());
 
       if (info.first) { // link up
-        xbt_node_t current = new_xbt_graph_node(graph, info.first->cname(), nodes);
+        xbt_node_t current = new_xbt_graph_node(graph, info.first->getCname(), nodes);
         new_xbt_graph_edge(graph, previous, current, edges);
 
         if (backbone_) {
@@ -103,7 +103,7 @@ void ClusterZone::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges
       }
 
       if (info.second) { // link down
-        xbt_node_t current = new_xbt_graph_node(graph, info.second->cname(), nodes);
+        xbt_node_t current = new_xbt_graph_node(graph, info.second->getCname(), nodes);
         new_xbt_graph_edge(graph, previous, current, edges);
 
         if (backbone_) {
index e655edd..4368705 100644 (file)
@@ -99,7 +99,7 @@ void RoutedZone::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)
       }
 
       for (auto const& link : *route->link_list) {
-        const char* link_name = link->cname();
+        const char* link_name = link->getCname();
         current               = new_xbt_graph_node(graph, link_name, nodes);
         current_name          = link_name;
         new_xbt_graph_edge(graph, previous, current, edges);
index 904b950..b4245ed 100644 (file)
@@ -169,7 +169,7 @@ void Host::routeTo(Host* dest, std::vector<surf::LinkImpl*>* links, double* late
     XBT_CDEBUG(surf_route, "Route from '%s' to '%s' (latency: %f):", getCname(), dest->getCname(),
                (latency == nullptr ? -1 : *latency));
     for (auto const& link : *links)
-      XBT_CDEBUG(surf_route, "Link %s", link->cname());
+      XBT_CDEBUG(surf_route, "Link %s", link->getCname());
   }
 }
 
index 24561ff..60ef3fb 100644 (file)
@@ -84,7 +84,7 @@ Link* Link::byName(const char* name)
 }
 const char* Link::name()
 {
-  return this->pimpl_->cname();
+  return this->pimpl_->getCname();
 }
 bool Link::isUsed()
 {
index 092afea..0507ac3 100644 (file)
@@ -32,7 +32,7 @@ Storage* Storage::byName(std::string name)
 
 const char* Storage::getName()
 {
-  return pimpl_->cname();
+  return pimpl_->getCname();
 }
 
 const char* Storage::getType()
index 4abd638..5ad0c95 100644 (file)
@@ -235,8 +235,8 @@ void SIMIX_global_init(int *argc, char **argv)
     });
 
     simgrid::surf::storageCreatedCallbacks.connect([](simgrid::surf::StorageImpl* storage) {
-      sg_storage_t s = simgrid::s4u::Storage::byName(storage->cname());
-      xbt_assert(s != nullptr, "Storage not found for name %s", storage->cname());
+      sg_storage_t s = simgrid::s4u::Storage::byName(storage->getCname());
+      xbt_assert(s != nullptr, "Storage not found for name %s", storage->getCname());
     });
   }
 
index ff0a830..6497944 100644 (file)
@@ -29,7 +29,7 @@ FileImpl::FileImpl(sg_storage_t st, std::string path, std::string mount) : path_
 
 Action* FileImpl::read(sg_size_t size)
 {
-  XBT_DEBUG("READ %s on disk '%s'", cname(), location_->cname());
+  XBT_DEBUG("READ %s on disk '%s'", cname(), location_->getCname());
   if (current_position_ + size > size_) {
     if (current_position_ > size_) {
       size = 0;
@@ -45,7 +45,7 @@ Action* FileImpl::read(sg_size_t size)
 
 Action* FileImpl::write(sg_size_t size)
 {
-  XBT_DEBUG("WRITE %s on disk '%s'. size '%llu/%llu'", cname(), location_->cname(), size, size_);
+  XBT_DEBUG("WRITE %s on disk '%s'. size '%llu/%llu'", cname(), location_->getCname(), size, size_);
 
   StorageAction* action = location_->write(size);
   action->file_         = this;
@@ -79,10 +79,10 @@ int FileImpl::unlink()
 {
   /* Check if the file is on this storage */
   if (location_->getContent()->find(path_) == location_->getContent()->end()) {
-    XBT_WARN("File %s is not on disk %s. Impossible to unlink", cname(), location_->cname());
+    XBT_WARN("File %s is not on disk %s. Impossible to unlink", cname(), location_->getCname());
     return -1;
   } else {
-    XBT_DEBUG("UNLINK %s on disk '%s'", cname(), location_->cname());
+    XBT_DEBUG("UNLINK %s on disk '%s'", cname(), location_->getCname());
     location_->usedSize_ -= size_;
 
     // Remove the file from storage
index 22eac86..ca7cae6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2011, 2013-2016. The SimGrid Team.
+/* Copyright (c) 2009-2011, 2013-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -179,7 +179,7 @@ CpuAction *CpuCas01::sleep(double duration)
   if (duration > 0)
     duration = MAX(duration, sg_surf_precision);
 
-  XBT_IN("(%s,%g)", cname(), duration);
+  XBT_IN("(%s,%g)", getCname(), duration);
   CpuCas01Action* action = new CpuCas01Action(model(), 1.0, isOff(), speed_.scale * speed_.peak, constraint());
 
   // FIXME: sleep variables should not consume 1.0 in lmm_expand
index 3ea7017..faa4ab5 100644 (file)
@@ -30,8 +30,9 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/)
     XBT_CDEBUG(surf_kernel, "Something happened to action %p", action);
     if (TRACE_is_enabled()) {
       Cpu *cpu = static_cast<Cpu*>(lmm_constraint_id(lmm_get_cnst_from_var(getMaxminSystem(), action->getVariable(), 0)));
-      TRACE_surf_host_set_utilization(cpu->cname(), action->getCategory(), lmm_variable_getvalue(action->getVariable()),
-                                      action->getLastUpdate(), now - action->getLastUpdate());
+      TRACE_surf_host_set_utilization(cpu->getCname(), action->getCategory(),
+                                      lmm_variable_getvalue(action->getVariable()), action->getLastUpdate(),
+                                      now - action->getLastUpdate());
     }
 
     action->finish(Action::State::done);
@@ -71,8 +72,8 @@ void CpuModel::updateActionsStateFull(double now, double delta)
     if (TRACE_is_enabled()) {
       Cpu *cpu = static_cast<Cpu*> (lmm_constraint_id(lmm_get_cnst_from_var(getMaxminSystem(), action->getVariable(), 0)) );
 
-      TRACE_surf_host_set_utilization(cpu->cname(), action->getCategory(), lmm_variable_getvalue(action->getVariable()),
-                                      now - delta, delta);
+      TRACE_surf_host_set_utilization(cpu->getCname(), action->getCategory(),
+                                      lmm_variable_getvalue(action->getVariable()), now - delta, delta);
       TRACE_last_timestamp_to_dump = now - delta;
     }
 
@@ -123,7 +124,7 @@ int Cpu::getNbPStates()
 void Cpu::setPState(int pstate_index)
 {
   xbt_assert(pstate_index <= static_cast<int>(speedPerPstate_.size()),
-             "Invalid parameters for CPU %s (pstate %d > length of pstates %d)", cname(), pstate_index,
+             "Invalid parameters for CPU %s (pstate %d > length of pstates %d)", getCname(), pstate_index,
              static_cast<int>(speedPerPstate_.size()));
 
   double new_peak_speed = speedPerPstate_[pstate_index];
@@ -157,7 +158,7 @@ double Cpu::getAvailableSpeed()
 }
 
 void Cpu::onSpeedChange() {
-  TRACE_surf_host_set_speed(surf_get_clock(), cname(), coresAmount_ * speed_.scale * speed_.peak);
+  TRACE_surf_host_set_speed(surf_get_clock(), getCname(), coresAmount_ * speed_.scale * speed_.peak);
   s4u::Host::onSpeedChange(*host_);
 }
 
@@ -197,7 +198,7 @@ void CpuAction::updateRemainingLazy(double now)
 
     if (TRACE_is_enabled()) {
       Cpu *cpu = static_cast<Cpu*>(lmm_constraint_id(lmm_get_cnst_from_var(getModel()->getMaxminSystem(), getVariable(), 0)));
-      TRACE_surf_host_set_utilization(cpu->cname(), getCategory(), lastValue_, lastUpdate_, now - lastUpdate_);
+      TRACE_surf_host_set_utilization(cpu->getCname(), getCategory(), lastValue_, lastUpdate_, now - lastUpdate_);
     }
     XBT_CDEBUG(surf_kernel, "Updating action(%p): remains is now %f", this, remains_);
   }
index 454efa8..eea488f 100644 (file)
@@ -548,8 +548,8 @@ void CpuTi::updateActionsFinishTime(double now)
     if (min_finish > NO_MAX_DURATION)
       xbt_heap_push(static_cast<CpuTiModel*>(model())->tiActionHeap_, action, min_finish);
 
-    XBT_DEBUG("Update finish time: Cpu(%s) Action: %p, Start Time: %f Finish Time: %f Max duration %f", cname(), action,
-              action->getStartTime(), action->finishTime_, action->getMaxDuration());
+    XBT_DEBUG("Update finish time: Cpu(%s) Action: %p, Start Time: %f Finish Time: %f Max duration %f", getCname(),
+              action, action->getStartTime(), action->finishTime_, action->getMaxDuration());
   }
   /* remove from modified cpu */
   modified(false);
@@ -609,7 +609,7 @@ void CpuTi::updateRemainingAmount(double now)
 
 CpuAction *CpuTi::execution_start(double size)
 {
-  XBT_IN("(%s,%g)", cname(), size);
+  XBT_IN("(%s,%g)", getCname(), size);
   CpuTiAction* action = new CpuTiAction(static_cast<CpuTiModel*>(model()), size, isOff(), this);
 
   actionSet_->push_back(*action);
@@ -624,7 +624,7 @@ CpuAction *CpuTi::sleep(double duration)
   if (duration > 0)
     duration = MAX(duration, sg_surf_precision);
 
-  XBT_IN("(%s,%g)", cname(), duration);
+  XBT_IN("(%s,%g)", getCname(), duration);
   CpuTiAction* action = new CpuTiAction(static_cast<CpuTiModel*>(model()), 1.0, isOff(), this);
 
   action->maxDuration_ = duration;
index e7b27ac..9bd196a 100644 (file)
@@ -186,7 +186,7 @@ void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)
         NetworkCm02Link *link = static_cast<NetworkCm02Link*>(lmm_constraint_id(constraint));
         double value = lmm_variable_getvalue(action->getVariable())*
             lmm_get_cnst_weight_from_var(maxminSystem_, action->getVariable(), i);
-        TRACE_surf_link_set_utilization(link->cname(), action->getCategory(), value, action->getLastUpdate(),
+        TRACE_surf_link_set_utilization(link->getCname(), action->getCategory(), value, action->getLastUpdate(),
                                         now - action->getLastUpdate());
       }
     }
@@ -239,7 +239,7 @@ void NetworkCm02Model::updateActionsStateFull(double now, double delta)
           lmm_constraint_t constraint = lmm_get_cnst_from_var(maxminSystem_, action->getVariable(), i);
 
           NetworkCm02Link* link = static_cast<NetworkCm02Link*>(lmm_constraint_id(constraint));
-          TRACE_surf_link_set_utilization(link->cname(), action->getCategory(),
+          TRACE_surf_link_set_utilization(link->getCname(), action->getCategory(),
                                           (lmm_variable_getvalue(action->getVariable()) *
                                            lmm_get_cnst_weight_from_var(maxminSystem_, action->getVariable(), i)),
                                           action->getLastUpdate(), now - action->getLastUpdate());
@@ -417,7 +417,7 @@ void NetworkCm02Link::setBandwidth(double value)
 
   lmm_update_constraint_bound(model()->getMaxminSystem(), constraint(),
                               sg_bandwidth_factor * (bandwidth_.peak * bandwidth_.scale));
-  TRACE_surf_link_set_bandwidth(surf_get_clock(), cname(), sg_bandwidth_factor * bandwidth_.peak * bandwidth_.scale);
+  TRACE_surf_link_set_bandwidth(surf_get_clock(), getCname(), sg_bandwidth_factor * bandwidth_.peak * bandwidth_.scale);
 
   if (sg_weight_S_parameter > 0) {
     double delta = sg_weight_S_parameter / value - sg_weight_S_parameter / (bandwidth_.peak * bandwidth_.scale);
index 6e2569a..0b5a2bb 100644 (file)
@@ -166,17 +166,17 @@ namespace simgrid {
     }
     void LinkImpl::setStateTrace(tmgr_trace_t trace)
     {
-      xbt_assert(stateEvent_ == nullptr, "Cannot set a second state trace to Link %s", cname());
+      xbt_assert(stateEvent_ == nullptr, "Cannot set a second state trace to Link %s", getCname());
       stateEvent_ = future_evt_set->add_trace(trace, this);
     }
     void LinkImpl::setBandwidthTrace(tmgr_trace_t trace)
     {
-      xbt_assert(bandwidth_.event == nullptr, "Cannot set a second bandwidth trace to Link %s", cname());
+      xbt_assert(bandwidth_.event == nullptr, "Cannot set a second bandwidth trace to Link %s", getCname());
       bandwidth_.event = future_evt_set->add_trace(trace, this);
     }
     void LinkImpl::setLatencyTrace(tmgr_trace_t trace)
     {
-      xbt_assert(latency_.event == nullptr, "Cannot set a second latency trace to Link %s", cname());
+      xbt_assert(latency_.event == nullptr, "Cannot set a second latency trace to Link %s", getCname());
       latency_.event = future_evt_set->add_trace(trace, this);
     }
 
index d7acd4a..c2a7839 100644 (file)
@@ -84,12 +84,11 @@ static void routeCreation_cb(bool symmetrical, simgrid::kernel::routing::NetPoin
   if (link_list->size() == 1) {
     simgrid::surf::LinkNS3* link = static_cast<simgrid::surf::LinkNS3*>(link_list->at(0));
 
-    XBT_DEBUG("Route from '%s' to '%s' with link '%s' %s", src->getCname(), dst->getCname(), link->cname(),
+    XBT_DEBUG("Route from '%s' to '%s' with link '%s' %s", src->getCname(), dst->getCname(), link->getCname(),
               (symmetrical ? "(symmetrical)" : "(not symmetrical)"));
 
     //   XBT_DEBUG("src (%s), dst (%s), src_id = %d, dst_id = %d",src,dst, src_id, dst_id);
-    XBT_DEBUG("\tLink (%s) bw:%fbps lat:%fs", link->cname(), link->bandwidth(),
-        link->latency());
+    XBT_DEBUG("\tLink (%s) bw:%fbps lat:%fs", link->getCname(), link->bandwidth(), link->latency());
 
     // create link ns3
     NetPointNs3* host_src = src->extension<NetPointNs3>();
@@ -228,7 +227,7 @@ void NetworkNS3Model::updateActionsState(double now, double delta)
 
       action->src_->routeTo(action->dst_, &route, nullptr);
       for (auto const& link : route)
-        TRACE_surf_link_set_utilization(link->cname(), action->getCategory(), (data_delta_sent) / delta, now - delta,
+        TRACE_surf_link_set_utilization(link->getCname(), action->getCategory(), (data_delta_sent) / delta, now - delta,
                                         delta);
 
       action->lastSent_ = sgFlow->sentBytes_;
index 1c56280..f11d8df 100644 (file)
@@ -186,7 +186,7 @@ L07Action::L07Action(Model *model, int host_nb, sg_host_t *host_list,
           latency = MAX(latency, lat);
 
           for (auto const& link : route)
-            affected_links.insert(link->cname());
+            affected_links.insert(link->getCname());
         }
       }
     }
@@ -325,7 +325,7 @@ bool LinkL07::isUsed(){
 
 void CpuL07::apply_event(tmgr_trace_event_t triggered, double value)
 {
-  XBT_DEBUG("Updating cpu %s (%p) with value %g", cname(), this, value);
+  XBT_DEBUG("Updating cpu %s (%p) with value %g", getCname(), this, value);
   if (triggered == speed_.event) {
     speed_.scale = value;
     onSpeedChange();
@@ -345,7 +345,7 @@ void CpuL07::apply_event(tmgr_trace_event_t triggered, double value)
 
 void LinkL07::apply_event(tmgr_trace_event_t triggered, double value)
 {
-  XBT_DEBUG("Updating link %s (%p) with value=%f", cname(), this, value);
+  XBT_DEBUG("Updating link %s (%p) with value=%f", getCname(), this, value);
   if (triggered == bandwidth_.event) {
     setBandwidth(value);
     tmgr_trace_event_unref(&bandwidth_.event);
index d8bfca3..d61b538 100644 (file)
@@ -20,8 +20,8 @@ static void check_disk_attachment()
   for (auto const& s : *simgrid::surf::StorageImpl::storagesMap()) {
     simgrid::kernel::routing::NetPoint* host_elm = sg_netpoint_by_name_or_null(s.second->getHost().c_str());
     if (not host_elm)
-      surf_parse_error(std::string("Unable to attach storage ") + s.second->cname() + ": host " + s.second->getHost() +
-                       " does not exist.");
+      surf_parse_error(std::string("Unable to attach storage ") + s.second->getCname() + ": host " +
+                       s.second->getHost() + " does not exist.");
     else
       s.second->piface_.attached_to_ = sg_host_by_name(s.second->getHost().c_str());
   }
@@ -136,7 +136,7 @@ StorageN11Action::StorageN11Action(Model* model, double cost, bool failed, Stora
                                    e_surf_action_storage_type_t type)
     : StorageAction(model, cost, failed, lmm_variable_new(model->getMaxminSystem(), this, 1.0, -1.0, 3), storage, type)
 {
-  XBT_IN("(%s,%g", storage->cname(), cost);
+  XBT_IN("(%s,%g", storage->getCname(), cost);
 
   // Must be less than the max bandwidth for all actions
   lmm_expand(model->getMaxminSystem(), storage->constraint(), getVariable(), 1.0);
index 9000a5e..e57f843 100644 (file)
@@ -100,7 +100,7 @@ double surf_solve(double max_date)
     XBT_DEBUG("Updating models (min = %g, NOW = %g, next_event_date = %g)", time_delta, NOW, next_event_date);
 
     while ((event = future_evt_set->pop_leq(next_event_date, &value, &resource))) {
-      if (resource->isUsed() || (watched_hosts.find(resource->cname()) != watched_hosts.end())) {
+      if (resource->isUsed() || (watched_hosts.find(resource->getCname()) != watched_hosts.end())) {
         time_delta = next_event_date - NOW;
         XBT_DEBUG("This event invalidates the next_occuring_event() computation of models. Next event set to %f", time_delta);
       }
@@ -109,7 +109,7 @@ double surf_solve(double max_date)
       NOW = next_event_date;
       /* update state of the corresponding resource to the new value. Does not touch lmm.
          It will be modified if needed when updating actions */
-      XBT_DEBUG("Calling update_resource_state for resource %s", resource->cname());
+      XBT_DEBUG("Calling update_resource_state for resource %s", resource->getCname());
       resource->apply_event(event, value);
       NOW = round_start;
     }
index 76293aa..c8fae21 100644 (file)
@@ -577,7 +577,12 @@ Model* Resource::model() const
   return model_;
 }
 
-const char* Resource::cname() const
+const std::string& Resource::getName() const
+{
+  return name_;
+}
+
+const char* Resource::getCname() const
 {
   return name_.c_str();
 }
index 93cbaf9..6b9712d 100644 (file)
@@ -375,7 +375,9 @@ public:
   Model* model() const;
 
   /** @brief Get the name of the current Resource */
-  const char* cname() const;
+  const std::string& getName() const;
+  /** @brief Get the name of the current Resource */
+  const char* getCname() const;
 
   bool operator==(const Resource &other) const;
 
@@ -418,8 +420,8 @@ protected:
 namespace std {
 template <> class hash<simgrid::surf::Resource> {
 public:
-  std::size_t operator()(const simgrid::surf::Resource& r) const { return (std::size_t)xbt_str_hash(r.cname()); }
-  };
+  std::size_t operator()(const simgrid::surf::Resource& r) const { return (std::size_t)xbt_str_hash(r.getCname()); }
+};
 }
 
 #endif /* SURF_MODEL_H_ */
index 77aae6c..2297065 100644 (file)
@@ -122,7 +122,7 @@ static void dump_platform()
       if (not route.empty()) {
         std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", host1->getCname(), host2->getCname());
         for (auto const& link : route)
-          std::printf("<link_ctn id=\"%s\"/>", link->cname());
+          std::printf("<link_ctn id=\"%s\"/>", link->getCname());
         std::printf("\n  </route>\n");
       }
     }
@@ -132,7 +132,7 @@ static void dump_platform()
         std::vector<simgrid::surf::LinkImpl*> route;
         simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr);
         for (auto const& link : route)
-          std::printf("<link_ctn id=\"%s\"/>", link->cname());
+          std::printf("<link_ctn id=\"%s\"/>", link->getCname());
         std::printf("\n  </route>\n");
       }
     }
@@ -146,7 +146,7 @@ static void dump_platform()
           std::vector<simgrid::surf::LinkImpl*> route;
           simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, value2, &route, nullptr);
           for (auto const& link : route)
-            std::printf("<link_ctn id=\"%s\"/>", link->cname());
+            std::printf("<link_ctn id=\"%s\"/>", link->getCname());
           std::printf("\n  </route>\n");
         }
       }
@@ -157,7 +157,7 @@ static void dump_platform()
         simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
         simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, netcardDst, &route, nullptr);
         for (auto const& link : route)
-          std::printf("<link_ctn id=\"%s\"/>", link->cname());
+          std::printf("<link_ctn id=\"%s\"/>", link->getCname());
         std::printf("\n  </route>\n");
       }
     }