implement CkDieNow function for net version too
authorGengbin Zheng <gzheng@illinois.edu>
Mon, 31 Oct 2011 00:23:07 +0000 (19:23 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Mon, 31 Oct 2011 00:23:07 +0000 (19:23 -0500)
src/ck-core/ckmemcheckpoint.C
src/ck-core/ckmemcheckpoint.h

index 93b619bc24c35f48b77e6b8877b402caed679a24..df7ce455eb49e268b55b9417aa50fce79dbc5b18 100644 (file)
@@ -1059,6 +1059,8 @@ static void restartBcastHandler(char *msg)
   char *restartmsg = (char*)CmiAlloc(CmiMsgHeaderSizeBytes);
   CmiSetHandler(restartmsg, restartBeginHandlerIdx);
   CmiSyncSendAndFree(_diePE, CmiMsgHeaderSizeBytes, (char *)restartmsg);
+
+  checkpointed = 0;
 #endif
 }
 
@@ -1422,6 +1424,17 @@ void readKillFile(){
         }
         fclose(fp);
 }
+
+#if ! CMK_CONVERSE_MPI
+void CkDieNow()
+{
+         // ignored for non-mpi version
+        CmiPrintf("[%d] die now.\n", CmiMyPe());
+        killTime = CmiWallTimer()+0.001;
+        CcdCallFnAfter(killLocal,NULL,1);
+}
+#endif
+
 #endif
 
 #include "CkMemCheckpoint.def.h"
index 3d5f989d673088c7fe3570aeb312d24c89ba322e..bc5dcdd3320c5bc23775bbd4cc28d2a4631d32b6 100644 (file)
@@ -119,8 +119,6 @@ void CkStartMemCheckpoint(CkCallback &cb);
 extern "C" int CkInRestarting(); 
 extern "C" int CkHasCheckpoints();
 
-#if CMK_CONVERSE_MPI
 extern "C" void CkDieNow();
-#endif
 
 #endif