From 64c0f9cb9f413f8ba6590688be594c41ea257b6c Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 22 Sep 2011 16:30:17 +0200 Subject: [PATCH] Temporarily use opt::option_x in algorithms (2)besteffort. --- TODO | 3 +++ loba_2besteffort.cpp | 2 ++ loba_besteffort.cpp | 2 ++ 3 files changed, 7 insertions(+) diff --git a/TODO b/TODO index 93df78f..e99ae98 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,6 @@ +* Remove usage of opt::option_x in loba_besteffort.cpp and loba_2besteffort.cpp + Either simply remove it, or change it to a real option. + * Support heterogeneous platforms? Not sure yet. Should be doable if each process also sends its speed to its neighbors. diff --git a/loba_2besteffort.cpp b/loba_2besteffort.cpp index 967476e..820c7a5 100644 --- a/loba_2besteffort.cpp +++ b/loba_2besteffort.cpp @@ -31,6 +31,8 @@ void loba_2besteffort::load_balance() // don't continue if get_load() <= mean, or pneigh[i]->get_load >= mean if (transfer <= 0.0) break; + if (opt::option_x) + transfer /= opt::option_x; // HACK!!! send(pneigh[i], transfer); XBT_DEBUG("sent %g to %s", transfer, pneigh[i]->get_name()); } diff --git a/loba_besteffort.cpp b/loba_besteffort.cpp index fa72730..22343e0 100644 --- a/loba_besteffort.cpp +++ b/loba_besteffort.cpp @@ -26,6 +26,8 @@ void loba_besteffort::load_balance() double mean = sum / (bound + 1); for (unsigned i = 0 ; i < bound ; ++i) { double transfer = mean - pneigh[i]->get_load(); + if (opt::option_x) + transfer /= opt::option_x; // HACK!!! send(pneigh[i], transfer); XBT_DEBUG("sent %g to %s", transfer, pneigh[i]->get_name()); } -- 2.39.5