summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
03905d3)
Define and use opt::loba_best_divisor instead of opt::option_x to
specify the divisor for algorithms besteffort and 2besteffort.
The command line parameter "-k" is used to change its value.
* Remove usage of opt::option_x in loba_besteffort.cpp and loba_2besteffort.cpp
* 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.
+ Use -k instead (done). Remove hack marked "FIXME" in opt::parse_args().
* Support heterogeneous platforms?
Not sure yet.
* Support heterogeneous platforms?
Not sure yet.
// don't continue if get_load() <= mean, or pneigh[i]->get_load >= mean
if (transfer <= 0.0)
break;
// 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!!!
+ if (opt::loba_best_divisor)
+ transfer /= opt::loba_best_divisor;
send(pneigh[i], transfer);
XBT_DEBUG("sent %g to %s", transfer, pneigh[i]->get_name());
}
send(pneigh[i], transfer);
XBT_DEBUG("sent %g to %s", transfer, pneigh[i]->get_name());
}
double mean = sum / (bound + 1);
for (unsigned i = 0 ; i < bound ; ++i) {
double transfer = mean - pneigh[i]->get_load();
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!!!
+ if (opt::loba_best_divisor)
+ transfer /= opt::loba_best_divisor;
send(pneigh[i], transfer);
XBT_DEBUG("sent %g to %s", transfer, pneigh[i]->get_name());
}
send(pneigh[i], transfer);
XBT_DEBUG("sent %g to %s", transfer, pneigh[i]->get_name());
}
double min_transfer_amount = 0.0;
double max_transfer_amount = 0.0;
bool integer_transfer = false;
double min_transfer_amount = 0.0;
double max_transfer_amount = 0.0;
bool integer_transfer = false;
+ unsigned loba_best_divisor = 1;
// Application parameters
cost_func comp_cost("1e9, 0"); // fixme: find better defaults
// Application parameters
cost_func comp_cost("1e9, 0"); // fixme: find better defaults
int c;
opterr = 0;
while ((c = getopt(*argc, argv,
int c;
opterr = 0;
while ((c = getopt(*argc, argv,
- "a:bc:C:d:D:eEhi:I:l:L:m:M:N:r:Rs:S:t:T:vVx:X:Z"))
+ "a:bc:C:d:D:eEhi:I:k:l:L:m:M:N:r:Rs:S:t:T:vVx:X:Z"))
!= -1) {
switch (c) {
case 'a':
!= -1) {
switch (c) {
case 'a':
case 'i':
PARSE_ARG(opt::lb_maxiter);
break;
case 'i':
PARSE_ARG(opt::lb_maxiter);
break;
+ case 'k':
+ PARSE_ARG(opt::loba_best_divisor);
+ break;
case 'I':
PARSE_ARG(opt::comp_maxiter);
break;
case 'I':
PARSE_ARG(opt::comp_maxiter);
break;
+ if (opt::option_x) { // FIXME: remove this one day...
+ opt::loba_best_divisor = opt::option_x;
+ XBT_WARN("divisor for algorithms *best* set from option -x (%d => %u),"
+ " use -k instead",
+ opt::option_x, opt::loba_best_divisor);
+ }
+
if (opt::version_requested || opt::help_requested)
return 1;
if (opt::version_requested || opt::help_requested)
return 1;
+ if (opt::loba_best_divisor <= 0) {
+ XBT_ERROR("divisor for algorithms *best* (%u) should be positive",
+ opt::loba_best_divisor);
+ result = false;
+ }
+
if (!opt::auto_depl::random_seed)
opt::auto_depl::random_seed = time(NULL);
if (!opt::auto_depl::random_seed)
opt::auto_depl::random_seed = time(NULL);
h.val_or_string(max_transfer_amount, "no limit"));
DESCR("only transfer integer data shares", "%s",
h.on_off(integer_transfer));
h.val_or_string(max_transfer_amount, "no limit"));
DESCR("only transfer integer data shares", "%s",
h.on_off(integer_transfer));
+ DESCR("divisor for algorithms *best*", "%u", loba_best_divisor);
DESCR("minimum duration between comp. iterations", "%g",
min_comp_iter_duration);
DESCR("computations start after lb. iter", "%u", comp_iter_delay);
DESCR("minimum duration between comp. iterations", "%g",
min_comp_iter_duration);
DESCR("computations start after lb. iter", "%u", comp_iter_delay);
if (opt::help_requested > 1)
std::clog << o("")
<< "(a not so good idea introduced by git commit f5336c5)\n";
if (opt::help_requested > 1)
std::clog << o("")
<< "(a not so good idea introduced by git commit f5336c5)\n";
+ std::clog << o("-k value") << "divisor for algorithms *best*"
+ << " [" << opt::loba_best_divisor << "]\n";
std::clog << "\nLb. and comp. iterations:\n";
std::clog << o("-s value")
std::clog << "\nLb. and comp. iterations:\n";
std::clog << o("-s value")
extern double max_transfer_amount;
extern double min_lb_iter_duration;
extern bool integer_transfer;
extern double max_transfer_amount;
extern double min_lb_iter_duration;
extern bool integer_transfer;
+ extern unsigned loba_best_divisor;
// Application parameters
extern cost_func comp_cost;
// Application parameters
extern cost_func comp_cost;