this->nodesByLevel_[0] *= this->lowerLevelNodesNumber_[i];
if (this->nodesByLevel_[0] != this->nodes_.size()) {
- surf_parse_error("The number of provided nodes does not fit with the wanted topology."
- " Please check your platform description (We need %u nodes, we got %zu)",
- this->nodesByLevel_[0], this->nodes_.size());
+ surf_parse_error(std::string("The number of provided nodes does not fit with the wanted topology.") +
+ " Please check your platform description (We need " + std::to_string(this->nodesByLevel_[0]) +
+ "nodes, we got " + std::to_string(this->nodes_.size()));
return;
}
linkTemplate.policy = SURF_LINK_SHARED;
linkTemplate.id = "limiter_"+std::to_string(id);
sg_platf_new_link(&linkTemplate);
- this->limiterLink = surf::LinkImpl::byName(linkTemplate.id.c_str());
+ this->limiterLink = surf::LinkImpl::byName(linkTemplate.id);
}
if (cluster->loopback_bw || cluster->loopback_lat) {
linkTemplate.bandwidth = cluster->loopback_bw;
linkTemplate.policy = SURF_LINK_FATPIPE;
linkTemplate.id = "loopback_"+ std::to_string(id);
sg_platf_new_link(&linkTemplate);
- this->loopback = surf::LinkImpl::byName(linkTemplate.id.c_str());
+ this->loopback = surf::LinkImpl::byName(linkTemplate.id);
}
}
if (cluster->sharing_policy == SURF_LINK_FULLDUPLEX) {
std::string tmpID = std::string(linkTemplate.id) + "_UP";
- this->upLink = surf::LinkImpl::byName(tmpID.c_str()); // check link?
+ this->upLink = surf::LinkImpl::byName(tmpID); // check link?
tmpID = std::string(linkTemplate.id) + "_DOWN";
- this->downLink = surf::LinkImpl::byName(tmpID.c_str()); // check link ?
+ this->downLink = surf::LinkImpl::byName(tmpID); // check link ?
} else {
- this->upLink = surf::LinkImpl::byName(linkTemplate.id.c_str());
+ this->upLink = surf::LinkImpl::byName(linkTemplate.id);
this->downLink = this->upLink;
}
uniqueId++;