X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/85ebbe85ef3f238da71593b227793729479a5bff..371d168e21b83e2364c2ac2dbff3847588769c2b:/src/kernel/routing/ClusterZone.cpp diff --git a/src/kernel/routing/ClusterZone.cpp b/src/kernel/routing/ClusterZone.cpp index cce406346a..72f6dca848 100644 --- a/src/kernel/routing/ClusterZone.cpp +++ b/src/kernel/routing/ClusterZone.cpp @@ -7,7 +7,7 @@ #include "simgrid/kernel/routing/NetPoint.hpp" #include "src/kernel/resource/StandardLinkImpl.hpp" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_cluster, ker_routing, "Kernel Cluster Routing"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_cluster, ker_platform, "Kernel Cluster Routing"); /* This routing is specifically setup to represent clusters, aka homogeneous sets of machines * Note that a router is created, easing the interconnection with the rest of the world. */ @@ -69,7 +69,9 @@ void ClusterBase::fill_leaf_from_cb(unsigned long position, const std::vector dims_array(dimensions.size()); - for (auto i = static_cast(dimensions.size() - 1); i >= 0 && index > 0; --i) { + for (auto i = static_cast(dimensions.size() - 1); i >= 0; --i) { + if (index == 0) + break; unsigned long value = index % dimensions[i]; dims_array[i] = value; index = (index / dimensions[i]);