Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorStéphane Castelli <stephane.castelli@loria.fr>
Tue, 27 May 2014 14:57:18 +0000 (16:57 +0200)
committerStéphane Castelli <stephane.castelli@loria.fr>
Tue, 27 May 2014 14:57:18 +0000 (16:57 +0200)
Conflicts:
src/surf/surf_routing_cluster_fat_tree.cpp

1  2 
src/surf/surf_routing_cluster_fat_tree.cpp

@@@ -49,36 -48,30 +49,43 @@@ void AsClusterFatTree::getRouteAndLaten
                                            sg_platf_route_cbarg_t into,
                                            double *latency) {
    FatTreeNode *source, *destination, *currentNode;
 -  std::vector<NetworkLink*> route;
 -  std::map<int, FatTreeNode*>::const_iterator tempIter;
 -  if (dst->getRcType() == SURF_NETWORK_ELEMENT_ROUTER || src->getRcType() == SURF_NETWORK_ELEMENT_ROUTER) return;
 +  std::map<int, FatTreeNode*>::const_iterator tempIter;
++  
++if (dst->getRcType() == SURF_NETWORK_ELEMENT_ROUTER || src->getRcType() == SURF_NETWORK_ELEMENT_ROUTER) return;
  
 +  /* Let's find the source and the destination in our internal structure */
    tempIter = this->computeNodes.find(src->getId());
    // xbt_die -> assert
    if (tempIter == this->computeNodes.end()) {
 -    xbt_die("Could not find the source %s [%d] in the fat tree", src->getName(), src->getId());
 +    xbt_die("Could not find the source %s [%d] in the fat tree", src->getName(),
 +            src->getId());
    }
    source = tempIter->second;
    tempIter = this->computeNodes.find(dst->getId());
    if (tempIter == this->computeNodes.end()) {
 -    xbt_die("Could not find the destination %s [%d] in the fat tree", dst->getName(), dst->getId());
 +    xbt_die("Could not find the destination %s [%d] in the fat tree",
-             src->getName(), src->getId());
++            dst->getName(), dst->getId());
    }
    destination = tempIter->second;
 -  XBT_DEBUG("Get route and latency from '%s' [%d] to '%s' [%d] in a fat tree",
 +  
 +  XBT_VERB("Get route and latency from '%s' [%d] to '%s' [%d] in a fat tree",
              src->getName(), src->getId(), dst->getName(), dst->getId());
  
 +  /* In case destination is the source, and there is a loopback, let's get
 +     through it instead of going up to a switch*/
 +  if(source->id == destination->id && this->p_has_loopback) {
 +    xbt_dynar_push_as(into->link_list, void*, source->loopback);
 +    if(latency) {
 +      *latency += source->loopback->getLatency();
 +    }
 +  }
 +
    currentNode = source;
    // up part
    while (!isInSubTree(currentNode, destination)) {
      int d, k; // as in d-mod-k