fix for persistent on SMP
authorGengbin Zheng <gzheng@illinois.edu>
Sun, 18 Mar 2012 22:31:52 +0000 (15:31 -0700)
committerGengbin Zheng <gzheng@illinois.edu>
Sun, 18 Mar 2012 22:31:52 +0000 (15:31 -0700)
examples/converse/pingpong/pingpong.C

index 2b92a09754d61bff39a52dc82f1e72a19188e126..630751e28a755695b00baa2bd051d25c579c34e6 100644 (file)
@@ -135,6 +135,7 @@ CmiStartFn mymain()
     int otherPe = CmiMyPe() ^ 1;
     
 #if USE_PERSISTENT
+    if (CmiMyPe() < CmiNumPes())
     h = CmiCreatePersistent(otherPe, maxMsgSize+1024);
 #endif