X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/3c79bbd2b5d237ebb9f045a768ac611a6bc7851c..a243be6b0e0af216b0bd53bc82d6cd315d43b181:/process.cpp diff --git a/process.cpp b/process.cpp index 3df086b..54fea8a 100644 --- a/process.cpp +++ b/process.cpp @@ -135,7 +135,6 @@ void process::load_balance_loop() XBT_INFO("(%u:%u) current load: %g", lb_iter, comp_iter, real_load); XBT_VERB("... expected load: %g", expected_load); } - mutex.release(); if (expected_load > 0.0) load_balance(); @@ -143,14 +142,14 @@ void process::load_balance_loop() print_loads(true, xbt_log_priority_debug); // send + comm.ctrl_flush(false); std::for_each(neigh.begin(), neigh.end(), bind(&process::ctrl_send, this, _1)); prev_load_broadcast = expected_load; + mutex.release(); sleep_until_date(next_iter_after_date, opt::min_lb_iter_duration); ctrl_receive(0.0); - - comm.ctrl_flush(false); } XBT_VERB("Going to finalize for %s...", __func__); @@ -181,9 +180,8 @@ void process::compute_loop() data_receive(opt::min_comp_iter_duration); mutex.release(); - comm.data_flush(false); - // send + comm.data_flush(false); mutex.acquire(); std::for_each(neigh.begin(), neigh.end(), bind(&process::data_send, this, _1));