aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/src/Evolve.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-05-26 16:41:45 -0400
committerErik Schnetter <schnetter@gmail.com>2013-05-26 16:41:45 -0400
commit3f3b57db6d8238c2b94502e278d71ffbc186d3d8 (patch)
tree4219a818e8e28b589239b10de1f9ca22cbf4ba03 /Carpet/Carpet/src/Evolve.cc
parent2f34a3bc2b28761ffc9772446b54b4dbf29a065b (diff)
Carpet: Provide global instead of process-local timer output
Reduce timer values across all processes before output, reporting both maximum and average. TimerNode::getGlobalTime: new function
Diffstat (limited to 'Carpet/Carpet/src/Evolve.cc')
-rw-r--r--Carpet/Carpet/src/Evolve.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/Carpet/Carpet/src/Evolve.cc b/Carpet/Carpet/src/Evolve.cc
index 37eaecdcc..0a959b48c 100644
--- a/Carpet/Carpet/src/Evolve.cc
+++ b/Carpet/Carpet/src/Evolve.cc
@@ -98,8 +98,11 @@ namespace Carpet {
cctkGH->cctk_iteration % do_every == 0)
{
TimerNode *et = main_timer_tree.root->getChildTimer("Evolve");
- et->print(cout, et->getTime(), 0, timer_tree_threshold_percentage, timer_tree_output_precision);
- mode_timer_tree.root->print(cout, mode_timer_tree.root->getTime(), 0, timer_tree_threshold_percentage, timer_tree_output_precision);
+ double total_avg, total_max;
+ et->getGlobalTime(total_avg, total_max);
+ et->print(cout, total_max, 0, timer_tree_threshold_percentage, timer_tree_output_precision);
+ mode_timer_tree.root->getGlobalTime(total_avg, total_max);
+ mode_timer_tree.root->print(cout, total_max, 0, timer_tree_threshold_percentage, timer_tree_output_precision);
}
timer.stop();
}