Changes for out-of-core emulation in BigSim. Details could be referred to Chao Mei...
[charm.git] / src / ck-core / ckarray.C
index fca3a835ade61e56f5127a155efbba4d9603d50b..a37dede755048a3ffddb853b255b07975e210d6b 100644 (file)
@@ -238,14 +238,21 @@ void ArrayElement::ckJustMigrated(void) {
              if (!l->ckElementArriving(this)) return;);
 }
 
+void ArrayElement::ckJustRestored(void) {
+    CkMigratable::ckJustRestored();
+    //empty for out-of-core emulation
+}
+
 CK_REDUCTION_CONTRIBUTE_METHODS_DEF(ArrayElement,thisArray,
    *(contributorInfo *)&listenerData[thisArray->reducer->ckGetOffset()],true);
 
 /// Remote method: calls destructor
 void ArrayElement::ckDestroy(void)
 {
-       CK_ARRAYLISTENER_LOOP(thisArray->listeners,
+       if(BgOutOfCoreFlag!=1){ //in case of taking core out of memory
+           CK_ARRAYLISTENER_LOOP(thisArray->listeners,
                           l->ckElementDied(this));
+       }
        CkMigratable::ckDestroy();
 }