check and report the error when trying to set up a persistent channel to the processo...
authorGengbin Zheng <gzheng@illinois.edu>
Mon, 8 Nov 2010 20:57:40 +0000 (14:57 -0600)
committerGengbin Zheng <gzheng@illinois.edu>
Mon, 8 Nov 2010 20:57:40 +0000 (14:57 -0600)
src/arch/util/persist-comm.c

index 9f8f5520c1ce30178cfeb34481d5bb630abbf983..22494439d6d6fc696649b119714a85b55c31153a 100644 (file)
@@ -152,6 +152,11 @@ PersistentHandle CmiCreatePersistent(int destPE, int maxBytes)
   PersistentHandle h = getFreeSendSlot();
 
   PersistentSendsTable *slot = (PersistentSendsTable *)h;
+
+  if (CmiMyPe() == destPE) {
+    CmiAbort("CmiCreatePersistent Error: setting up persistent communication to the same processor is not allowed.");
+  }
+
   slot->used = 1;
   slot->destPE = destPE;
   slot->sizeMax = maxBytes;