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
Branches
No related tags found
No related merge requests found
......@@ -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 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment