support for lb
[charm.git] / src / ck-core / ckmemcheckpoint.C
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