Skip to content
Snippets Groups Projects
Commit fc38533f authored by Christian Godenschwager's avatar Christian Godenschwager
Browse files

Optimized unifying timers registered at TimingPool

Not all timer names are gathered, a parallel set reduction is used instead
parent 85a487f0
No related merge requests found
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "TimingPool.h" #include "TimingPool.h"
#include "core/Abort.h" #include "core/Abort.h"
#include "core/logging/Logging.h" #include "core/logging/Logging.h"
#include "core/mpi/Gatherv.h" #include "core/mpi/SetReduction.h"
#include "core/mpi/MPIManager.h" #include "core/mpi/MPIManager.h"
...@@ -394,7 +394,7 @@ void TimingPool<TP>::unifyRegisteredTimersAcrossProcesses() ...@@ -394,7 +394,7 @@ void TimingPool<TP>::unifyRegisteredTimersAcrossProcesses()
for( auto timer = begin(); timer != end(); ++timer ) for( auto timer = begin(); timer != end(); ++timer )
names.push_back( timer->first ); 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 ) for( auto name = gatheredNames.begin(); name != gatheredNames.end(); ++name )
if( !timerExists(*name) ) if( !timerExists(*name) )
registerTimer( *name ); registerTimer( *name );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment