support for lb
authorXiang Ni <xiangni2@illinois.edu>
Sun, 16 Dec 2012 16:33:12 +0000 (10:33 -0600)
committerXiang Ni <xiangni2@illinois.edu>
Sun, 16 Dec 2012 16:33:12 +0000 (10:33 -0600)
src/ck-core/cklocation.C
src/ck-core/ckmemcheckpoint.C
src/ck-ldb/LBDBManager.C
src/ck-ldb/LBDBManager.h
src/ck-ldb/LBDatabase.h

index 0230b9388129581fb2f001227354fdb88d1bdd5b..c8c1f2362bffe67674df67b1afb64a0167efbe2f 100644 (file)
@@ -1128,6 +1128,7 @@ CkMigratable::~CkMigratable() {
 #if CMK_LBDB_ON 
        if (barrierRegistered) {
          DEBL((AA"Removing barrier for element %s\n"AB,idx2str(thisIndexMax)));
+         CkPrintf("Removing barrier for element %s\n",idx2str(thisIndexMax));
          if (usesAtSync)
                myRec->getLBDB()->RemoveLocalBarrierClient(ldBarrierHandle);
          else
index 92f6506540b249bff0277f37cf73f397179a77c0..35482d4d0b3c04728add73e5f0c6880c70209994 100644 (file)
@@ -739,7 +739,7 @@ void CkMemCheckPT::RollBack(){
        //_handleProcData(p);
        
        //destroy array elements
-       //CKLOCMGR_LOOP(mgr->flushLocalRecs(););
+       CKLOCMGR_LOOP(mgr->flushLocalRecs(););
          int numGroups = CkpvAccess(_groupIDTable)->size();
          for(int i=0;i<numGroups;i++) {
                CkGroupID gID = (*CkpvAccess(_groupIDTable))[i];
@@ -761,7 +761,7 @@ void CkMemCheckPT::RollBack(){
                        p|idx;
                        CkLocMgr * mgr = (CkLocMgr *)CkpvAccess(_groupTable)->find(gID).getObj();
                        CmiAssert(mgr);
-                       mgr->resume(idx,p,CmiFalse,CmiTrue,CmiFalse);
+                       mgr->resume(idx,p,CmiFalse,CmiTrue,CmiTrue);
                }
        }
        CkCallback cb(CkReductionTarget(CkMemCheckPT,recoverFromSoftFailure),thisProxy);
@@ -1056,6 +1056,7 @@ void CkMemCheckPT::restart(int diePe)
   if(CmiNumPartition()==1){
        barrier(CkCallback(CkIndex_CkMemCheckPT::removeArrayElements(), thisProxy));
   }else{
+       CKLOCMGR_LOOP(mgr->flushLocalRecs(););
        barrier(CkCallback(CkIndex_CkMemCheckPT::resetReductionMgr(), thisProxy));
   }
 #endif
@@ -1316,7 +1317,7 @@ void CkMemCheckPT::recoverAll(double * packData,CkVec<CkGroupID> * gmap, CkVec<C
                                        mgr->resume(idx,p,CmiFalse,CmiTrue,CmiTrue);
                                }
                        else{
-                                       mgr->resume(idx,p,CmiFalse,CmiTrue,CmiFalse);
+                                       mgr->resume(idx,p,CmiFalse,CmiTrue,CmiTrue);
                                }
                        }
 #endif
index f1da1a1ec40981304340a31075b7eeb0bb7c10c3..ba65a5ddf70bfa911aa969ce096a3bfb7ee1105e 100644 (file)
@@ -619,7 +619,7 @@ void LocalBarrier::AtBarrier(LDBarrierClient h)
   (clients[h.serial])->refcount++;
   at_count++;
   //if(CmiMyPartition()==1)
       CkPrintf("[%d] at barrier\n",CkMyPe());
CkPrintf("[%d][%d] at barrier\n",CmiMyPartition(),CkMyPe());
   CheckBarrier();
 }
 
index 10e16a5b009f4a4c1804ac3c52125755940f8f92..255761b93ead440807596d31fba5090d4d95a1b1 100644 (file)
@@ -202,8 +202,7 @@ public:
        { localBarrier.TurnOffReceiver(h); };
   inline void AtLocalBarrier(LDBarrierClient h) 
        { 
-                       if(CmiMyPartition()==1)
-                               CkPrintf("[%d] LBDBManager local barrier\n",CkMyPe());
+                       CkPrintf("[%d][%d] LBDBManager local barrier\n",CmiMyPartition(),CkMyPe());
                   if (useBarrier) 
                   localBarrier.AtBarrier(h); 
           };
index b2c0791b80a7104f54a16acda755c521ab2ca16b..1b7fad3318123706af1e7cfff7aa910c4927933d 100644 (file)
@@ -348,8 +348,7 @@ public:
   };
 
   inline void AtLocalBarrier(LDBarrierClient h) {
-  if(CmiMyPartition()==1)
-       CkPrintf("[%d]local barrier\n",CkMyPe());
+    CkPrintf("[%d][%d]local barrier\n",CmiMyPartition(),CkMyPe());
          LDAtLocalBarrier(myLDHandle,h);
   }
   inline void LocalBarrierOn(void) { LDLocalBarrierOn(myLDHandle); };