Fixed a bug in picking which notification msg to be used.
authorChao Mei <chaomei2@illinois.edu>
Thu, 2 Feb 2012 20:16:16 +0000 (14:16 -0600)
committerChao Mei <chaomei2@illinois.edu>
Thu, 2 Feb 2012 20:16:16 +0000 (14:16 -0600)
NodeHelper.C

index a74b8780d07d3a036b342e6790a04baf82ec206b..742e0a995030d8f8857171e4f0766137af5909f0 100644 (file)
@@ -260,11 +260,12 @@ void FuncNodeHelper::parallelizeFunc(HelperFn func, int paramNum, void * param,
         FuncSingleHelper *thisHelper = helperPtr[CkMyRank()];
         CurLoopInfo *curLoop = thisHelper->curLoop;
         curLoop->set(numChunks, func, lowerRange, upperRange, paramNum, param);
+        ConverseNotifyMsg *notifyMsg = &(notifyMsgs[CmiMyRank()]);
+        notifyMsg->ptr = (void *)curLoop;
         
         for (int i=0; i<numHelpers; i++) {
-            if (i!=CkMyRank()) {
-                notifyMsgs[i].ptr = (void *)curLoop;
-                CmiPushPE(i, (void *)(notifyMsgs+i));
+            if (i!=CkMyRank()) {                
+                CmiPushPE(i, (void *)(notifyMsg));
             }
         }        
         curLoop->stealWork();