fixed several compile errors when CMK_MEM_CHECKPOINT is off.
authorGengbin Zheng <gzheng@illinois.edu>
Fri, 19 Dec 2003 07:52:36 +0000 (07:52 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Fri, 19 Dec 2003 07:52:36 +0000 (07:52 +0000)
src/ck-core/charm++.h
src/ck-core/ckmemcheckpoint.C

index 5842a125c9a5b2a0e9a0e319f5741255be8be26b..2e5da96331391b5f159fea143497f126917b1756 100644 (file)
@@ -742,10 +742,7 @@ class CkThrCallArg {
 
 extern void CkStartQD(const CkCallback& cb);
 
-#if CMK_MEM_CHECKPOINT
 #include "ckmemcheckpoint.h"
-#endif
-
 #include "readonly.h"
 #include "ckarray.h"
 #include "ckstream.h"
index 35da73554081ee315c93ce462e799ae68e5406ff..4b9b9de16913241e1f617d0a5d488c645e45c74c 100644 (file)
@@ -42,12 +42,15 @@ CkCallback CkMemCheckPT::cpCallback;    // static
 
 CpvStaticDeclare(CkProcCheckPTMessage*, procChkptBuf);
 
+int cur_restart_phase = 0;
+
 // compute the backup processor
 // FIXME: avoid crashed processors
 inline int ChkptOnPe() { return (CkMyPe()+1)%CkNumPes(); }
 
 // called in array element constructor
 // choose and register with 2 buggies for checkpoiting 
+#if CMK_MEM_CHECKPOINT
 void ArrayElement::init_checkpt() {
        // CmiPrintf("[%d] ArrayElement::init_checkpt %d\n", CkMyPe(), info.fromMigration);
         budPEs[0] = (CkMyPe()-1+CkNumPes())%CkNumPes();
@@ -86,10 +89,12 @@ void ArrayElement::inmem_checkpoint(CkArrayCheckPTReqMessage *m) {
   checkptMgr.recvData(msg, 2, budPEs);
   delete m;
 }
+#endif
 
 // called by checkpoint mgr to restore an array element
 void CkMemCheckPT::inmem_restore(CkArrayCheckPTMessage *m) 
 {
+#if CMK_MEM_CHECKPOINT
   //DEBUGF("[%d] inmem_restore restore", CmiMyPe());  m->index.print();
   PUP::fromMem p(m->packData);
   CkLocMgr *mgr = CProxy_CkLocMgr(m->locMgr).ckLocalBranch();
@@ -108,6 +113,7 @@ void CkMemCheckPT::inmem_restore(CkArrayCheckPTMessage *m)
   contributorInfo *c=(contributorInfo *)&elt->listenerData[elt->thisArray->reducer->ckGetOffset()];
   if (c) c->redNo = 0;
 */
+#endif
 }
 
 CkMemCheckPT::CkMemCheckPT()