Need to delete the elements of hashtable before deleting it.
authorSameer Kumar <skumar2@uiuc.edu>
Mon, 28 Mar 2005 06:51:13 +0000 (06:51 +0000)
committerSameer Kumar <skumar2@uiuc.edu>
Mon, 28 Mar 2005 06:51:13 +0000 (06:51 +0000)
src/ck-com/ComlibManager.C
src/ck-com/EachToManyMulticastStrategy.C

index 3e14184169e1cc52741f977fc3c90e6dc534ddba..f555cb853888816075ddf0f604ec5ab0003ae764 100644 (file)
@@ -279,6 +279,8 @@ void ComlibManager::receiveTable(StrategyWrapper &sw,
     receivedTable = 1;
 
     delete CkpvAccess(locationTable);
+    //Delete all records in it too !!!!!!!!!!
+
     CkpvAccess(locationTable) =  NULL;
 
     CkpvAccess(locationTable) = new 
index ddc4243abda38d86643c173c2f3e2f053eec5d83..edff886b77d2dc8b5ec36eb8212733a576eff9da 100644 (file)
@@ -234,9 +234,12 @@ void EachToManyMulticastStrategy::pup(PUP::er &p){
        handlerId = CkRegisterHandler((CmiHandler)E2MHandler);
         int handler = CkRegisterHandler((CmiHandler)itrDoneHandler);        
         
-        rstrat = new RouterStrategy(routerID, handler, npes, pelist);
-        setConverseStrategy(rstrat);
-        MyPe = rstrat->getProcMap()[CkMyPe()];
+        if(npes > 0) {
+            rstrat = new RouterStrategy(routerID, handler, npes, pelist);
+            setConverseStrategy(rstrat);
+            MyPe = rstrat->getProcMap()[CkMyPe()];
+        }
+        else MyPe = -1;
     }
     
     ComlibPrintf("[%d] End of pup\n", CkMyPe());