X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d6aa3f4818e3590d9d305f5e6bca1bc0a7780ceb..de57b34916659892d2dc26edabf552253afe2c18:/src/kernel/routing/DragonflyZone.cpp diff --git a/src/kernel/routing/DragonflyZone.cpp b/src/kernel/routing/DragonflyZone.cpp index 429a863b43..6b6f2c7229 100644 --- a/src/kernel/routing/DragonflyZone.cpp +++ b/src/kernel/routing/DragonflyZone.cpp @@ -112,7 +112,7 @@ void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster) throw std::invalid_argument(std::string("Last parameter is not the amount of nodes per blade:") + parameters[3]); } - if (cluster->sharing_policy == SURF_LINK_FULLDUPLEX) + if (cluster->sharing_policy == SURF_LINK_SPLITDUPLEX) this->numLinksperLink_ = 2; this->cluster_ = cluster; @@ -168,7 +168,7 @@ void DragonflyZone::createLink(const std::string& id, int numlinks, surf::LinkIm sg_platf_new_link(&linkTemplate); XBT_DEBUG("Generating link %s", id.c_str()); surf::LinkImpl* link; - if (this->cluster_->sharing_policy == SURF_LINK_FULLDUPLEX) { + if (this->cluster_->sharing_policy == SURF_LINK_SPLITDUPLEX) { *linkup = surf::LinkImpl::byName(linkTemplate.id + "_UP"); // check link? *linkdown = surf::LinkImpl::byName(linkTemplate.id + "_DOWN"); // check link ? } else { @@ -199,7 +199,7 @@ void DragonflyZone::generateLinks() this->createLink(id, 1, &linkup, &linkdown); this->routers_[i]->myNodes_[j] = linkup; - if (this->cluster_->sharing_policy == SURF_LINK_FULLDUPLEX) + if (this->cluster_->sharing_policy == SURF_LINK_SPLITDUPLEX) this->routers_[i]->myNodes_[j + 1] = linkdown; uniqueId++; @@ -260,7 +260,7 @@ void DragonflyZone::generateLinks() } } -void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* latency) +void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* latency) { // Minimal routing version. // TODO : non-minimal random one, and adaptive ? @@ -273,7 +273,7 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_c if ((src->id() == dst->id()) && hasLoopback_) { std::pair info = privateLinks_.at(nodePosition(src->id())); - route->link_list->push_back(info.first); + route->link_list.push_back(info.first); if (latency) *latency += info.first->latency(); return; @@ -294,13 +294,13 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_c DragonflyRouter* currentRouter = myRouter; // node->router local link - route->link_list->push_back(myRouter->myNodes_[myCoords[3] * numLinksperLink_]); + route->link_list.push_back(myRouter->myNodes_[myCoords[3] * numLinksperLink_]); if (latency) *latency += myRouter->myNodes_[myCoords[3] * numLinksperLink_]->latency(); if (hasLimiter_) { // limiter for sender std::pair info = privateLinks_.at(nodePositionWithLoopback(src->id())); - route->link_list->push_back(info.first); + route->link_list.push_back(info.first); } if (targetRouter != myRouter) { @@ -310,7 +310,7 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_c // go to the router of our group connected to this one. if (currentRouter->blade_ != targetCoords[0]) { // go to the nth router in our chassis - route->link_list->push_back(currentRouter->greenLinks_[targetCoords[0]]); + route->link_list.push_back(currentRouter->greenLinks_[targetCoords[0]]); if (latency) *latency += currentRouter->greenLinks_[targetCoords[0]]->latency(); currentRouter = routers_[myCoords[0] * (numChassisPerGroup_ * numBladesPerChassis_) + @@ -319,14 +319,14 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_c if (currentRouter->chassis_ != 0) { // go to the first chassis of our group - route->link_list->push_back(currentRouter->blackLinks_[0]); + route->link_list.push_back(currentRouter->blackLinks_[0]); if (latency) *latency += currentRouter->blackLinks_[0]->latency(); currentRouter = routers_[myCoords[0] * (numChassisPerGroup_ * numBladesPerChassis_) + targetCoords[0]]; } // go to destination group - the only optical hop - route->link_list->push_back(currentRouter->blueLinks_[0]); + route->link_list.push_back(currentRouter->blueLinks_[0]); if (latency) *latency += currentRouter->blueLinks_[0]->latency(); currentRouter = routers_[targetCoords[0] * (numChassisPerGroup_ * numBladesPerChassis_) + myCoords[0]]; @@ -334,7 +334,7 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_c // same group, but same blade ? if (targetRouter->blade_ != currentRouter->blade_) { - route->link_list->push_back(currentRouter->greenLinks_[targetCoords[2]]); + route->link_list.push_back(currentRouter->greenLinks_[targetCoords[2]]); if (latency) *latency += currentRouter->greenLinks_[targetCoords[2]]->latency(); currentRouter = routers_[targetCoords[0] * (numChassisPerGroup_ * numBladesPerChassis_) + targetCoords[2]]; @@ -342,7 +342,7 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_c // same blade, but same chassis ? if (targetRouter->chassis_ != currentRouter->chassis_) { - route->link_list->push_back(currentRouter->blackLinks_[targetCoords[1]]); + route->link_list.push_back(currentRouter->blackLinks_[targetCoords[1]]); if (latency) *latency += currentRouter->blackLinks_[targetCoords[1]]->latency(); } @@ -350,11 +350,11 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_c if (hasLimiter_) { // limiter for receiver std::pair info = privateLinks_.at(nodePositionWithLoopback(dst->id())); - route->link_list->push_back(info.first); + route->link_list.push_back(info.first); } // router->node local link - route->link_list->push_back(targetRouter->myNodes_[targetCoords[3] * numLinksperLink_ + numLinksperLink_ - 1]); + route->link_list.push_back(targetRouter->myNodes_[targetCoords[3] * numLinksperLink_ + numLinksperLink_ - 1]); if (latency) *latency += targetRouter->myNodes_[targetCoords[3] * numLinksperLink_ + numLinksperLink_ - 1]->latency(); }