From 5772b4cdb02b6f1d353c190bc915127101abf8eb Mon Sep 17 00:00:00 2001 From: Mark Berrill Date: Thu, 8 Mar 2018 16:04:57 -0500 Subject: [PATCH] Minor performance fix with Timer --- analysis/runAnalysis.cpp | 2 ++ tests/lbpm_color_macro_simulator.cpp | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/analysis/runAnalysis.cpp b/analysis/runAnalysis.cpp index 15e7c95d..4f79ad62 100644 --- a/analysis/runAnalysis.cpp +++ b/analysis/runAnalysis.cpp @@ -336,6 +336,7 @@ runAnalysis::~runAnalysis( ) } void runAnalysis::finish( ) { + PROFILE_START("finish"); // Wait for the work items to finish d_tpool.wait_pool_finished(); // Clear the wait ids @@ -345,6 +346,7 @@ void runAnalysis::finish( ) d_wait_restart.reset(); // Syncronize MPI_Barrier( d_comm ); + PROFILE_STOP("finish"); } diff --git a/tests/lbpm_color_macro_simulator.cpp b/tests/lbpm_color_macro_simulator.cpp index 30ee02d4..e5bfb370 100644 --- a/tests/lbpm_color_macro_simulator.cpp +++ b/tests/lbpm_color_macro_simulator.cpp @@ -613,12 +613,10 @@ int main(int argc, char **argv) // Run the analysis analysis.run( timestep, *Averages, Phi, Pressure, Velocity, fq, Den ); - // Save the timers - if ( timestep%50==0 ) - PROFILE_SAVE("lbpm_color_simulator",1); } analysis.finish(); PROFILE_STOP("Loop"); + PROFILE_SAVE("lbpm_color_simulator",1); //************************************************************************ ScaLBL_DeviceBarrier(); MPI_Barrier(comm);