X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dccf1b41e9c7b5a696f01abceaa2779fe65f154f..30aca4d4af004d1ec899d12f0a9fe3997e9be15e:/src/surf/network_cm02.cpp diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index ed0ddb2fbc..75d41bc77f 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -295,12 +295,12 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz std::vector *route = new std::vector(); - XBT_IN("(%s,%s,%g,%g)", src->name().c_str(), dst->name().c_str(), size, rate); + XBT_IN("(%s,%s,%g,%g)", src->cname(), dst->cname(), size, rate); - routing_platf->getRouteAndLatency(src->pimpl_netcard, dst->pimpl_netcard, route, &latency); + src->routeTo(dst, route, &latency); xbt_assert(!route->empty() || latency, "You're trying to send data from %s to %s but there is no connecting path between these two hosts.", - src->name().c_str(), dst->name().c_str()); + src->cname(), dst->cname()); for (auto link: *route) if (link->isOff()) @@ -308,7 +308,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz if (sg_network_crosstraffic == 1) { back_route = new std::vector(); - routing_platf->getRouteAndLatency(dst->pimpl_netcard, src->pimpl_netcard, back_route, nullptr); + dst->routeTo(src, back_route, nullptr); for (auto link: *back_route) if (link->isOff()) failed = 1; @@ -341,7 +341,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz "Using a model with a gap (e.g., SMPI) with a platform without links (e.g. vivaldi)!!!"); gapAppend(size, route->at(0), action); - XBT_DEBUG("Comm %p: %s -> %s gap=%f (lat=%f)", action, src->name().c_str(), dst->name().c_str(), action->senderGap_, + XBT_DEBUG("Comm %p: %s -> %s gap=%f (lat=%f)", action, src->cname(), dst->cname(), action->senderGap_, action->latency_); } @@ -368,7 +368,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz for (auto link: *route) lmm_expand(maxminSystem_, link->getConstraint(), action->getVariable(), 1.0); - if (sg_network_crosstraffic == 1) { + if (back_route != nullptr) { // sg_network_crosstraffic was activated XBT_DEBUG("Fullduplex active adding backward flow using 5%%"); for (auto link : *back_route) lmm_expand(maxminSystem_, link->getConstraint(), action->getVariable(), .05);