diff options
author | 2018-06-14 16:07:22 +0000 | |
---|---|---|
committer | 2018-06-14 16:07:22 +0000 | |
commit | be7dcc79e08e41d6225b2b4f4550fd1f15f39dc8 (patch) | |
tree | 0d03cff00f3c8a80c24df5acfd96e76646ec60ca /Source/WarpXEvolve.cpp | |
parent | 97a3dbed69da2b10797adf6bf6944b327dc06d2e (diff) | |
parent | e28347a3d18f5cdf954af75393dbcc5223778d34 (diff) | |
download | WarpX-be7dcc79e08e41d6225b2b4f4550fd1f15f39dc8.tar.gz WarpX-be7dcc79e08e41d6225b2b4f4550fd1f15f39dc8.tar.zst WarpX-be7dcc79e08e41d6225b2b4f4550fd1f15f39dc8.zip |
Merged in print_time (pull request #75)
Print the walltime
Approved-by: Weiqun Zhang <WeiqunZhang@lbl.gov>
Approved-by: Maxence Thevenet <mthevenet@lbl.gov>
Diffstat (limited to 'Source/WarpXEvolve.cpp')
-rw-r--r-- | Source/WarpXEvolve.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/WarpXEvolve.cpp b/Source/WarpXEvolve.cpp index 350376824..0dfe752ac 100644 --- a/Source/WarpXEvolve.cpp +++ b/Source/WarpXEvolve.cpp @@ -109,8 +109,8 @@ WarpX::EvolveES (int numsteps) { bool to_make_plot = (plot_int > 0) && ((step+1) % plot_int == 0); - amrex::Print()<< "STEP " << step+1 << " ends." << " TIME = " << cur_time - << " DT = " << dt[0] << "\n"; + amrex::Print()<< "STEP " << step+1 << " ends." << " TIME = " + << cur_time << " DT = " << dt[0] << "\n"; // sync up time for (int i = 0; i <= finest_level; ++i) { @@ -167,6 +167,7 @@ WarpX::EvolveEM (int numsteps) } bool max_time_reached = false; + Real walltime, walltime_start = ParallelDescriptor::second(); for (int step = istep[0]; step < numsteps_max && cur_time < stop_time; ++step) { if (warpx_py_print_step) { @@ -268,6 +269,9 @@ WarpX::EvolveEM (int numsteps) amrex::Print()<< "STEP " << step+1 << " ends." << " TIME = " << cur_time << " DT = " << dt[0] << "\n"; + walltime = ParallelDescriptor::second() - walltime_start; + amrex::Print()<< "Walltime = " << walltime + << " s; Avg. per step = " << walltime/(step+1) << " s\n"; // sync up time for (int i = 0; i <= max_level; ++i) { |