From: Stéphane Castelli Date: Mon, 12 May 2014 07:07:35 +0000 (+0200) Subject: Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid X-Git-Tag: v3_11~83^2~7 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/988f1ee585120cbb07d93e446917648488a76e36?hp=8454c4dde25913b0c430ceff82aabab70ff0b1a6 Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid --- diff --git a/src/surf/surf_routing_cluster_fat_tree.cpp b/src/surf/surf_routing_cluster_fat_tree.cpp index 1c541d5299..5733fd30d7 100644 --- a/src/surf/surf_routing_cluster_fat_tree.cpp +++ b/src/surf/surf_routing_cluster_fat_tree.cpp @@ -40,12 +40,13 @@ void AsClusterFatTree::getRouteAndLatency(RoutingEdgePtr src, source = this->nodes.find(src->getId())->second; destination = this->nodes.find(dst->getId())->second; - int d = 0, k = 0; // as in d-mod-k + currentNode = source; // up part while (!isInSubTree(currentNode, destination)) { + int d, k; // as in d-mod-k d = destination->position; for (unsigned int i = 0 ; i < currentNode->level ; i++) { @@ -68,7 +69,7 @@ void AsClusterFatTree::getRouteAndLatency(RoutingEdgePtr src, destination->label[currentNode->level]) { route.push_back(currentNode->children[i]->downLink); if(latency) { - *latency += currentNode->children[d]->downLink->getLatency(); + *latency += currentNode->children[i]->downLink->getLatency(); } currentNode = currentNode->children[i]->downNode; }