#include "process.h"
#include "loba_simple.h"
#include "loba_fairstrategy.h"
+#include "loba_makhoul.h"
#include "options.h"
double min_iter_duration = 1.0;
// Parameters for the end of the simulation
- // fixme: find better defaults
- unsigned lb_maxiter = 10;
+ unsigned lb_maxiter = 0;
unsigned comp_maxiter = 0;
double time_limit = 0;
- bool exit_on_close = false;
+ bool exit_on_close = true;
// Named parameters lists
loba_algorithms_type loba_algorithms;
loba_algorithms_type::loba_algorithms_type()
{
NOL_INSERT("fairstrategy", "balance with fair strategy", loba_fairstrategy);
+ NOL_INSERT("makhoul", "balance with Makhoul's PhD algorithm", loba_makhoul);
NOL_INSERT("none", "no load-balancing (for testing only)", process);
NOL_INSERT("simple", "balance with least loaded neighbor", loba_simple);
}
&& result;
break;
case 'b':
- opt::bookkeeping = true;
+ opt::bookkeeping = !opt::bookkeeping;
break;
case 'e':
- opt::exit_on_close = true;
+ opt::exit_on_close = !opt::exit_on_close;
break;
case 'h':
opt::help_requested++;
<< " [" << opt::loba_algo << "]\n";
if (opt::help_requested > 1)
so_list(opt::loba_algorithms);
- std::clog << o("-b") << "enable bookkeeping (\"virtual load\")\n";
+ std::clog << o("-b") << "toggle bookkeeping (\"virtual load\")"
+ << " [" << opt_helper::on_off(opt::bookkeeping) << "]\n";
std::clog << "\nApplication parameters\n";
std::clog << o("-c [fn,...]f0")
std::clog << o("-t value")
<< "time limit (simulated time), 0 for infinity"
<< " [" << opt::time_limit << "]\n";
- std::clog << o("-e") << "exit on reception of \"close\" message\n";
+ std::clog << o("-e") << "toggle exit on reception of \"close\" message"
+ << " [" << opt_helper::on_off(opt::exit_on_close) << "]\n";
if (opt::help_requested < 3)
return;