Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 28 Feb 2017 09:37:58 +0000 (10:37 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 28 Feb 2017 09:57:53 +0000 (10:57 +0100)
1  2 
src/kernel/routing/TorusZone.cpp

@@@ -89,17 -93,18 +89,15 @@@ void TorusZone::parse_specific_argument
    xbt_dynar_t dimensions = xbt_str_split(cluster->topo_parameters, ",");
  
    if (!xbt_dynar_is_empty(dimensions)) {
 -    dimensions_ = xbt_dynar_new(sizeof(int), nullptr);
      /* We are in a torus cluster
--     * Parse attribute dimensions="dim1,dim2,dim3,...,dimN"
--     * and safe it in a dynarray.
++     * Parse attribute dimensions="dim1,dim2,dim3,...,dimN" and safe it in a vector.
       * Additionally, we need to know how many ranks we have in total
       */
      xbt_dynar_foreach (dimensions, iter, groups) {
--      int tmp = surf_parse_get_int(xbt_dynar_get_as(dimensions, iter, char*));
-       dimensions_.push_back(tmp);
 -      xbt_dynar_set_as(dimensions_, iter, int, tmp);
++      dimensions_.push_back(surf_parse_get_int(groups));
      }
  
 -    linkCountPerNode_ = xbt_dynar_length(dimensions_);
 +    linkCountPerNode_ = dimensions_.size();
    }
    xbt_dynar_free(&dimensions);
  }