X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/39d24b63aa597b0ee886e0f98b2755eb27924b3e..2d37e348a09783cda723c7019640ee69de168324:/src/kernel/lmm/fair_bottleneck.cpp diff --git a/src/kernel/lmm/fair_bottleneck.cpp b/src/kernel/lmm/fair_bottleneck.cpp index 3651992163..4426ce8351 100644 --- a/src/kernel/lmm/fair_bottleneck.cpp +++ b/src/kernel/lmm/fair_bottleneck.cpp @@ -1,11 +1,12 @@ -/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/lmm/maxmin.hpp" -#include "xbt/log.h" +#include "src/surf/surf_interface.hpp" #include "xbt/sysdep.h" + #include #include #include @@ -13,9 +14,6 @@ #include XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_maxmin); -#define SHOW_EXPR_G(expr) XBT_DEBUG(#expr " = %g", expr); -#define SHOW_EXPR_D(expr) XBT_DEBUG(#expr " = %d", expr); -#define SHOW_EXPR_P(expr) XBT_DEBUG(#expr " = %p", expr); simgrid::kernel::lmm::System* simgrid::kernel::lmm::make_new_fair_bottleneck_system(bool selective_update) { @@ -24,7 +22,7 @@ simgrid::kernel::lmm::System* simgrid::kernel::lmm::make_new_fair_bottleneck_sys void simgrid::kernel::lmm::FairBottleneck::bottleneck_solve() { - if (not modified) + if (not modified_) return; XBT_DEBUG("Variable set : %zu", variable_set.size()); @@ -75,7 +73,7 @@ void simgrid::kernel::lmm::FairBottleneck::bottleneck_solve() nb++; } XBT_DEBUG("\tThere are %d variables", nb); - if (nb > 0 && not cnst.sharing_policy) + if (nb > 0 && cnst.sharing_policy == s4u::Link::SharingPolicy::FATPIPE) nb = 1; if (nb == 0) { cnst.remaining = 0.0; @@ -109,7 +107,7 @@ void simgrid::kernel::lmm::FairBottleneck::bottleneck_solve() for (auto iter = std::begin(cnst_list); iter != std::end(cnst_list);) { Constraint& cnst = *iter; XBT_DEBUG("Updating cnst %p ", &cnst); - if (cnst.sharing_policy) { + if (cnst.sharing_policy != s4u::Link::SharingPolicy::FATPIPE) { for (Element& elem : cnst.enabled_element_set) { xbt_assert(elem.variable->sharing_weight > 0); XBT_DEBUG("\tUpdate constraint %p (%g) with variable %p by %g", &cnst, cnst.remaining, elem.variable, @@ -147,7 +145,7 @@ void simgrid::kernel::lmm::FairBottleneck::bottleneck_solve() } while (not var_list.empty()); cnst_list.clear(); - modified = true; + modified_ = true; if (XBT_LOG_ISENABLED(surf_maxmin, xbt_log_priority_debug)) { XBT_DEBUG("Fair bottleneck done"); print();