From 210da270d0339479db706757d8c836621bb138c9 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 7 Feb 2017 02:03:01 +0100 Subject: [PATCH] Add a s4u::Link class, at least --- include/simgrid/forward.h | 3 +- include/simgrid/s4u/NetZone.hpp | 2 +- include/simgrid/s4u/forward.hpp | 1 + include/simgrid/s4u/host.hpp | 1 + include/simgrid/s4u/link.hpp | 94 ++++++++++++++ src/instr/instr_interface.cpp | 2 +- src/kernel/routing/ClusterZone.cpp | 20 +-- src/kernel/routing/ClusterZone.hpp | 4 +- src/kernel/routing/DijkstraZone.cpp | 12 +- src/kernel/routing/DragonflyZone.cpp | 34 ++--- src/kernel/routing/DragonflyZone.hpp | 2 +- src/kernel/routing/FatTreeZone.cpp | 10 +- src/kernel/routing/FatTreeZone.hpp | 8 +- src/kernel/routing/FloydZone.cpp | 2 +- src/kernel/routing/FullZone.cpp | 2 +- src/kernel/routing/NetZoneImpl.cpp | 2 +- src/kernel/routing/RoutedZone.cpp | 4 +- src/kernel/routing/TorusZone.cpp | 14 +-- src/kernel/routing/VivaldiZone.cpp | 8 +- src/s4u/s4u_host.cpp | 8 ++ src/s4u/s4u_link.cpp | 153 +++++++++++++++++++++++ src/s4u/s4u_netzone.cpp | 2 +- src/surf/network_ib.cpp | 2 +- src/surf/network_interface.cpp | 59 ++------- src/surf/network_interface.hpp | 3 + src/surf/sg_platf.cpp | 19 +-- src/surf/xml/platf_private.hpp | 4 +- src/surf/xml/surfxml_sax_cb.cpp | 16 +-- teshsuite/simdag/flatifier/flatifier.cpp | 8 +- tools/cmake/DefinePackages.cmake | 2 + 30 files changed, 364 insertions(+), 137 deletions(-) create mode 100644 include/simgrid/s4u/link.hpp create mode 100644 src/s4u/s4u_link.cpp diff --git a/include/simgrid/forward.h b/include/simgrid/forward.h index 5676f8ac9e..9ebbda1d4a 100644 --- a/include/simgrid/forward.h +++ b/include/simgrid/forward.h @@ -15,6 +15,7 @@ namespace simgrid { namespace s4u { class NetZone; class Host; + class Link; class Mailbox; } namespace kernel { @@ -42,10 +43,10 @@ namespace simgrid { typedef simgrid::s4u::NetZone simgrid_NetZone; typedef simgrid::s4u::Host simgrid_Host; +typedef simgrid::s4u::Link Link; typedef simgrid::kernel::activity::ActivityImpl kernel_Activity; typedef simgrid::kernel::routing::NetPoint routing_NetPoint; typedef simgrid::surf::Cpu surf_Cpu; -typedef simgrid::surf::LinkImpl Link; typedef simgrid::surf::Resource surf_Resource; typedef simgrid::trace_mgr::trace tmgr_Trace; diff --git a/include/simgrid/s4u/NetZone.hpp b/include/simgrid/s4u/NetZone.hpp index 155a95cf56..6b738f1756 100644 --- a/include/simgrid/s4u/NetZone.hpp +++ b/include/simgrid/s4u/NetZone.hpp @@ -65,7 +65,7 @@ public: /*** Called on each newly created regular route (not on bypass routes) */ static simgrid::xbt::signal* link_list)> + std::vector* link_list)> onRouteCreation; protected: diff --git a/include/simgrid/s4u/forward.hpp b/include/simgrid/s4u/forward.hpp index 5b864a8ce9..53278828f4 100644 --- a/include/simgrid/s4u/forward.hpp +++ b/include/simgrid/s4u/forward.hpp @@ -18,6 +18,7 @@ class Activity; class Comm; class Engine; class Host; +class Link; class Mailbox; using MailboxPtr = boost::intrusive_ptr; diff --git a/include/simgrid/s4u/host.hpp b/include/simgrid/s4u/host.hpp index 23e91e25bb..5251f3d139 100644 --- a/include/simgrid/s4u/host.hpp +++ b/include/simgrid/s4u/host.hpp @@ -103,6 +103,7 @@ public: boost::unordered_map const &mountedStorages(); void routeTo(Host * dest, std::vector * links, double* latency); + void routeTo(Host * dest, std::vector * links, double* latency); private: simgrid::xbt::string name_ = "noname"; diff --git a/include/simgrid/s4u/link.hpp b/include/simgrid/s4u/link.hpp new file mode 100644 index 0000000000..504125c511 --- /dev/null +++ b/include/simgrid/s4u/link.hpp @@ -0,0 +1,94 @@ +/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + +#ifndef S4U_LINK_HPP_ +#define S4U_LINK_HPP_ + +#include + +#include + +#include "xbt/dict.h" +#include "xbt/fifo.h" + +#include "simgrid/link.h" + +/*********** + * Classes * + ***********/ + +namespace simgrid { +namespace surf { +class LinkImpl; +} +namespace s4u { +/** @brief A Link represents the network facilities between [hosts](\ref simgrid::s4u::Host) */ +class Link { + friend simgrid::surf::LinkImpl; + +private: + // Links are created from the NetZone, and destroyed by their private implementation when the simulation ends + explicit Link(surf::LinkImpl* pimpl) : pimpl_(pimpl) {} + virtual ~Link() = default; + // The private implementation, that never changes + surf::LinkImpl* const pimpl_; + +public: + /** @brief Retrieve a link from its name */ + static Link* byName(const char* name); + + /** @brief Get da name */ + const char* name(); + + /** @brief Get the bandwidth in bytes per second of current Link */ + double bandwidth(); + + /** @brief Get the latency in seconds of current Link */ + double latency(); + + /** @brief The sharing policy is a @{link e_surf_link_sharing_policy_t::EType} (0: FATPIPE, 1: SHARED, 2: FULLDUPLEX) + */ + int sharingPolicy(); + + /** @brief Check if the Link is used */ + bool isUsed(); + + void turnOn(); + void turnOff(); + + void* getData(); + void setData(void* d); + + void setStateTrace(tmgr_trace_t trace); /*< setup the trace file with states events (ON or OFF). Trace must contain + boolean values. */ + void + setBandwidthTrace(tmgr_trace_t trace); /*< setup the trace file with bandwidth events (peak speed changes due to + external load). Trace must contain percentages (value between 0 and 1). */ + void setLatencyTrace(tmgr_trace_t trace); /*< setup the trace file with latency events (peak latency changes due to + external load). Trace must contain absolute values */ +}; +} +} + +#endif /* SURF_NETWORK_INTERFACE_HPP_ */ + +/* Blueprint for the s4u/kernel split + +namespace s4u { + class Link { + public: + Link(kernel::Link* pimpl) : pimpl_(pimpl) {} + private: + kernel::Link* pimpl_; + }; +} + +namespace kernel { + class Link : public util::refcounted { + private: + s4u::Link user_; + }; +} + */ diff --git a/src/instr/instr_interface.cpp b/src/instr/instr_interface.cpp index 74ee42b4f2..2a7abcbd37 100644 --- a/src/instr/instr_interface.cpp +++ b/src/instr/instr_interface.cpp @@ -316,7 +316,7 @@ static void instr_user_srcdst_variable(double time, const char *src, const char if(!dst_elm) xbt_die("Element '%s' not found!",dst); - std::vector route; + std::vector route; simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(src_elm, dst_elm, &route, nullptr); for (auto link : route) instr_user_variable (time, link->getName(), variable, father_type, value, what, nullptr, user_link_variables); diff --git a/src/kernel/routing/ClusterZone.cpp b/src/kernel/routing/ClusterZone.cpp index c6e2679544..6cc36f1656 100644 --- a/src/kernel/routing/ClusterZone.cpp +++ b/src/kernel/routing/ClusterZone.cpp @@ -29,7 +29,7 @@ void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cba if ((src->id() == dst->id()) && hasLoopback_) { xbt_assert(!src->isRouter(), "Routing from a cluster private router to itself is meaningless"); - std::pair info = privateLinks_.at(src->id() * linkCountPerNode_); + std::pair info = privateLinks_.at(src->id() * linkCountPerNode_); route->link_list->push_back(info.first); if (lat) *lat += info.first->latency(); @@ -38,11 +38,12 @@ void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cba if (!src->isRouter()) { // No private link for the private router if (hasLimiter_) { // limiter for sender - std::pair info = privateLinks_.at(src->id() * linkCountPerNode_ + (hasLoopback_ ? 1 : 0)); + std::pair info = + privateLinks_.at(src->id() * linkCountPerNode_ + (hasLoopback_ ? 1 : 0)); route->link_list->push_back(info.first); } - std::pair info = + std::pair info = privateLinks_.at(src->id() * linkCountPerNode_ + (hasLoopback_ ? 1 : 0) + (hasLimiter_ ? 1 : 0)); if (info.first) { // link up route->link_list->push_back(info.first); @@ -59,7 +60,8 @@ void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cba if (!dst->isRouter()) { // No specific link for router - std::pair info = privateLinks_.at(dst->id() * linkCountPerNode_ + hasLoopback_ + hasLimiter_); + std::pair info = + privateLinks_.at(dst->id() * linkCountPerNode_ + hasLoopback_ + hasLimiter_); if (info.second) { // link down route->link_list->push_back(info.second); if (lat) @@ -90,7 +92,7 @@ void ClusterZone::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges if (!src->isRouter()) { xbt_node_t previous = new_xbt_graph_node(graph, src->cname(), nodes); - std::pair info = privateLinks_.at(src->id()); + std::pair info = privateLinks_.at(src->id()); if (info.first) { // link up xbt_node_t current = new_xbt_graph_node(graph, info.first->getName(), nodes); @@ -129,16 +131,16 @@ void ClusterZone::create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id link.policy = cluster->sharing_policy; sg_platf_new_link(&link); - Link *linkUp, *linkDown; + surf::LinkImpl *linkUp, *linkDown; if (link.policy == SURF_LINK_FULLDUPLEX) { char* tmp_link = bprintf("%s_UP", link_id); - linkUp = Link::byName(tmp_link); + linkUp = surf::LinkImpl::byName(tmp_link); xbt_free(tmp_link); tmp_link = bprintf("%s_DOWN", link_id); - linkDown = Link::byName(tmp_link); + linkDown = surf::LinkImpl::byName(tmp_link); xbt_free(tmp_link); } else { - linkUp = Link::byName(link_id); + linkUp = surf::LinkImpl::byName(link_id); linkDown = linkUp; } privateLinks_.insert({position, {linkUp, linkDown}}); diff --git a/src/kernel/routing/ClusterZone.hpp b/src/kernel/routing/ClusterZone.hpp index 0137d371d1..497096cbd6 100644 --- a/src/kernel/routing/ClusterZone.hpp +++ b/src/kernel/routing/ClusterZone.hpp @@ -77,9 +77,9 @@ public: /* We use a map instead of a std::vector here because that's a sparse vector. Some values may not exist */ /* The pair is {linkUp, linkDown} */ - std::unordered_map> privateLinks_; + std::unordered_map> privateLinks_; - Link* backbone_ = nullptr; + surf::LinkImpl* backbone_ = nullptr; void* loopback_ = nullptr; NetPoint* router_ = nullptr; bool hasLimiter_ = false; diff --git a/src/kernel/routing/DijkstraZone.cpp b/src/kernel/routing/DijkstraZone.cpp index 08fd4430fa..b376601923 100644 --- a/src/kernel/routing/DijkstraZone.cpp +++ b/src/kernel/routing/DijkstraZone.cpp @@ -68,7 +68,7 @@ void DijkstraZone::seal() if (!found) { sg_platf_route_cbarg_t e_route = xbt_new0(s_sg_platf_route_cbarg_t, 1); - e_route->link_list = new std::vector(); + e_route->link_list = new std::vector(); e_route->link_list->push_back(surf_network_model->loopback_); xbt_graph_new_edge(routeGraph_, node, node, e_route); } @@ -173,7 +173,7 @@ void DijkstraZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cb for (auto link : *e_route->link_list) { route->link_list->insert(route->link_list->begin(), link); if (lat) - *lat += static_cast(link)->latency(); + *lat += static_cast(link)->latency(); } } @@ -261,11 +261,11 @@ void DijkstraZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cb if (hierarchy_ == RoutingMode::recursive && v != dst_node_id && strcmp(gw_dst->name().c_str(), prev_gw_src->name().c_str())) { - std::vector* e_route_as_to_as = new std::vector(); + std::vector e_route_as_to_as; - getGlobalRoute(gw_dst_net_elm, prev_gw_src_net_elm, e_route_as_to_as, nullptr); + getGlobalRoute(gw_dst_net_elm, prev_gw_src_net_elm, &e_route_as_to_as, nullptr); auto pos = route->link_list->begin(); - for (auto link : *e_route_as_to_as) { + for (auto link : e_route_as_to_as) { route->link_list->insert(pos, link); if (lat) *lat += link->latency(); @@ -276,7 +276,7 @@ void DijkstraZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cb for (auto link : *e_route->link_list) { route->link_list->insert(route->link_list->begin(), link); if (lat) - *lat += static_cast(link)->latency(); + *lat += static_cast(link)->latency(); } size++; } diff --git a/src/kernel/routing/DragonflyZone.cpp b/src/kernel/routing/DragonflyZone.cpp index 0de5c30295..1479f982c2 100644 --- a/src/kernel/routing/DragonflyZone.cpp +++ b/src/kernel/routing/DragonflyZone.cpp @@ -133,7 +133,7 @@ void DragonflyZone::generateRouters() } } -void DragonflyZone::createLink(char* id, int numlinks, Link** linkup, Link** linkdown) +void DragonflyZone::createLink(char* id, int numlinks, surf::LinkImpl** linkup, surf::LinkImpl** linkdown) { *linkup = nullptr; *linkdown = nullptr; @@ -145,17 +145,17 @@ void DragonflyZone::createLink(char* id, int numlinks, Link** linkup, Link** lin linkTemplate.id = id; sg_platf_new_link(&linkTemplate); XBT_DEBUG("Generating link %s", id); - Link* link; + surf::LinkImpl* link; std::string tmpID; if (this->cluster_->sharing_policy == SURF_LINK_FULLDUPLEX) { tmpID = std::string(linkTemplate.id) + "_UP"; - link = Link::byName(tmpID.c_str()); + link = surf::LinkImpl::byName(tmpID.c_str()); *linkup = link; // check link? tmpID = std::string(linkTemplate.id) + "_DOWN"; - link = Link::byName(tmpID.c_str()); + link = surf::LinkImpl::byName(tmpID.c_str()); *linkdown = link; // check link ? } else { - link = Link::byName(linkTemplate.id); + link = surf::LinkImpl::byName(linkTemplate.id); *linkup = link; *linkdown = link; } @@ -168,8 +168,8 @@ void DragonflyZone::generateLinks() static int uniqueId = 0; char* id = nullptr; - Link* linkup; - Link* linkdown; + surf::LinkImpl* linkup; + surf::LinkImpl* linkdown; unsigned int numRouters = this->numGroups_ * this->numChassisPerGroup_ * this->numBladesPerChassis_; @@ -179,10 +179,12 @@ void DragonflyZone::generateLinks() // Links from routers to their local nodes. for (unsigned int i = 0; i < numRouters; i++) { // allocate structures - this->routers_[i]->myNodes_ = - static_cast(xbt_malloc0(numLinksperLink_ * this->numNodesPerBlade_ * sizeof(Link*))); - this->routers_[i]->greenLinks_ = static_cast(xbt_malloc0(this->numBladesPerChassis_ * sizeof(Link*))); - this->routers_[i]->blackLinks_ = static_cast(xbt_malloc0(this->numChassisPerGroup_ * sizeof(Link*))); + this->routers_[i]->myNodes_ = static_cast( + xbt_malloc0(numLinksperLink_ * this->numNodesPerBlade_ * sizeof(surf::LinkImpl*))); + this->routers_[i]->greenLinks_ = + static_cast(xbt_malloc0(this->numBladesPerChassis_ * sizeof(surf::LinkImpl*))); + this->routers_[i]->blackLinks_ = + static_cast(xbt_malloc0(this->numChassisPerGroup_ * sizeof(surf::LinkImpl*))); for (unsigned int j = 0; j < numLinksperLink_ * this->numNodesPerBlade_; j += numLinksperLink_) { id = bprintf("local_link_from_router_%d_to_node_%d_%d", i, j / numLinksperLink_, uniqueId); @@ -234,8 +236,8 @@ void DragonflyZone::generateLinks() for (unsigned int j = i + 1; j < this->numGroups_; j++) { unsigned int routernumi = i * numBladesPerChassis_ * numChassisPerGroup_ + j; unsigned int routernumj = j * numBladesPerChassis_ * numChassisPerGroup_ + i; - this->routers_[routernumi]->blueLinks_ = static_cast(xbt_malloc0(sizeof(Link*))); - this->routers_[routernumj]->blueLinks_ = static_cast(xbt_malloc0(sizeof(Link*))); + this->routers_[routernumi]->blueLinks_ = static_cast(xbt_malloc0(sizeof(surf::LinkImpl*))); + this->routers_[routernumj]->blueLinks_ = static_cast(xbt_malloc0(sizeof(surf::LinkImpl*))); id = bprintf("blue_link_between_group_%d_and_%d_routers_%d_and_%d_%d", i, j, routernumi, routernumj, uniqueId); this->createLink(id, this->numLinksBlue_, &linkup, &linkdown); this->routers_[routernumi]->blueLinks_[0] = linkup; @@ -257,7 +259,7 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_c dst->id()); if ((src->id() == dst->id()) && hasLoopback_) { - std::pair info = privateLinks_.at(src->id() * linkCountPerNode_); + std::pair info = privateLinks_.at(src->id() * linkCountPerNode_); route->link_list->push_back(info.first); if (latency) @@ -283,7 +285,7 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_c *latency += myRouter->myNodes_[myCoords[3] * numLinksperLink_]->latency(); if (hasLimiter_) { // limiter for sender - std::pair info = privateLinks_.at(src->id() * linkCountPerNode_ + hasLoopback_); + std::pair info = privateLinks_.at(src->id() * linkCountPerNode_ + hasLoopback_); route->link_list->push_back(info.first); } @@ -335,7 +337,7 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_c } if (hasLimiter_) { // limiter for receiver - std::pair info = privateLinks_.at(dst->id() * linkCountPerNode_ + hasLoopback_); + std::pair info = privateLinks_.at(dst->id() * linkCountPerNode_ + hasLoopback_); route->link_list->push_back(info.first); } diff --git a/src/kernel/routing/DragonflyZone.hpp b/src/kernel/routing/DragonflyZone.hpp index 01b07dc8f5..d9a6016e5c 100644 --- a/src/kernel/routing/DragonflyZone.hpp +++ b/src/kernel/routing/DragonflyZone.hpp @@ -68,7 +68,7 @@ public: void seal() override; void generateRouters(); void generateLinks(); - void createLink(char* id, int numlinks, Link** linkup, Link** linkdown); + void createLink(char* id, int numlinks, surf::LinkImpl** linkup, surf::LinkImpl** linkdown); unsigned int* rankId_to_coords(int rankId); private: diff --git a/src/kernel/routing/FatTreeZone.cpp b/src/kernel/routing/FatTreeZone.cpp index 9475591fff..4a1fa4c6ce 100644 --- a/src/kernel/routing/FatTreeZone.cpp +++ b/src/kernel/routing/FatTreeZone.cpp @@ -437,7 +437,7 @@ FatTreeNode::FatTreeNode(sg_platf_cluster_cbarg_t cluster, int id, int level, in linkTemplate.policy = SURF_LINK_SHARED; linkTemplate.id = bprintf("limiter_%d", id); sg_platf_new_link(&linkTemplate); - this->limiterLink = Link::byName(linkTemplate.id); + this->limiterLink = surf::LinkImpl::byName(linkTemplate.id); free(const_cast(linkTemplate.id)); } if (cluster->loopback_bw || cluster->loopback_lat) { @@ -447,7 +447,7 @@ FatTreeNode::FatTreeNode(sg_platf_cluster_cbarg_t cluster, int id, int level, in linkTemplate.policy = SURF_LINK_FATPIPE; linkTemplate.id = bprintf("loopback_%d", id); sg_platf_new_link(&linkTemplate); - this->loopback = Link::byName(linkTemplate.id); + this->loopback = surf::LinkImpl::byName(linkTemplate.id); free(const_cast(linkTemplate.id)); } } @@ -466,11 +466,11 @@ FatTreeLink::FatTreeLink(sg_platf_cluster_cbarg_t cluster, FatTreeNode* downNode if (cluster->sharing_policy == SURF_LINK_FULLDUPLEX) { std::string tmpID = std::string(linkTemplate.id) + "_UP"; - this->upLink = Link::byName(tmpID.c_str()); // check link? + this->upLink = surf::LinkImpl::byName(tmpID.c_str()); // check link? tmpID = std::string(linkTemplate.id) + "_DOWN"; - this->downLink = Link::byName(tmpID.c_str()); // check link ? + this->downLink = surf::LinkImpl::byName(tmpID.c_str()); // check link ? } else { - this->upLink = Link::byName(linkTemplate.id); + this->upLink = surf::LinkImpl::byName(linkTemplate.id); this->downLink = this->upLink; } free(const_cast(linkTemplate.id)); diff --git a/src/kernel/routing/FatTreeZone.hpp b/src/kernel/routing/FatTreeZone.hpp index 8d8538752f..805032913a 100644 --- a/src/kernel/routing/FatTreeZone.hpp +++ b/src/kernel/routing/FatTreeZone.hpp @@ -46,11 +46,11 @@ public: /** Virtual link standing for the node global capacity. */ - Link* limiterLink; + surf::LinkImpl* limiterLink; /** If present, communications from this node to this node will pass through it * instead of passing by an upper level switch. */ - Link* loopback; + surf::LinkImpl* loopback; FatTreeNode(sg_platf_cluster_cbarg_t cluster, int id, int level, int position); }; @@ -63,9 +63,9 @@ class FatTreeLink { public: FatTreeLink(sg_platf_cluster_cbarg_t cluster, FatTreeNode* source, FatTreeNode* destination); /** Link going up in the tree */ - Link* upLink; + surf::LinkImpl* upLink; /** Link going down in the tree */ - Link* downLink; + surf::LinkImpl* downLink; /** Upper end of the link */ FatTreeNode* upNode; /** Lower end of the link */ diff --git a/src/kernel/routing/FloydZone.cpp b/src/kernel/routing/FloydZone.cpp index e88464b49b..000db3f979 100644 --- a/src/kernel/routing/FloydZone.cpp +++ b/src/kernel/routing/FloydZone.cpp @@ -181,7 +181,7 @@ void FloydZone::seal() e_route = xbt_new0(s_sg_platf_route_cbarg_t, 1); e_route->gw_src = nullptr; e_route->gw_dst = nullptr; - e_route->link_list = new std::vector(); + e_route->link_list = new std::vector(); e_route->link_list->push_back(surf_network_model->loopback_); TO_FLOYD_LINK(i, i) = e_route; TO_FLOYD_PRED(i, i) = i; diff --git a/src/kernel/routing/FullZone.cpp b/src/kernel/routing/FullZone.cpp index 71723c7292..8187c3da68 100644 --- a/src/kernel/routing/FullZone.cpp +++ b/src/kernel/routing/FullZone.cpp @@ -34,7 +34,7 @@ void FullZone::seal() e_route = xbt_new0(s_sg_platf_route_cbarg_t, 1); e_route->gw_src = nullptr; e_route->gw_dst = nullptr; - e_route->link_list = new std::vector(); + e_route->link_list = new std::vector(); e_route->link_list->push_back(surf_network_model->loopback_); TO_ROUTE_FULL(i, i) = e_route; } diff --git a/src/kernel/routing/NetZoneImpl.cpp b/src/kernel/routing/NetZoneImpl.cpp index a5175ccff9..90c4828c3a 100644 --- a/src/kernel/routing/NetZoneImpl.cpp +++ b/src/kernel/routing/NetZoneImpl.cpp @@ -23,7 +23,7 @@ public: explicit BypassRoute(NetPoint* gwSrc, NetPoint* gwDst) : gw_src(gwSrc), gw_dst(gwDst) {} const NetPoint* gw_src; const NetPoint* gw_dst; - std::vector links; + std::vector links; }; NetZoneImpl::NetZoneImpl(NetZone* father, const char* name) : NetZone(father, name) diff --git a/src/kernel/routing/RoutedZone.cpp b/src/kernel/routing/RoutedZone.cpp index deaadbe0ef..61e80c49ce 100644 --- a/src/kernel/routing/RoutedZone.cpp +++ b/src/kernel/routing/RoutedZone.cpp @@ -82,7 +82,7 @@ void RoutedZone::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) continue; sg_platf_route_cbarg_t route = xbt_new0(s_sg_platf_route_cbarg_t, 1); - route->link_list = new std::vector(); + route->link_list = new std::vector(); getLocalRoute(my_src, my_dst, route, nullptr); @@ -134,7 +134,7 @@ sg_platf_route_cbarg_t RoutedZone::newExtendedRoute(RoutingMode hierarchy, sg_pl sg_platf_route_cbarg_t result; result = xbt_new0(s_sg_platf_route_cbarg_t, 1); - result->link_list = new std::vector(); + result->link_list = new std::vector(); xbt_assert(hierarchy == RoutingMode::base || hierarchy == RoutingMode::recursive, "The hierarchy of this netzone is neither BASIC nor RECURSIVE, I'm lost here."); diff --git a/src/kernel/routing/TorusZone.cpp b/src/kernel/routing/TorusZone.cpp index a7fc92c8a7..b2c1896b69 100644 --- a/src/kernel/routing/TorusZone.cpp +++ b/src/kernel/routing/TorusZone.cpp @@ -60,17 +60,17 @@ void TorusZone::create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, link.latency = cluster->lat; link.policy = cluster->sharing_policy; sg_platf_new_link(&link); - Link* linkUp; - Link* linkDown; + surf::LinkImpl* linkUp; + surf::LinkImpl* linkDown; if (link.policy == SURF_LINK_FULLDUPLEX) { char* tmp_link = bprintf("%s_UP", link_id); - linkUp = Link::byName(tmp_link); + linkUp = surf::LinkImpl::byName(tmp_link); free(tmp_link); tmp_link = bprintf("%s_DOWN", link_id); - linkDown = Link::byName(tmp_link); + linkDown = surf::LinkImpl::byName(tmp_link); free(tmp_link); } else { - linkUp = Link::byName(link_id); + linkUp = surf::LinkImpl::byName(link_id); linkDown = linkUp; } /* @@ -119,7 +119,7 @@ void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg return; if (src->id() == dst->id() && hasLoopback_) { - std::pair info = privateLinks_.at(src->id() * linkCountPerNode_); + std::pair info = privateLinks_.at(src->id() * linkCountPerNode_); route->link_list->push_back(info.first); if (lat) @@ -199,7 +199,7 @@ void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg dim_product *= cur_dim; } - std::pair info; + std::pair info; if (hasLimiter_) { // limiter for sender info = privateLinks_.at(nodeOffset + hasLoopback_); diff --git a/src/kernel/routing/VivaldiZone.cpp b/src/kernel/routing/VivaldiZone.cpp index 85b34ac76a..78e500c10a 100644 --- a/src/kernel/routing/VivaldiZone.cpp +++ b/src/kernel/routing/VivaldiZone.cpp @@ -66,8 +66,8 @@ void VivaldiZone::setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, c std::string link_up = "link_" + netpoint->name() + "_UP"; std::string link_down = "link_" + netpoint->name() + "_DOWN"; - Link* linkUp = surf_network_model->createLink(link_up.c_str(), bw_out, 0, SURF_LINK_SHARED); - Link* linkDown = surf_network_model->createLink(link_down.c_str(), bw_in, 0, SURF_LINK_SHARED); + surf::LinkImpl* linkUp = surf_network_model->createLink(link_up.c_str(), bw_out, 0, SURF_LINK_SHARED); + surf::LinkImpl* linkDown = surf_network_model->createLink(link_down.c_str(), bw_in, 0, SURF_LINK_SHARED); privateLinks_.insert({netpoint->id(), {linkUp, linkDown}}); } @@ -84,7 +84,7 @@ void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cba /* Retrieve the private links */ if (privateLinks_.find(src->id()) != privateLinks_.end()) { - std::pair info = privateLinks_.at(src->id()); + std::pair info = privateLinks_.at(src->id()); if (info.first) { route->link_list->push_back(info.first); if (lat) @@ -92,7 +92,7 @@ void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cba } } if (privateLinks_.find(dst->id()) != privateLinks_.end()) { - std::pair info = privateLinks_.at(dst->id()); + std::pair info = privateLinks_.at(dst->id()); if (info.second) { route->link_list->push_back(info.second); if (lat) diff --git a/src/s4u/s4u_host.cpp b/src/s4u/s4u_host.cpp index e481e2d480..10eec1db8d 100644 --- a/src/s4u/s4u_host.cpp +++ b/src/s4u/s4u_host.cpp @@ -141,6 +141,14 @@ int Host::pstatesCount() const { * by calling each "get_route" function in each routing component. */ void Host::routeTo(Host* dest, std::vector* links, double* latency) +{ + std::vector linkImpls; + this->routeTo(dest, &linkImpls, latency); + for (surf::LinkImpl* l : linkImpls) + links->push_back(&l->piface_); +} +/** @brief Just like Host::routeTo, but filling an array of link implementations */ +void Host::routeTo(Host* dest, std::vector* links, double* latency) { simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(pimpl_netpoint, dest->pimpl_netpoint, links, latency); if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) { diff --git a/src/s4u/s4u_link.cpp b/src/s4u/s4u_link.cpp new file mode 100644 index 0000000000..c7fb4034f4 --- /dev/null +++ b/src/s4u/s4u_link.cpp @@ -0,0 +1,153 @@ +/* Copyright (c) 2013-2015. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + +#include + +#include "simgrid/s4u/link.hpp" +#include "simgrid/sg_config.h" +#include "simgrid/simix.hpp" +#include "src/surf/network_interface.hpp" +#include "xbt/log.h" + +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_link, s4u, "Logging specific to the S4U links"); + +/********* + * C API * + *********/ + +extern "C" { + +const char* sg_link_name(Link* link) +{ + return link->name(); +} +Link* sg_link_by_name(const char* name) +{ + return Link::byName(name); +} + +int sg_link_is_shared(Link* link) +{ + return link->sharingPolicy(); +} +double sg_link_bandwidth(Link* link) +{ + return link->bandwidth(); +} +double sg_link_latency(Link* link) +{ + return link->latency(); +} +void* sg_link_data(Link* link) +{ + return link->getData(); +} +void sg_link_data_set(Link* link, void* data) +{ + link->setData(data); +} +int sg_link_count() +{ + return simgrid::surf::LinkImpl::linksCount(); +} +Link** sg_link_list() +{ + simgrid::surf::LinkImpl** list = simgrid::surf::LinkImpl::linksList(); + Link** res = (Link**)list; // Use the same memory area + + int size = sg_link_count(); + for (int i = 0; i < size; i++) + res[i] = &(list[i]->piface_); // Convert each entry into its interface + + return res; +} +void sg_link_exit() +{ + simgrid::surf::LinkImpl::linksExit(); +} +} + +/*********** + * C++ API * + ***********/ + +namespace simgrid { +namespace s4u { +Link* Link::byName(const char* name) +{ + surf::LinkImpl* res = surf::LinkImpl::byName(name); + if (res == nullptr) + return nullptr; + return &res->piface_; +} +const char* Link::name() +{ + return pimpl_->getName(); +} +bool Link::isUsed() +{ + return pimpl_->isUsed(); +} + +double Link::latency() +{ + return pimpl_->latency(); +} + +double Link::bandwidth() +{ + return pimpl_->bandwidth(); +} + +int Link::sharingPolicy() +{ + return pimpl_->sharingPolicy(); +} + +void Link::turnOn() +{ + simgrid::simix::kernelImmediate([&]() { + this->pimpl_->turnOn(); + }); +} +void Link::turnOff() +{ + simgrid::simix::kernelImmediate([&]() { + this->pimpl_->turnOff(); + }); +} + +void* Link::getData() +{ + return pimpl_->getData(); +} +void Link::setData(void* d) +{ + simgrid::simix::kernelImmediate([&]() { + this->pimpl_->setData(d); + }); +} + +void Link::setStateTrace(tmgr_trace_t trace) +{ + simgrid::simix::kernelImmediate([&]() { + this->pimpl_->setStateTrace(trace); + }); +} +void Link::setBandwidthTrace(tmgr_trace_t trace) +{ + simgrid::simix::kernelImmediate([&]() { + this->pimpl_->setBandwidthTrace(trace); + }); +} +void Link::setLatencyTrace(tmgr_trace_t trace) +{ + simgrid::simix::kernelImmediate([&]() { + this->pimpl_->setLatencyTrace(trace); + }); +} +} +} diff --git a/src/s4u/s4u_netzone.cpp b/src/s4u/s4u_netzone.cpp index 1ab825e048..ea2f37c2c7 100644 --- a/src/s4u/s4u_netzone.cpp +++ b/src/s4u/s4u_netzone.cpp @@ -18,7 +18,7 @@ namespace s4u { simgrid::xbt::signal* link_list)> + std::vector* link_list)> NetZone::onRouteCreation; NetZone::NetZone(NetZone* father, const char* name) : father_(father), name_(xbt_strdup(name)) diff --git a/src/surf/network_ib.cpp b/src/surf/network_ib.cpp index d00e88cda4..64e9649b78 100644 --- a/src/surf/network_ib.cpp +++ b/src/surf/network_ib.cpp @@ -87,7 +87,7 @@ void surf_network_model_init_IB() surf_network_model = new simgrid::surf::NetworkIBModel(); all_existing_models->push_back(surf_network_model); networkActionStateChangedCallbacks.connect(IB_action_state_changed_callback); - Link::onCommunicate.connect(IB_action_init_callback); + simgrid::surf::LinkImpl::onCommunicate.connect(IB_action_init_callback); simgrid::s4u::Host::onCreation.connect(IB_create_host_callback); xbt_cfg_setdefault_double("network/weight-S", 8775); diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index efaeacc3fe..7584401d45 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -14,64 +14,22 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network, surf, "Logging specific to the SURF network module"); -/********* - * C API * - *********/ - -extern "C" { - - const char* sg_link_name(Link *link) { - return link->getName(); - } - Link * sg_link_by_name(const char* name) { - return Link::byName(name); - } - - int sg_link_is_shared(Link *link){ - return link->sharingPolicy(); - } - double sg_link_bandwidth(Link *link){ - return link->bandwidth(); - } - double sg_link_latency(Link *link){ - return link->latency(); - } - void* sg_link_data(Link *link) { - return link->getData(); - } - void sg_link_data_set(Link *link,void *data) { - link->setData(data); - } - int sg_link_count() { - return Link::linksCount(); - } - Link** sg_link_list() { - return Link::linksList(); - } - void sg_link_exit() { - Link::linksExit(); - } - -} - -/***************** - * List of links * - *****************/ - namespace simgrid { namespace surf { + /* List of links */ std::unordered_map* LinkImpl::links = new std::unordered_map(); + LinkImpl* LinkImpl::byName(const char* name) { if (links->find(name) == links->end()) return nullptr; return links->at(name); - } - /** @brief Returns the amount of links in the platform */ - int LinkImpl::linksCount() - { - return links->size(); + } + /** @brief Returns the amount of links in the platform */ + int LinkImpl::linksCount() + { + return links->size(); } /** @brief Returns a list of all existing links */ LinkImpl** LinkImpl::linksList() @@ -152,8 +110,9 @@ namespace simgrid { ************/ LinkImpl::LinkImpl(simgrid::surf::NetworkModel* model, const char* name, lmm_constraint_t constraint) - : Resource(model, name, constraint) + : Resource(model, name, constraint), piface_(Link(this)) { + if (strcmp(name,"__loopback__")) xbt_assert(!LinkImpl::byName(name), "Link '%s' declared several times in the platform.", name); diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index 1c86cfd1e4..f0838b6593 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -17,6 +17,7 @@ #include "src/surf/PropertyHolder.hpp" #include "simgrid/link.h" +#include "simgrid/s4u/link.hpp" /*********** * Classes * @@ -139,6 +140,8 @@ namespace simgrid { bool currentlyDestroying_ = false; public: + /** @brief Public interface */ + s4u::Link piface_; /** @brief Callback signal fired when a new Link is created */ static simgrid::xbt::signal onCreation; diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 5e00d5e5d4..ac3ce92a35 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -125,7 +125,8 @@ void sg_platf_new_link(sg_platf_link_cbarg_t link){ names.push_back(xbt_strdup(link->id)); } for (auto link_name : names) { - Link* l = surf_network_model->createLink(link_name, link->bandwidth, link->latency, link->policy); + simgrid::surf::LinkImpl* l = + surf_network_model->createLink(link_name, link->bandwidth, link->latency, link->policy); if (link->properties) { xbt_dict_cursor_t cursor = nullptr; @@ -223,8 +224,8 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster) // other columns are to store one or more link for the node //add a loopback link - Link* linkUp = nullptr; - Link* linkDown = nullptr; + simgrid::surf::LinkImpl* linkUp = nullptr; + simgrid::surf::LinkImpl* linkDown = nullptr; if(cluster->loopback_bw!=0 || cluster->loopback_lat!=0){ char *tmp_link = bprintf("%s_loopback", link_id); XBT_DEBUG("", tmp_link, cluster->loopback_bw); @@ -235,8 +236,8 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster) link.latency = cluster->loopback_lat; link.policy = SURF_LINK_FATPIPE; sg_platf_new_link(&link); - linkUp = Link::byName(tmp_link); - linkDown = Link::byName(tmp_link); + linkUp = simgrid::surf::LinkImpl::byName(tmp_link); + linkDown = simgrid::surf::LinkImpl::byName(tmp_link); free(tmp_link); auto as_cluster = static_cast(current_as); @@ -256,7 +257,7 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster) link.latency = 0; link.policy = SURF_LINK_SHARED; sg_platf_new_link(&link); - linkUp = linkDown = Link::byName(tmp_link); + linkUp = linkDown = simgrid::surf::LinkImpl::byName(tmp_link); free(tmp_link); current_as->privateLinks_.insert( {rankId * current_as->linkCountPerNode_ + current_as->hasLoopback_, {linkUp, linkDown}}); @@ -298,7 +299,7 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster) XBT_DEBUG("", link.id, cluster->bb_bw, cluster->bb_lat); sg_platf_new_link(&link); - routing_cluster_add_backbone(Link::byName(link.id)); + routing_cluster_add_backbone(simgrid::surf::LinkImpl::byName(link.id)); free((char*)link.id); } @@ -724,8 +725,8 @@ void sg_platf_new_hostlink(sg_platf_host_link_cbarg_t hostlink) xbt_assert(dynamic_cast(current_routing), "Only hosts from Cluster and Vivaldi ASes can get an host_link."); - simgrid::surf::LinkImpl* linkUp = Link::byName(hostlink->link_up); - simgrid::surf::LinkImpl* linkDown = Link::byName(hostlink->link_down); + simgrid::surf::LinkImpl* linkUp = simgrid::surf::LinkImpl::byName(hostlink->link_up); + simgrid::surf::LinkImpl* linkDown = simgrid::surf::LinkImpl::byName(hostlink->link_down); xbt_assert(linkUp, "Link '%s' not found!", hostlink->link_up); xbt_assert(linkDown, "Link '%s' not found!", hostlink->link_down); diff --git a/src/surf/xml/platf_private.hpp b/src/surf/xml/platf_private.hpp index 379c8f4360..6929d3569c 100644 --- a/src/surf/xml/platf_private.hpp +++ b/src/surf/xml/platf_private.hpp @@ -85,7 +85,7 @@ typedef struct s_sg_platf_route_cbarg { sg_netpoint_t dst; sg_netpoint_t gw_src; sg_netpoint_t gw_dst; - std::vector *link_list; + std::vector* link_list; } s_sg_platf_route_cbarg_t; typedef struct s_sg_platf_cluster_cbarg *sg_platf_cluster_cbarg_t; @@ -188,7 +188,7 @@ typedef struct s_sg_platf_AS_cbarg { #define SG_PLATF_AS_INITIALIZER {nullptr,0} /********** Routing **********/ -void routing_cluster_add_backbone(Link* bb); +void routing_cluster_add_backbone(simgrid::surf::LinkImpl* bb); /*** END of the parsing cruft ***/ XBT_PUBLIC(void) sg_platf_begin(); // Start a new platform diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index 420cabf1b6..684780a372 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -689,15 +689,15 @@ void STag_surfxml_link___ctn(){ switch (A_surfxml_link___ctn_direction) { case AU_surfxml_link___ctn_direction: case A_surfxml_link___ctn_direction_NONE: - link = Link::byName(A_surfxml_link___ctn_id); + link = simgrid::surf::LinkImpl::byName(A_surfxml_link___ctn_id); break; case A_surfxml_link___ctn_direction_UP: link_name = bprintf("%s_UP", A_surfxml_link___ctn_id); - link = Link::byName(link_name); + link = simgrid::surf::LinkImpl::byName(link_name); break; case A_surfxml_link___ctn_direction_DOWN: link_name = bprintf("%s_DOWN", A_surfxml_link___ctn_id); - link = Link::byName(link_name); + link = simgrid::surf::LinkImpl::byName(link_name); break; } xbt_free(link_name); // no-op if it's already nullptr @@ -720,7 +720,7 @@ void ETag_surfxml_backbone(){ link.policy = SURF_LINK_SHARED; sg_platf_new_link(&link); - routing_cluster_add_backbone(sg_link_by_name(A_surfxml_backbone_id)); + routing_cluster_add_backbone(simgrid::surf::LinkImpl::byName(A_surfxml_backbone_id)); } void STag_surfxml_route(){ @@ -768,7 +768,7 @@ void ETag_surfxml_route(){ route.dst = sg_netpoint_by_name_or_null(A_surfxml_route_dst); // tested to not be nullptr in start tag route.gw_src = nullptr; route.gw_dst = nullptr; - route.link_list = new std::vector(); + route.link_list = new std::vector(); route.symmetrical = (A_surfxml_route_symmetrical == A_surfxml_route_symmetrical_YES); for (auto link: parsed_link_list) @@ -789,7 +789,7 @@ void ETag_surfxml_ASroute(){ ASroute.gw_src = sg_netpoint_by_name_or_null(A_surfxml_ASroute_gw___src); // tested to not be nullptr in start tag ASroute.gw_dst = sg_netpoint_by_name_or_null(A_surfxml_ASroute_gw___dst); // tested to not be nullptr in start tag - ASroute.link_list = new std::vector(); + ASroute.link_list = new std::vector(); for (auto link: parsed_link_list) ASroute.link_list->push_back(link); @@ -818,7 +818,7 @@ void ETag_surfxml_bypassRoute(){ route.gw_src = nullptr; route.gw_dst = nullptr; route.symmetrical = false; - route.link_list = new std::vector(); + route.link_list = new std::vector(); for (auto link: parsed_link_list) route.link_list->push_back(link); @@ -833,7 +833,7 @@ void ETag_surfxml_bypassASroute(){ ASroute.src = sg_netpoint_by_name_or_null(A_surfxml_bypassASroute_src); ASroute.dst = sg_netpoint_by_name_or_null(A_surfxml_bypassASroute_dst); - ASroute.link_list = new std::vector(); + ASroute.link_list = new std::vector(); for (auto link: parsed_link_list) ASroute.link_list->push_back(link); parsed_link_list.clear(); diff --git a/teshsuite/simdag/flatifier/flatifier.cpp b/teshsuite/simdag/flatifier/flatifier.cpp index ffa3c588fe..4471349d40 100644 --- a/teshsuite/simdag/flatifier/flatifier.cpp +++ b/teshsuite/simdag/flatifier/flatifier.cpp @@ -153,7 +153,7 @@ int main(int argc, char **argv) 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 route; + std::vector route; simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint; simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr); if (!route.empty()) { @@ -166,7 +166,7 @@ int main(int argc, char **argv) for (auto netcardDst : netcardList) { // to router if (netcardDst->isRouter()) { std::printf(" \n ", host1->cname(), netcardDst->cname()); - std::vector route; + std::vector route; simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr); for (auto link : route) std::printf("",link->getName()); @@ -180,7 +180,7 @@ int main(int argc, char **argv) for (auto value2 : netcardList) { // to router if (value2->isRouter()) { std::printf(" \n ", value1->cname(), value2->cname()); - std::vector route; + std::vector route; simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, value2, &route, nullptr); for (auto link : route) std::printf("",link->getName()); @@ -190,7 +190,7 @@ int main(int argc, char **argv) for (unsigned int it_dst = 0; it_dst < totalHosts; it_dst++) { // Routes to host simgrid::s4u::Host* host2 = hosts[it_dst]; std::printf(" \n ", value1->cname(), host2->cname()); - std::vector route; + std::vector route; simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint; simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, netcardDst, &route, nullptr); for (auto link : route) diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index fe90e71f2e..1fe3b98f9a 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -395,6 +395,7 @@ set(S4U_SRC src/s4u/s4u_engine.cpp src/s4u/s4u_file.cpp src/s4u/s4u_host.cpp + src/s4u/s4u_link.cpp src/s4u/s4u_mailbox.cpp src/s4u/s4u_mutex.cpp src/s4u/s4u_netzone.cpp @@ -656,6 +657,7 @@ set(headers_to_install include/simgrid/s4u/engine.hpp include/simgrid/s4u/file.hpp include/simgrid/s4u/host.hpp + include/simgrid/s4u/link.hpp include/simgrid/s4u/Mailbox.hpp include/simgrid/s4u/Mutex.hpp include/simgrid/s4u/NetZone.hpp -- 2.20.1