From 3addd86826671ae0a5cf883d1b3809b4cddb5b33 Mon Sep 17 00:00:00 2001 From: Gallo Alejandro Date: Fri, 7 Oct 2022 22:51:43 +0200 Subject: [PATCH] Create a barrier before the iterations start --- src/atrip/Atrip.cxx | 1 + src/atrip/DatabaseCommunicator.cxx | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/atrip/Atrip.cxx b/src/atrip/Atrip.cxx index a004dfc..5bf556c 100644 --- a/src/atrip/Atrip.cxx +++ b/src/atrip/Atrip.cxx @@ -454,6 +454,7 @@ Atrip::Output Atrip::run(Atrip::Input const& in) { // START MAIN LOOP ======================================================{{{1 + MPI_Barrier(universe); double energy(0.); size_t first_iteration = 0; Checkpoint c; diff --git a/src/atrip/DatabaseCommunicator.cxx b/src/atrip/DatabaseCommunicator.cxx index 62299b5..0af51a1 100644 --- a/src/atrip/DatabaseCommunicator.cxx +++ b/src/atrip/DatabaseCommunicator.cxx @@ -250,12 +250,12 @@ namespace atrip { #ifdef NAIVE_SLOW WITH_CHRONO("db:comm:naive:tuples", - const auto tuples = get_nth_naive_tuples(nv, - np, - iteration); - const auto prev_tuples = get_nth_naive_tuples(nv, - np, - (int64_t)iteration - 1); + const auto tuples = get_nth_naive_tuples(nv, + np, + iteration); + const auto prev_tuples = get_nth_naive_tuples(nv, + np, + (int64_t)iteration - 1); ) #else WITH_CHRONO("db:comm:naive:tuples",