Fixing another problem with the fortran interfaces. This time the all caps and lowerc...
[charm.git] / src / libs / ck-libs / idxl / idxl.C
index 9b8e99e5dbc9a5dfa69b90f668932c7a51a0ed93..cac63755e7ca86a12de04b7b474739f25f6c1a99 100644 (file)
@@ -68,8 +68,11 @@ void IDXL_Chunk::pup(PUP::er &p) {
        p|mpi_comm;
 
        p|layouts;
        p|mpi_comm;
 
        p|layouts;
-       if (currentComm && !currentComm->isComplete()) CkAbort("Cannot migrate with ongoing IDXL communication");
-       
+       if (currentComm && !currentComm->isComplete()){
+         CkPrintf("ERROR: Cannot migrate with ongoing IDXL communication: currentComm=%p ispacking=%d isunpacking=%d\n", currentComm, (int)p.isPacking(), (int)p.isUnpacking());
+         CkAbort("Cannot migrate with ongoing IDXL communication");
+       }       
+
        //Pack the dynamic IDXLs (static IDXLs must re-add themselves)
        int i, nDynamic=0;
        if (!p.isUnpacking()) //Count the number of non-NULL idxls:
        //Pack the dynamic IDXLs (static IDXLs must re-add themselves)
        int i, nDynamic=0;
        if (!p.isUnpacking()) //Count the number of non-NULL idxls:
@@ -97,6 +100,7 @@ IDXL_Chunk::~IDXL_Chunk() {
        for (int i=0;i<dynamic_idxls.size();i++) 
                if (dynamic_idxls[i]) delete dynamic_idxls[i];
        delete currentComm;
        for (int i=0;i<dynamic_idxls.size();i++) 
                if (dynamic_idxls[i]) delete dynamic_idxls[i];
        delete currentComm;
+       currentComm = 0;
 }
 
 /****** IDXL List ******/
 }
 
 /****** IDXL List ******/