cluster->set_parent(root);
/* create the backbone link */
- sg4::Link* l_bb = cluster->create_link("backbone-" + name, "1.25GBps")->seal();
+ const sg4::Link* l_bb = cluster->create_link("backbone-" + name, "1.25GBps")->seal();
/* create all hosts and connect them to outside world */
for (const auto& id : radicals) {
/* create host */
const sg4::Host* host = cluster->create_host(hostname, "286.087kf");
/* create UP/DOWN link */
- sg4::Link* l_up = cluster->create_link(hostname + "_up", "125MBps")->set_latency("24us")->seal();
- sg4::Link* l_down = cluster->create_link(hostname + "_down", "125MBps")->set_latency("24us")->seal();
+ const sg4::Link* link = cluster->create_split_duplex_link(hostname, "125MBps")->set_latency("24us")->seal();
- /* add link UP and backbone for communications from the host */
- cluster->add_route(host->get_netpoint(), nullptr, nullptr, nullptr, std::vector<sg4::Link*>{l_up, l_bb}, false);
- /* add backbone and link DOWN for communications to the host */
- cluster->add_route(nullptr, host->get_netpoint(), nullptr, nullptr, std::vector<sg4::Link*>{l_bb, l_down}, false);
+ /* add link and backbone for communications from the host */
+ cluster->add_route(host->get_netpoint(), nullptr, nullptr, nullptr,
+ std::vector<sg4::LinkInRoute>{{link, sg4::LinkInRoute::Direction::UP}, l_bb}, true);
}
/* create router */
simgrid::kernel::routing::NetPoint* router;
/* create top link */
- sg4::Link* link = root->create_link("backbone", "1.25GBps")->set_latency("24us")->seal();
+ const sg4::Link* link = root->create_link("backbone", "1.25GBps")->set_latency("24us")->seal();
/* create cabinet1 */
std::vector<int> rad(32);