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)
+ this->numLinksperLink_ = 2;
+
this->cluster_ = cluster;
}
-/*
-* Generate the cluster once every node is created
-*/
+/* Generate the cluster once every node is created */
void DragonflyZone::seal()
{
if (this->numNodesPerBlade_ == 0) {
sg_platf_new_link(&linkTemplate);
XBT_DEBUG("Generating link %s", id.c_str());
surf::LinkImpl* link;
- std::string tmpID;
if (this->cluster_->sharing_policy == SURF_LINK_FULLDUPLEX) {
- tmpID = linkTemplate.id + "_UP";
- link = surf::LinkImpl::byName(tmpID);
- *linkup = link; // check link?
- tmpID = linkTemplate.id + "_DOWN";
- link = surf::LinkImpl::byName(tmpID);
- *linkdown = link; // check link ?
+ *linkup = surf::LinkImpl::byName(linkTemplate.id + "_UP"); // check link?
+ *linkdown = surf::LinkImpl::byName(linkTemplate.id + "_DOWN"); // check link ?
} else {
link = surf::LinkImpl::byName(linkTemplate.id);
*linkup = link;
unsigned int numRouters = this->numGroups_ * this->numChassisPerGroup_ * this->numBladesPerChassis_;
- if (this->cluster_->sharing_policy == SURF_LINK_FULLDUPLEX)
- numLinksperLink_ = 2;
-
// Links from routers to their local nodes.
for (unsigned int i = 0; i < numRouters; i++) {
// allocate structures
std::to_string(j / numLinksperLink_) + "_" + std::to_string(uniqueId);
this->createLink(id, 1, &linkup, &linkdown);
- if (this->cluster_->sharing_policy == SURF_LINK_FULLDUPLEX) {
- this->routers_[i]->myNodes_[j] = linkup;
+ this->routers_[i]->myNodes_[j] = linkup;
+ if (this->cluster_->sharing_policy == SURF_LINK_FULLDUPLEX)
this->routers_[i]->myNodes_[j + 1] = linkdown;
- } else {
- this->routers_[i]->myNodes_[j] = linkup;
- }
+
uniqueId++;
}
}
if (dst->isRouter() || src->isRouter())
return;
- XBT_VERB("dragonfly getLocalRout from '%s'[%u] to '%s'[%u]", src->name().c_str(), src->id(), dst->name().c_str(),
- dst->id());
+ XBT_VERB("dragonfly getLocalRoute from '%s'[%u] to '%s'[%u]", src->getCname(), src->id(), dst->getCname(), dst->id());
if ((src->id() == dst->id()) && hasLoopback_) {
std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(nodePosition(src->id()));