From 0856d5885520ad88b20d74413f318f96c35a274d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20F=C3=BCrst?= Date: Wed, 24 Jan 2024 21:02:57 +0100 Subject: [PATCH] properly drop barrier when using iterrative aggregation --- qdp_project/src/Benchmark.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qdp_project/src/Benchmark.cpp b/qdp_project/src/Benchmark.cpp index 52af4cb..1de00ba 100644 --- a/qdp_project/src/Benchmark.cpp +++ b/qdp_project/src/Benchmark.cpp @@ -294,12 +294,15 @@ void aggr_j(size_t gid, size_t tid) { THREAD_TIMING_[AGGRJ_TIMING_INDEX][tid * gid][0][TIME_STAMP_END] = std::chrono::steady_clock::now(); - BARRIERS_[gid]->arrive_and_drop(); + if constexpr (!AGGRJ_ITERATIVE) { + BARRIERS_[gid]->arrive_and_drop(); + } aggregation::happly(DATA_DST_ + (tid * GROUP_COUNT + gid), aggregator); if constexpr (AGGRJ_ITERATIVE) { if (++tid < TC_AGGRJ) aggr_j(gid, tid); + else BARRIERS_[gid]->arrive_and_drop(); } }