From fc38533f1d616a3ab86bce52e52ee09604564d25 Mon Sep 17 00:00:00 2001
From: Christian Godenschwager <christian.godenschwager@fau.de>
Date: Fri, 4 Aug 2017 15:22:20 +0200
Subject: [PATCH] Optimized unifying timers registered at TimingPool

Not all timer names are gathered, a parallel set reduction is used instead
---
 src/core/timing/TimingPool.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/timing/TimingPool.cpp b/src/core/timing/TimingPool.cpp
index 7b64baee1..97dfc1a89 100644
--- a/src/core/timing/TimingPool.cpp
+++ b/src/core/timing/TimingPool.cpp
@@ -22,7 +22,7 @@
 #include "TimingPool.h"
 #include "core/Abort.h"
 #include "core/logging/Logging.h"
-#include "core/mpi/Gatherv.h"
+#include "core/mpi/SetReduction.h"
 #include "core/mpi/MPIManager.h"
 
 
@@ -394,7 +394,7 @@ void TimingPool<TP>::unifyRegisteredTimersAcrossProcesses()
    for( auto timer = begin(); timer != end(); ++timer )
       names.push_back( timer->first );
 
-   auto gatheredNames = mpi::allGatherv( names );
+   auto gatheredNames = mpi::allReduceSet( names, mpi::UNION );
    for( auto name = gatheredNames.begin(); name != gatheredNames.end(); ++name )
       if( !timerExists(*name) )
          registerTimer( *name );
-- 
GitLab