cleanup
authorHarshitha <gplkrsh2@illinois.edu>
Mon, 15 Oct 2012 02:29:34 +0000 (21:29 -0500)
committerHarshitha <gplkrsh2@illinois.edu>
Mon, 15 Oct 2012 02:29:34 +0000 (21:29 -0500)
src/ck-ldb/AdaptiveLB.h
src/ck-ldb/BaseLB.C
src/ck-ldb/BaseLB.h

index 74640d79aa930bcaf457e669ddd6ec7c053a9126..35bdd11967d725fcdad156704d7cd4053be00a8e 100644 (file)
@@ -23,7 +23,7 @@ public:
 protected:
   virtual CmiBool QueryBalanceNow(int) { return CmiTrue; };  
   virtual void work(LDStats* stats);
-  void computeNonlocalComm(long long &nmsgs, long long &nbytes);
+//  void computeNonlocalComm(long long &nmsgs, long long &nbytes);
 
 private:  
 //  CProxy_CentralLB thisProxy;
index 4fbed6d5a8652226836b6373ed9a5972723d22d1..162a9ff6f3bd0958d81bb5acc08e42330b372aa4 100644 (file)
@@ -224,77 +224,6 @@ void BaseLB::LDStats::clearCommHash() {
   }
 }
 
-// Get the nonlocal communication
-void BaseLB::LDStats::computeComm(long &nmsgs, long long &nbytes)
-{
-#if CMK_LBDB_ON
-       nmsgs = 0;
-       nbytes = 0;
-
-       makeCommHash();
-
-       int mcast_count = 0;
-        for (int cidx=0; cidx < n_comm; cidx++) {
-           LDCommData& cdata = commData[cidx];
-           int senderPE, receiverPE;
-           if (cdata.from_proc())
-             senderPE = cdata.src_proc;
-           else {
-             int idx = getHash(cdata.sender);
-             if (idx == -1) continue;    // sender has just migrated?
-             senderPE = to_proc[idx];
-             CmiAssert(senderPE != -1);
-           }
-           CmiAssert(senderPE < nprocs() && senderPE >= 0);
-
-            // find receiver: point-to-point and multicast two cases
-           int receiver_type = cdata.receiver.get_type();
-           if (receiver_type == LD_PROC_MSG || receiver_type == LD_OBJ_MSG) {
-              if (receiver_type == LD_PROC_MSG)
-               receiverPE = cdata.receiver.proc();
-              else  {  // LD_OBJ_MSG
-               int idx = getHash(cdata.receiver.get_destObj());
-               if (idx == -1) {                // receiver outside this domain
-                 if (complete_flag) continue;
-                 else receiverPE = -1;
-               }
-               else {
-                 receiverPE = to_proc[idx];
-                  CmiAssert(receiverPE < nprocs() && receiverPE >= 0);
-               }
-              }
-             if(senderPE != receiverPE)
-             {
-               nmsgs += cdata.messages;
-               nbytes += cdata.bytes;
-             }
-           }
-            else if (receiver_type == LD_OBJLIST_MSG) {
-              int nobjs;
-              LDObjKey *objs = cdata.receiver.get_destObjs(nobjs);
-             mcast_count ++;
-             CkVec<int> pes;
-             for (int i=0; i<nobjs; i++) {
-               int idx = getHash(objs[i]);
-               CmiAssert(idx != -1);
-               if (idx == -1) continue;    // receiver has just been removed?
-               receiverPE = to_proc[idx];
-               CmiAssert(receiverPE < nprocs() && receiverPE >= 0);
-               int exist = 0;
-               for (int p=0; p<pes.size(); p++) 
-                 if (receiverPE == pes[p]) { exist=1; break; }
-               if (exist) continue;
-               pes.push_back(receiverPE);
-               if(senderPE != receiverPE)
-               {
-                 nmsgs += cdata.messages;
-                 nbytes += cdata.bytes;
-               }
-              }
-           }
-       }   // end of for
-#endif
-}
 void BaseLB::LDStats::computeNonlocalComm(int &nmsgs, int &nbytes)
 {
 #if CMK_LBDB_ON
index 993e52cab37911d3777978409d109358e4e9e39a..0c7f156847583d90aa775d99985c4a25c444305d 100644 (file)
@@ -137,7 +137,6 @@ public:
       for (int i=0; i<nprocs(); i++) procs[i].clearBgLoad();
     }
     void computeNonlocalComm(int &nmsgs, int &nbytes);
-    void computeComm(long &nmsgs, long long &nbytes);
     double computeAverageLoad();
     void normalize_speed();
     void print();