fix for migration
[charm.git] / src / libs / ck-libs / tcharm / tcharm.C
index 184721eafddb1b6fb8ca9a43316a1a44babd83b7..aca121847d7ffba30c68799312af9a1afe2551f3 100644 (file)
@@ -196,8 +196,8 @@ TCharm::TCharm(TCharmInitMsg *initMsg_)
   nUd=0;
   usesAtSync=CmiTrue;
   run();
-  //CkCallback cb(CkIndex_TCharm::ResumeFromChkpSync(),thisProxy(thisIndex));
-  //setChkpResumeClient(cb);
+  CkCallback cb(CkIndex_TCharm::ResumeFromChkpSync(),thisProxy(thisIndex));
+  setChkpResumeClient(cb);
 }
 
 TCharm::TCharm(CkMigrateMessage *msg)
@@ -224,15 +224,15 @@ void checkPupMismatch(PUP::er &p,int expected,const char *where)
 void TCharm::pup(PUP::er &p) {
 //Pup superclass
   ArrayElement1D::pup(p);
-
   //BIGSIM_OOC DEBUGGING
   //if(!p.isUnpacking()){
   //  CmiPrintf("TCharm[%d] packing: ", thisIndex);
   //  CthPrintThdStack(tid);
   //}
-  if(p.isUnpacking()&&CkInRestarting()){
-//    CkCallback cb(CkIndex_TCharm::ResumeFromChkpSync(),thisProxy(thisIndex));
-//    setChkpResumeClient(cb);
+  //if(p.isUnpacking()&&CkInRestarting()){
+  if(p.isUnpacking()){
+    CkCallback cb(CkIndex_TCharm::ResumeFromChkpSync(),thisProxy(thisIndex));
+    setChkpResumeClient(cb);
   }
   checkPupMismatch(p,5134,"before TCHARM");
 #if (defined(_FAULT_MLOG_) || defined(_FAULT_CAUSAL_))
@@ -595,16 +595,7 @@ void TCharm::ResumeFromSync(void)
 
 void TCharm::ResumeFromChkpSync(void)
 {
-  if(!isStopped){
-    CmiPrintf("[%d][%d]haven't stopped\n",CmiMyPartition(),CkMyPe());
-    fflush(stdout);
-  }
-//TCharm::get()->stop();
   start();
-  if(CmiMyPartition()==1){
-//    CmiPrintf("[%d][%d]ResumeFromChkpSync\n",CmiMyPartition(),CkMyPe());
-//    fflush(stdout);
-  }
 }
 
 /****** TcharmClient ******/