@@ -23,10 +23,6 @@ incflo::incflo()
23
23
// constructor. No valid BoxArray and DistributionMapping have been defined.
24
24
// But the arrays for them have been resized.
25
25
26
- amrex::Print () << std::endl
27
- << " Initializing AMR-Wind." << std::endl
28
- << std::endl;
29
-
30
26
// Check if dry run is requested and set up if so
31
27
CheckAndSetUpDryRun ();
32
28
@@ -287,8 +283,10 @@ void incflo::Evolve()
287
283
{
288
284
BL_PROFILE (" amr-wind::incflo::Evolve()" );
289
285
286
+ const amrex::Real init_time = amrex::ParallelDescriptor::second ();
287
+
290
288
while (m_time.new_timestep ()) {
291
- amrex::Real time0 = amrex::ParallelDescriptor::second ();
289
+ const amrex::Real time0 = amrex::ParallelDescriptor::second ();
292
290
293
291
regrid_and_update ();
294
292
@@ -302,7 +300,7 @@ void incflo::Evolve()
302
300
pre_advance_stage2 ();
303
301
}
304
302
305
- amrex::Real time1 = amrex::ParallelDescriptor::second ();
303
+ const amrex::Real time1 = amrex::ParallelDescriptor::second ();
306
304
// Advance to time t + dt
307
305
for (int fixed_point_iteration = 0 ;
308
306
fixed_point_iteration < m_fixed_point_iterations;
@@ -311,22 +309,27 @@ void incflo::Evolve()
311
309
}
312
310
313
311
amrex::Print () << std::endl;
314
- amrex::Real time2 = amrex::ParallelDescriptor::second ();
312
+ const amrex::Real time2 = amrex::ParallelDescriptor::second ();
315
313
post_advance_work ();
316
- amrex::Real time3 = amrex::ParallelDescriptor::second ();
314
+ const amrex::Real time3 = amrex::ParallelDescriptor::second ();
317
315
318
- amrex::Print () << " WallClockTime: " << m_time.time_index ()
319
- << " Pre: " << std::setprecision (3 ) << (time1 - time0)
316
+ amrex::Print () << " WallClockTime in Evolve() for step "
317
+ << m_time.time_index ()
318
+ << " : Pre: " << std::setprecision (3 ) << (time1 - time0)
320
319
<< " Solve: " << std::setprecision (4 ) << (time2 - time1)
321
320
<< " Post: " << std::setprecision (3 ) << (time3 - time2)
322
321
<< " Total: " << std::setprecision (4 ) << (time3 - time0)
323
322
<< std::endl;
324
-
325
- amrex::Print () << " Solve time per cell: " << std::setprecision (4 )
326
- << amrex::ParallelDescriptor::NProcs () *
327
- (time2 - time1) /
328
- static_cast <amrex::Real>(m_cell_count)
323
+ amrex::Print () << " Cumulative WallClockTime in Evolve(): "
324
+ << std::setprecision (4 ) << (time3 - init_time)
329
325
<< std::endl;
326
+
327
+ #ifdef AMREX_TINY_PROFILING
328
+ if (m_time.output_profiling_info ()) {
329
+ amrex::Print () << " \n Cumulative times reported by TinyProfiler:" ;
330
+ amrex::TinyProfiler::Finalize (true );
331
+ }
332
+ #endif
330
333
}
331
334
amrex::Print () << " \n ======================================================"
332
335
" ========================\n "
0 commit comments