Reverting change that causes crashes for one time strategies on net version. CmiListS...
[charm.git] / src / ck-com / OneTimeMulticastStrategy.C
index 278ce7bb874f024d160fe7647785ad83065ec348..cb8ab309bedd0452774396e460d3009763cd693c 100644 (file)
@@ -19,6 +19,10 @@ using std::set;
 using std::vector;
 
 
+/// @note: There is some bug that is preventing us from using CmiSyncListSend. 
+#define SYNCLISTSENDANDFREE 0
+
+
 CkpvExtern(CkGroupID, cmgrID);
 
 OneTimeMulticastStrategy::OneTimeMulticastStrategy()
@@ -152,11 +156,15 @@ void OneTimeMulticastStrategy::remoteMulticast(ComlibMulticastMsg * multMsg, boo
   
   // CkPrintf("[%d] before CmiSyncListSendAndFree env->event=%d\n", CkMyPe(), (int)env->getEvent());
 
+#if SYNCLISTSENDANDFREE
+  CmiSyncListSendAndFree(npes, pelist, env->getTotalsize(), (char*)env);
+#else
 
   CkAssert(npes > 0);
   CmiSyncListSend(npes, pelist, env->getTotalsize(), (char*)env);
   
   delete[] pelist;
+#endif
 
   double end = CmiWallTimer();
   traceUserBracketEvent(10001, start, middle);
@@ -191,6 +199,17 @@ void OneTimeMulticastStrategy::handleMessage(void *msg){
 
   //  CkPrintf("[%d] in OneTimeMulticastStrategy::handleMessage before  deliverToIndices newenv->event=%d\n", CkMyPe(), (int)newenv->getEvent());
 
+
+#if SYNCLISTSENDANDFREE
+
+  // Deliver locally
+  deliverToIndices(newmsg, localElems, local_idx_list );
+  
+  // Forward on to other processors if necessary
+  remoteMulticast(multMsg, false);
+#else
+
   // Forward on to other processors if necessary
   remoteMulticast(multMsg, false);
 
@@ -199,6 +218,8 @@ void OneTimeMulticastStrategy::handleMessage(void *msg){
   
   // Finally delete the reference counted message because remoteMulticast does not do this.
   CmiFree(multMsg);
+
+#endif
   
 }