X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/5279f43fc9be71815091e79c76d5bc04c8c88421..f620be5869815a0dccd5b37089c2ee91399915e4:/process.cpp?ds=inline diff --git a/process.cpp b/process.cpp index d8ec500..bc71b9d 100644 --- a/process.cpp +++ b/process.cpp @@ -30,7 +30,6 @@ process::process(int argc, char* argv[]) e_xbt_log_priority_t logp = xbt_log_priority_verbose; if (!LOG_ISENABLED(logp)) return; - LOG1(logp, "My initial load is: %g", load); std::ostringstream oss; oss << neigh.size() << " neighbor"; if (!neigh.empty()) { @@ -48,16 +47,21 @@ int process::run() { bool one_more = true; unsigned iter = 0; + + INFO1("Initial load: %g", load); VERB0("Starting..."); while (one_more) { bool close_received; + ++iter; - if (opt::bookkeeping) - INFO3("(%u) current load: %g ; expected: %g", - iter, load, expected_load); - else - INFO2("(%u) current load: %g", - iter, load); + if (opt::log_rate && iter % opt::log_rate == 0) { + if (opt::bookkeeping) + INFO3("(%u) current load: %g ; expected: %g", + iter, load, expected_load); + else + INFO2("(%u) current load: %g", + iter, load); + } compute(); close_received = !receive(false); @@ -68,7 +72,6 @@ int process::run() */ comm.flush(false); - ++iter; if (opt::exit_on_close && close_received) one_more = false; @@ -85,6 +88,11 @@ int process::run() */ VERB0("Done."); + if (opt::bookkeeping) + INFO4("Final load after %d iteration%s: %g ; expected: %g", + iter, ESSE(iter), load, expected_load); + else + INFO3("Final load after %d iteration%s: %g", iter, ESSE(iter), load); return 0; }