1. a complete pup for CkReductionMgr (lcount/gcount), which fixed a bug in restart...
[charm.git] / src / ck-core / ckcheckpoint.C
index d501150be9fc65fe186a1e242b8b286c31ad01dd..e2e5630bde59a443401395d2844daa2253c16494 100644 (file)
@@ -29,6 +29,8 @@ typedef struct _GroupInfo{
 PUPbytes(GroupInfo)
 PUPmarshall(GroupInfo)
 
+int _inrestart = 0;
+
 // help class to find how many array elements
 class ElementCounter : public CkLocIterator {
 private:
@@ -424,6 +426,8 @@ void CkRestartMain(const char* dirname){
        char filename[1024];
        CkCallback cb;
        
+        _inrestart = 1;
+
        // restore readonlys
        sprintf(filename,"%s/RO.dat",dirname);
        FILE* fRO = fopen(filename,"rb");
@@ -489,6 +493,8 @@ void CkRestartMain(const char* dirname){
             }
          }
 
+        _inrestart = 0;
+
        _initDone();
 
        if(CkMyPe()==0) {