std::qsort((void *) links, totalLinks, sizeof(SD_link_t), name_compare_links);
for (i = 0; i < totalLinks; i++) {
std::qsort((void *) links, totalLinks, sizeof(SD_link_t), name_compare_links);
for (i = 0; i < totalLinks; i++) {
- std::printf("%s\" bandwidth=\"%.0f\" latency=\"%.9f\"", sg_link_name(links[i]),
- sg_link_bandwidth(links[i]), sg_link_latency(links[i]));
- if (sg_link_is_shared(links[i])) {
+ std::printf("%s\" bandwidth=\"%.0f\" latency=\"%.9f\"", link->name(), link->bandwidth(), link->latency());
+ if (sg_link_is_shared(link)) {
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];
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];
simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr);
if (!route.empty()) {
std::printf(" <route src=\"%s\" dst=\"%s\">\n ", host1->cname(), host2->cname());
for (auto link : route)
simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr);
if (!route.empty()) {
std::printf(" <route src=\"%s\" dst=\"%s\">\n ", host1->cname(), host2->cname());
for (auto link : route)
std::printf("\n </route>\n");
}
}
for (auto netcardDst : netcardList) { // to router
if (netcardDst->isRouter()) {
std::printf(" <route src=\"%s\" dst=\"%s\">\n ", host1->cname(), netcardDst->cname());
std::printf("\n </route>\n");
}
}
for (auto netcardDst : netcardList) { // to router
if (netcardDst->isRouter()) {
std::printf(" <route src=\"%s\" dst=\"%s\">\n ", host1->cname(), netcardDst->cname());
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr);
for (auto link : route)
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr);
for (auto link : route)
for (auto value2 : netcardList) { // to router
if (value2->isRouter()) {
std::printf(" <route src=\"%s\" dst=\"%s\">\n ", value1->cname(), value2->cname());
for (auto value2 : netcardList) { // to router
if (value2->isRouter()) {
std::printf(" <route src=\"%s\" dst=\"%s\">\n ", value1->cname(), value2->cname());
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, value2, &route, nullptr);
for (auto link : route)
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, value2, &route, nullptr);
for (auto link : route)
std::printf("\n </route>\n");
}
}
for (unsigned int it_dst = 0; it_dst < totalHosts; it_dst++) { // Routes to host
simgrid::s4u::Host* host2 = hosts[it_dst];
std::printf(" <route src=\"%s\" dst=\"%s\">\n ", value1->cname(), host2->cname());
std::printf("\n </route>\n");
}
}
for (unsigned int it_dst = 0; it_dst < totalHosts; it_dst++) { // Routes to host
simgrid::s4u::Host* host2 = hosts[it_dst];
std::printf(" <route src=\"%s\" dst=\"%s\">\n ", value1->cname(), host2->cname());
simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, netcardDst, &route, nullptr);
for (auto link : route)
simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, netcardDst, &route, nullptr);
for (auto link : route)