minor
authorXiang Ni <xiangni2@illinois.edu>
Sun, 13 Jan 2013 22:21:44 +0000 (16:21 -0600)
committerXiang Ni <xiangni2@illinois.edu>
Sun, 13 Jan 2013 22:21:44 +0000 (16:21 -0600)
src/ck-core/ckmemcheckpoint.C

index 510fbd0c6a10ddc035c01720c76c568010676c74..bd30895ed2ae1d9413cd48d83a58bfe7c82b3c5b 100644 (file)
@@ -1815,7 +1815,9 @@ void CkMemCheckPT::RollBack(){
         CmiPrintf("replicaAlive %d\n",CkMemCheckPT::replicaAlive);
         fflush(stdout);
       }
-      find_spare_mpirank(diePe,CmiMyPartition()^1);
+      if(CpvAccess(resilience)!=1||CkMyPe()!=diePe){
+        find_spare_mpirank(diePe,CmiMyPartition()^1);
+      }
       //broadcast to my partition to get local max iter
       if(CpvAccess(resilience)!=1){
         CkMemCheckPT::replicaAlive = 0;
@@ -1926,6 +1928,7 @@ void CkMemCheckPT::RollBack(){
             CmiPrintf("[%d] sendArraydata after request\n",CmiMyPe());
         }
       }else{
+        find_spare_mpirank(CkMyPe(),CmiMyPartition()^1);
         int pointer = CpvAccess(curPointer)^1;
         CkCheckPTMessage * procMsg = (CkCheckPTMessage *)CkCopyMsg((void **)&CpvAccess(localProcChkpBuf)[pointer]);
         procMsg->pointer = pointer;