aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2010-02-13 18:41:13 -0600
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 16:45:28 +0000
commit4f068a75d29ed337759fb61732361223fe32d973 (patch)
treee961a78657301c576322e3e5dabd61b4c28aac17 /Carpet/CarpetLib/src
parent06238e6cf8c1fd51ee4baab9604aa75d58d7437d (diff)
CarpetLib: New parameter use_ipm_timing_regions
Use IPM's timing regions in CarpetLib's timers (if built with IPM).
Diffstat (limited to 'Carpet/CarpetLib/src')
-rw-r--r--Carpet/CarpetLib/src/timestat.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/timestat.cc b/Carpet/CarpetLib/src/timestat.cc
index 1115a6663..b6ef287f3 100644
--- a/Carpet/CarpetLib/src/timestat.cc
+++ b/Carpet/CarpetLib/src/timestat.cc
@@ -211,6 +211,9 @@ namespace CarpetLib {
DECLARE_CCTK_PARAMETERS;
assert (not running);
running = true;
+ if (use_ipm_timing_regions) {
+ MPI_Pcontrol (+1, timername.c_str());
+ }
starttime = call_timer ();
}
@@ -224,6 +227,9 @@ namespace CarpetLib {
assert (running);
running = false;
ticks const endtime = call_timer ();
+ if (use_ipm_timing_regions) {
+ MPI_Pcontrol (-1, timername.c_str());
+ }
addstat (elapsed (endtime, starttime), b);
}