add LBTurnCommOn and Off to turn Comm statistics collection on and off at runtime.
authorGengbin Zheng <gzheng@illinois.edu>
Mon, 8 Oct 2012 05:48:20 +0000 (00:48 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Mon, 8 Oct 2012 05:48:20 +0000 (00:48 -0500)
src/ck-ldb/LBDatabase.C
src/ck-ldb/LBDatabase.h

index 5ff8559ef4b3d5d2316d2892af57c87e3f6ebab1..ca2cc0667a991a39a1acf487b9b3743d33f9a59d 100644 (file)
@@ -513,6 +513,19 @@ extern "C" void LBTurnInstrumentOff() {
     _lb_args.statsOn() = 0;
 #endif
 }
+
+extern "C" void LBTurnCommOn() {
+#if CMK_LBDB_ON
+  _lb_args.traceComm() = 1;
+#endif
+}
+
+extern "C" void LBTurnCommOff() {
+#if CMK_LBDB_ON
+  _lb_args.traceComm() = 0;
+#endif
+}
+
 void LBClearLoads() {
 #if CMK_LBDB_ON
   LBDatabase::Object()->ClearLoads(); 
index 9b02f0d67c03076ad8e0db0d97f2de2ec3228b7e..32afce34576d8cb63c4f987a0ed83cb61cb4ebbd 100644 (file)
@@ -399,6 +399,8 @@ void LBSetPeriod(double second);
 
 extern "C" void LBTurnInstrumentOn();
 extern "C" void LBTurnInstrumentOff();
+extern "C" void LBTurnCommOn();
+extern "C" void LBTurnCommOff();
 void LBClearLoads();
 
 inline LBDatabase* LBDatabaseObj() { return LBDatabase::Object(); }