Minor performance fix with Timer

This commit is contained in:
Mark Berrill 2018-03-08 16:04:57 -05:00
parent dd21dd3985
commit 5772b4cdb0
2 changed files with 3 additions and 3 deletions

View File

@ -336,6 +336,7 @@ runAnalysis::~runAnalysis( )
} }
void runAnalysis::finish( ) void runAnalysis::finish( )
{ {
PROFILE_START("finish");
// Wait for the work items to finish // Wait for the work items to finish
d_tpool.wait_pool_finished(); d_tpool.wait_pool_finished();
// Clear the wait ids // Clear the wait ids
@ -345,6 +346,7 @@ void runAnalysis::finish( )
d_wait_restart.reset(); d_wait_restart.reset();
// Syncronize // Syncronize
MPI_Barrier( d_comm ); MPI_Barrier( d_comm );
PROFILE_STOP("finish");
} }

View File

@ -613,12 +613,10 @@ int main(int argc, char **argv)
// Run the analysis // Run the analysis
analysis.run( timestep, *Averages, Phi, Pressure, Velocity, fq, Den ); analysis.run( timestep, *Averages, Phi, Pressure, Velocity, fq, Den );
// Save the timers
if ( timestep%50==0 )
PROFILE_SAVE("lbpm_color_simulator",1);
} }
analysis.finish(); analysis.finish();
PROFILE_STOP("Loop"); PROFILE_STOP("Loop");
PROFILE_SAVE("lbpm_color_simulator",1);
//************************************************************************ //************************************************************************
ScaLBL_DeviceBarrier(); ScaLBL_DeviceBarrier();
MPI_Barrier(comm); MPI_Barrier(comm);