Reenabling the idle time gathering code at the end of each phase.
authorIsaac Dooley <idooley2@krakenpf4.nics.utk.edu>
Mon, 21 Dec 2009 18:54:55 +0000 (13:54 -0500)
committerIsaac Dooley <idooley2@krakenpf4.nics.utk.edu>
Mon, 21 Dec 2009 18:54:55 +0000 (13:54 -0500)
src/ck-cp/controlPoints.C
src/ck-perf/trace-controlPoints.h

index 15520ecc15763a6275997ea141b30cad2fa539bd..42cf006db96a4eaba94fe1b7a32bb04ac831220d 100644 (file)
@@ -248,19 +248,6 @@ controlPointManager::controlPointManager(){
 
     CkPrintf("[%d] processControlPoints() haveGranularityCallback=%d frameworkShouldAdvancePhase=%d\n", CkMyPe(), (int)haveGranularityCallback, (int)frameworkShouldAdvancePhase);
 
-    if(shouldGatherMemoryUsage && CkMyPe() == 0 && !alreadyRequestedMemoryUsage){
-      alreadyRequestedMemoryUsage = true;
-      CkCallback *cb = new CkCallback(CkIndex_controlPointManager::gatherMemoryUsage(NULL), 0, thisProxy);
-      thisProxy.requestMemoryUsage(*cb);
-      delete cb;
-    }
-
-    if(shouldGatherUtilization && CkMyPe() == 0 && !alreadyRequestedIdleTime){
-      alreadyRequestedIdleTime = true;
-      CkCallback *cb = new CkCallback(CkIndex_controlPointManager::gatherIdleTime(NULL), 0, thisProxy);
-      thisProxy.requestIdleTime(*cb);
-      delete cb;
-    }
 
     //==========================================================================================
     // Print the data for each phase
@@ -485,6 +472,25 @@ controlPointManager::controlPointManager(){
   /// Called by either the application or the Control Point Framework to advance to the next phase  
   void controlPointManager::gotoNextPhase(){
 
+
+
+    if(shouldGatherMemoryUsage && CkMyPe() == 0 && !alreadyRequestedMemoryUsage){
+      alreadyRequestedMemoryUsage = true;
+      CkCallback *cb = new CkCallback(CkIndex_controlPointManager::gatherMemoryUsage(NULL), 0, thisProxy);
+      thisProxy.requestMemoryUsage(*cb);
+      delete cb;
+    }
+
+    if(shouldGatherUtilization && CkMyPe() == 0 && !alreadyRequestedIdleTime){
+      alreadyRequestedIdleTime = true;
+      CkCallback *cb = new CkCallback(CkIndex_controlPointManager::gatherIdleTime(NULL), 0, thisProxy);
+      thisProxy.requestIdleTime(*cb);
+      delete cb;
+    }
+
+
+
+
     LBDatabase * myLBdatabase = LBDatabaseObj();
 
 #if CMK_LBDB_ON && 0
@@ -554,7 +560,9 @@ controlPointManager::controlPointManager(){
     idle[1] = i;
     idle[2] = i;
     
-    //    localControlPointTracingInstance()->resetTimings();
+    CkPrintf("[%d] idleRatio=%f\n", CkMyPe(), i);
+    
+    localControlPointTracingInstance()->resetTimings();
 
     contribute(3*sizeof(double),idle,idleTimeReductionType, cb);
   }
index e27cc67458d4d9dc0cba5b3dcb3e4e9870756b20..6b07ac329574a4f0447eaf7cff19a95be7309fc3 100644 (file)
@@ -23,7 +23,7 @@
  *  Only the more common hooks are listened to in this module.
  */
 class TraceControlPoints : public Trace {
- public:
+ private:
 
   double lastBeginExecuteTime;
   int lastbeginMessageSize;
@@ -31,6 +31,7 @@ class TraceControlPoints : public Trace {
   /** The amount of time spent executing entry methods */
   double totalEntryMethodTime;
 
+
   /** The start of the idle region */
   double lastBeginIdle;