- if (opt::bookkeeping) {
- XBT_INFO("Final load after %d:%d iterations: %g ; expected: %g",
- lb_iter, comp_iter, real_load, expected_load);
- } else {
- XBT_INFO("Final load after %d:%d iterations: %g",
- lb_iter, comp_iter, real_load);
- }
- XBT_VERB("Total computation for this process: %g", comp);
+ proc_mutex->release();
+ xbt_assert(received_load == 0.0,
+ "received_load is %g, but should be 0.0 !", received_load);
+ if (opt::log_rate < 0)
+ return;
+ XBT_INFO("Final load after %d:%d:%d iterations: %g",
+ lb_iter, comp_iter, all_comp_iter, real_load);
+ if (convergence >= 0.0)
+ XBT_INFO("Convergence within %g%% was achieved at time %g",
+ opt::avg_load_ratio, convergence);
+ else
+ XBT_INFO("Convergence within %g%% was not achieved",
+ opt::avg_load_ratio);
+ XBT_VERB("Expected load was: %g", expected_load);
+ XBT_VERB("Total computation for this process: %g", get_comp_amount());
+ print_loads(true, xbt_log_priority_debug);
+}
+
+double process::get_iter_deviation() const
+{
+ double average_cost = opt::comp_cost(total_load_average); // fixme: get locked?
+ // Do not count idle periods
+ double comp_iter_opt = acc.comp_amount / average_cost;
+/*
+ // Add iterations that could have been achieved while beeing idle
+ // (kept for documentation)
+ double self_speed = MSG_get_host_speed(MSG_host_self());
+ double average_duration = average_cost / self_speed;
+ comp_iter_opt += idle_duration / average_duration;
+*/
+ return comp_iter - comp_iter_opt;