if (opt::log_rate >= 0)
XBT_INFO("Initial load: %g", real_load);
XBT_VERB("Starting...");
+ mutex.acquire();
lb_thread->start();
+ while (lb_iter <= opt::comp_iter_delay)
+ cond.wait(mutex);
+ mutex.release();
+ double sleep_duration = opt::comp_time_delay - MSG_get_clock();
+ if (sleep_duration > 0.0)
+ MSG_process_sleep(sleep_duration);
compute_loop();
lb_thread->wait();
XBT_VERB("Done.");
double next_iter_after_date = MSG_get_clock() + opt::min_lb_iter_duration;
while (still_running()) {
- ++lb_iter;
+ if (lb_iter == opt::comp_iter_delay) {
+ mutex.acquire();
+ ++lb_iter;
+ cond.signal();
+ mutex.release();
+ } else {
+ ++lb_iter;
+ }
if (opt::log_rate && lb_iter % opt::log_rate == 0) {
if (opt::bookkeeping)