aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOScalar
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-08-25 06:13:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-08-25 06:13:00 +0000
commit9cefad6299b34c7448abe5bea8a4ba8aff0dccda (patch)
treed1d167be322dd180bccc0028ee35a5d1cda36174 /Carpet/CarpetIOScalar
parent3d3d24eccfa90cc55683151697f0d64e1ae4a2b7 (diff)
CarpetIOScalar: Add a timer around OutputGH
darcs-hash:20070825061335-dae7b-cb4eae5b88b08556a827c0454c97f885e0b3df93.gz
Diffstat (limited to 'Carpet/CarpetIOScalar')
-rw-r--r--Carpet/CarpetIOScalar/interface.ccl1
-rw-r--r--Carpet/CarpetIOScalar/src/ioscalar.cc4
2 files changed, 5 insertions, 0 deletions
diff --git a/Carpet/CarpetIOScalar/interface.ccl b/Carpet/CarpetIOScalar/interface.ccl
index de08e9614..6fdca99b9 100644
--- a/Carpet/CarpetIOScalar/interface.ccl
+++ b/Carpet/CarpetIOScalar/interface.ccl
@@ -7,6 +7,7 @@ CCTK_REAL last_output_time TYPE=scalar
CCTK_INT this_iteration TYPE=scalar
USES INCLUDE HEADER: carpet_typecase.hh
+USES INCLUDE HEADER: CarpetTimers.hh
# function to check whether existing output files should be truncated or not
CCTK_INT FUNCTION IO_TruncateOutputFiles \
diff --git a/Carpet/CarpetIOScalar/src/ioscalar.cc b/Carpet/CarpetIOScalar/src/ioscalar.cc
index 0c28dd943..618c1ddb5 100644
--- a/Carpet/CarpetIOScalar/src/ioscalar.cc
+++ b/Carpet/CarpetIOScalar/src/ioscalar.cc
@@ -18,6 +18,7 @@
#include "CactusBase/IOUtil/src/ioutil_Utils.h"
#include "carpet.hh"
+#include "CarpetTimers.hh"
@@ -148,11 +149,14 @@ namespace CarpetIOScalar {
int
OutputGH (const cGH * const cctkGH)
{
+ static Carpet::Timer timer ("CarpetIOScalar::OutputGH");
+ timer.start();
for (int vindex=0; vindex<CCTK_NumVars(); ++vindex) {
if (TimeToOutput(cctkGH, vindex)) {
TriggerOutput(cctkGH, vindex);
}
}
+ timer.stop();
return 0;
}