X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a6ceacf3b05651e2ae5a40d47c96bdd9fc4d1416..69aaa26fa5228c31e55086fa166479732a9cd1b7:/src/surf/network_ns3.cpp diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index 6e4a467270..1180f02b1f 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -185,7 +185,10 @@ static void clusterCreation_cb(simgrid::kernel::routing::ClusterCreationArgs con { ns3::NodeContainer Nodes; - for (int const& i : *cluster.radicals) { + xbt_assert(cluster.topology == simgrid::kernel::routing::ClusterTopology::FLAT, + "NS-3 is supported only by flat clusters. Do not use with other topologies"); + + for (int const& i : cluster.radicals) { // Create private link std::string host_id = cluster.prefix + std::to_string(i) + cluster.suffix; auto* src = simgrid::s4u::Host::by_name(host_id)->get_netpoint(); @@ -229,6 +232,10 @@ static void routeCreation_cb(bool symmetrical, simgrid::kernel::routing::NetPoin simgrid::kernel::routing::NetPoint* /*gw_dst*/, std::vector const& link_list) { + /* ignoring routes from StarZone, not supported */ + if (not src || not dst) + return; + if (link_list.size() == 1) { auto const* link = static_cast(link_list[0]); @@ -270,7 +277,7 @@ static simgrid::config::Flag static simgrid::config::Flag ns3_seed( "ns3/seed", "The random seed provided to ns-3. Either 'time' to seed with time(), blank to not set (default), or a number.", "", - [](std::string val) { + [](const std::string& val) { if (val.length() == 0) return; if (strcasecmp(val.c_str(), "time") == 0) {