Does asynchronous collection of lb stats and sends ideal lb period
authorHarshitha <gplkrsh2@illinois.edu>
Sun, 4 Mar 2012 21:57:03 +0000 (15:57 -0600)
committerHarshitha <gplkrsh2@illinois.edu>
Sun, 4 Mar 2012 21:57:03 +0000 (15:57 -0600)
src/ck-ldb/CentralLB.C
src/ck-ldb/CentralLB.ci
src/ck-ldb/CentralLB.h

index cb85e021525964601c22baa581f8e1d65e6a650d..d4d051d98287f3cf4c075422b7b943ff2dec81c7 100644 (file)
@@ -52,7 +52,6 @@ int lb_no_iterations = -1;
 double cur_max_pe_load = 0.0;
 double cur_avg_pe_load = 0.0;
 double prev_load = 0.0;
-bool informed = false;
 
 struct AdaptiveData {
   int iteration;
@@ -244,7 +243,6 @@ void CentralLB::ProcessAtSync()
   prev_load = 0.0;
   lb_ideal_period = INT_MAX;
   local_state = OFF;
-  informed = false;
 
 
 #if CMK_LBDB_ON
@@ -373,7 +371,6 @@ void CentralLB::ReceiveMinStats(CkReductionMsg *msg) {
   // step immediately after load balancing, carry out load balancing
   if (max/avg >= 1.1 && adaptive_lbdb.history_data.size() > 4) {
     CkPrintf("Carry out load balancing step\n");
-    informed = true;
     lb_ideal_period = iteration_n + 1;
     thisProxy.LoadBalanceDecision(lb_ideal_period);
     return;
@@ -381,7 +378,6 @@ void CentralLB::ReceiveMinStats(CkReductionMsg *msg) {
 
   // Generate the plan for the adaptive strategy
   if (generatePlan()) {
-    informed = true;
     thisProxy.LoadBalanceDecision(lb_ideal_period);
   }
 }
index 3b0f1ad4ccdba2fd43c9559a2e7b8495c36cf9c3..ac6504062e57a4195a1ec2cf7b764ae0428025fd 100644 (file)
@@ -23,8 +23,8 @@ group [migratable] CentralLB : BaseLB {
   entry void ReceiveStatsViaTree(CkMarshalledCLBStatsMessage data);
   entry void ReceiveCounts(CkReductionMsg *);
   entry void ReceiveMinStats(CkReductionMsg *msg);
-  entry void ReceiveIterationNo(CkReductionMsg *msg);
   entry void LoadBalanceDecision(int period);
+  entry void ReceiveIterationNo(CkReductionMsg *msg);
   entry void LoadBalance(void);
   entry void ResumeClients(int);
   entry void ResumeClients(CkReductionMsg *);
index 6ab41381bbe1e6e1fd2086f8faa9642ebf059b10..ba5822b8f331bda838c2066d7eb654ce1a4329ab 100644 (file)
@@ -99,7 +99,7 @@ public:
   void ResumeClients(int);                      // Resuming clients needs
 
   void LoadBalanceDecision(int);
-  void ReceiveIterationNo(CkReductionMsg *msg);
+  void ReceiveIterationNo(CkReductionMsg *msg); // Receives the current iter no
                                                // to be resumed via message
   void ResumeClients(CkReductionMsg *);
   void ReceiveMigration(LBMigrateMsg *);       // Receive migration data