Added a new field to the converse header. This is used for Converse reductions. ...
authorFilippo Gioachin <gioachin@illinois.edu>
Thu, 20 Aug 2009 23:55:41 +0000 (23:55 +0000)
committerFilippo Gioachin <gioachin@illinois.edu>
Thu, 20 Aug 2009 23:55:41 +0000 (23:55 +0000)
19 files changed:
src/arch/bluegenel/conv-common.h
src/arch/bluegenep/conv-common.h
src/arch/elan/conv-common.h
src/arch/lapi/conv-common.h
src/arch/mpi/conv-common.h
src/arch/mpi/conv-mach-syncft.h
src/arch/net/conv-common.h
src/arch/net/conv-mach-syncft.h
src/arch/origin-pthreads/conv-mach.h
src/arch/origin2000/conv-mach.h
src/arch/portals-crayxt3/conv-mach.h
src/arch/shmem-axp/conv-mach.h
src/arch/sim-linux/conv-mach.h
src/arch/sp3/conv-mach.h
src/arch/t3e/conv-mach.h
src/arch/uth/conv-common.h
src/arch/vmi/conv-common.h
src/conv-core/convcore.c
src/conv-core/converse.h

index 9f9940fa9016e14884202ede8f3fdde1057c6904..c6232d2ae59883bf5b7b89a82cc2b067dc6e47ee 100644 (file)
@@ -5,7 +5,7 @@
 
 #define CMK_HANDLE_SIGUSR                                  1
 
-#define CMK_MSG_HEADER_EXT_    CmiUInt2 rank, hdl,xhdl,info, stratid; unsigned char cksum, magic; int root, size, padding; 
+#define CMK_MSG_HEADER_EXT_    CmiUInt2 rank, hdl,xhdl,info, stratid; unsigned char cksum, magic; int root, size; CmiUInt2 redID, padding; 
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
 #define CMK_MSG_HEADER_EXT    { CMK_MSG_HEADER_EXT_ }
 #define CMK_MSG_HEADER_BLUEGENE    { CMK_MSG_HEADER_EXT_ CMK_BLUEGENE_FIELDS }
index 47dca60c44ac58af1d90685efee80e0deb144554..01b8aea4f35b12e7fa728ca752da8abd809f2948 100644 (file)
@@ -5,7 +5,7 @@
 
 #define CMK_HANDLE_SIGUSR                                  1
 
-#define CMK_MSG_HEADER_EXT_    CmiUInt2 rank, hdl,xhdl,info, stratid; unsigned char cksum, magic; int root, size, padding; 
+#define CMK_MSG_HEADER_EXT_    CmiUInt2 rank, hdl,xhdl,info, stratid; unsigned char cksum, magic; int root, size; CmiUInt2 redID, padding; 
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
 #define CMK_MSG_HEADER_EXT    { CMK_MSG_HEADER_EXT_ }
 #define CMK_MSG_HEADER_BLUEGENE    { CMK_MSG_HEADER_EXT_ CMK_BLUEGENE_FIELDS }
index 9d08e46f1669f98feafb185d52a5afadfced3c38..27cf97a0de5e502f2dfc00af4338fcc4019aa9cd 100644 (file)
@@ -7,7 +7,7 @@
 
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
 /* Type of the message tells whether it is a statically or dynamically allocated message, 0 for dynamic and 1 for static */
-#define CMK_MSG_HEADER_EXT_     CmiUInt4 size; CmiUInt2 rank,root,hdl,xhdl,info,stratid;
+#define CMK_MSG_HEADER_EXT_     CmiUInt4 size; CmiUInt2 rank,root,hdl,xhdl,info,stratid,redID,pad2; CmiUInt4 pad4;
 #define CMK_MSG_HEADER_EXT      {CMK_MSG_HEADER_EXT_}
 #define CMK_MSG_HEADER_BLUEGENE {CMK_MSG_HEADER_EXT_ CMK_BLUEGENE_FIELDS}
 
index 6ff015db7aead1c8e0b1a883aa209314d87d9e4e..9c036f368578c8a98d900454f1bb8ae7ba03846f 100644 (file)
@@ -3,7 +3,7 @@
 
 #define CMK_CMIPRINTF_IS_A_BUILTIN                         0
 
-#define CMK_MSG_HEADER_FIELDS CmiUInt2 rank,root,hdl,xhdl,info,stratid,size,pad2;
+#define CMK_MSG_HEADER_FIELDS CmiUInt2 rank,root,hdl,xhdl,info,stratid,size,redID;
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
 #define CMK_MSG_HEADER_EXT    { CMK_MSG_HEADER_FIELDS }
 #define CMK_MSG_HEADER_BLUEGENE    { CMK_MSG_HEADER_FIELDS CMK_BLUEGENE_FIELDS }
index dd8a9cfec218b3078b0b39de87b236b707cf271d..d51d88d0d16ef619b1755138560a4894dc8ada32 100644 (file)
@@ -7,7 +7,7 @@
 
 #define CMK_HANDLE_SIGUSR                                  1
 
-#define CMK_MSG_HEADER_EXT_    CmiUInt2 rank, root, hdl,xhdl,info, stratid; unsigned char cksum, magic;  CmiUInt2 padding;
+#define CMK_MSG_HEADER_EXT_    CmiUInt2 rank, root, hdl,xhdl,info, stratid; unsigned char cksum, magic; CmiUInt2 redID;
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
 #define CMK_MSG_HEADER_EXT    { CMK_MSG_HEADER_EXT_ }
 #define CMK_MSG_HEADER_BLUEGENE    { CMK_MSG_HEADER_EXT_ CMK_BLUEGENE_FIELDS }
index 1d9f80433a1f6c0e92b9646438b1db520a80f793..37eb0ce4baac85d39420516b9ee787de1374e71f 100644 (file)
@@ -3,7 +3,7 @@
 //#undef CMK_MSG_HEADER_EXT
 //#undef CMK_MSG_HEADER_BLUEGENE
 /* expand the header to store the restart phase counter(pn) */
-#define CMK_MSG_HEADER_EXT_   CmiUInt2 rank, root, hdl,xhdl,info, stratid, pn,d7; unsigned char cksum, magic;  CmiUInt2 padding;
+#define CMK_MSG_HEADER_EXT_   CmiUInt2 rank, root, hdl,xhdl,info, stratid, pn,d7; unsigned char cksum, magic; CmiUInt2 redID;
 //#define CMK_MSG_HEADER_EXT    { CMK_MSG_HEADER_EXT_ }
 //#define CMK_MSG_HEADER_BLUEGENE    { CmiUInt2 d0,d1,d2,d3,d4,d5,hdl,xhdl,pn,info; int nd, n; double rt; CmiInt2 tID; CmiUInt2 hID; char t; int msgID; int srcPe;}
 //#define CMK_MSG_HEADER_BLUEGENE  { CMK_MSG_HEADER_EXT_ CMK_BLUEGENE_FIELDS }
index 854a6f504cb55d4cc9268d73f8b42cf82045e38c..6c82b31f5df56ed0fdc9874f4e831d8e71177ebc 100644 (file)
@@ -19,8 +19,8 @@
    Parameters stratid and root are for the communication library.
    Stratid is the stratgy id and root is used in the broadcast.
 */
-#define CMK_MSG_HEADER_BASIC  {CmiUInt2 d0,d1,d2,d3,d4,d5,hdl,stratid,root,pad9;}
-#define CMK_MSG_HEADER_EXT_    CmiUInt2 d0,d1,d2,d3,d4,d5,hdl,stratid,root,xhdl,info,pad11;
+#define CMK_MSG_HEADER_BASIC  {CmiUInt2 d0,d1,d2,d3,d4,d5,hdl,stratid,root,redID;}
+#define CMK_MSG_HEADER_EXT_    CmiUInt2 d0,d1,d2,d3,d4,d5,hdl,stratid,root,xhdl,info,redID;
 #define CMK_MSG_HEADER_EXT       { CMK_MSG_HEADER_EXT_ }
 #define CMK_MSG_HEADER_BLUEGENE  { CMK_MSG_HEADER_EXT_ CMK_BLUEGENE_FIELDS }
 
index 4045ccf22b0cf30089679e8358e02d1849d3bd7e..c29b45700aced03f07784a49d720b6b24592a946 100644 (file)
@@ -4,8 +4,8 @@
 //#undef CMK_MSG_HEADER_EXT
 //#undef CMK_MSG_HEADER_BLUEGENE
 /* expand the header to store the restart phase counter(pn) */
-#define CMK_MSG_HEADER_BASIC  {CmiUInt2 d0,d1,d2,d3,d4,d5,hdl,pn,d8,stratid,root,db;}
-#define CMK_MSG_HEADER_EXT_    CmiUInt2 d0,d1,d2,d3,d4,d5,hdl,pn,d8,stratid,root,xhdl,info,dd;
+#define CMK_MSG_HEADER_BASIC  {CmiUInt2 d0,d1,d2,d3,d4,d5,hdl,pn,d8,stratid,root,db,redID,pad2;}
+#define CMK_MSG_HEADER_EXT_    CmiUInt2 d0,d1,d2,d3,d4,d5,hdl,pn,d8,stratid,root,xhdl,info,dd,redID,pad2;
 //#define CMK_MSG_HEADER_EXT    { CMK_MSG_HEADER_EXT_ }
 //#define CMK_MSG_HEADER_BLUEGENE    { CmiUInt2 d0,d1,d2,d3,d4,d5,hdl,xhdl,pn,info; int nd, n; double rt; CmiInt2 tID; CmiUInt2 hID; char t; int msgID; int srcPe;}
 //#define CMK_MSG_HEADER_BLUEGENE  { CMK_MSG_HEADER_EXT_ CMK_BLUEGENE_FIELDS }
index 4bac3b42b29b193d3984a6007cdfa4a2e199fe8b..4551b0a9aa2422dae008d169a925577733302e5c 100644 (file)
@@ -32,7 +32,7 @@
 #define CMK_MEMORY_PROTECTABLE                             0
 
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
-#define CMK_MSG_HEADER_EXT    { CmiUInt2 hdl,xhdl,info,stratid,root,padding1,padding2,padding3; }
+#define CMK_MSG_HEADER_EXT    { CmiUInt2 hdl,xhdl,info,stratid,root,redID,padding2,padding3; }
 
 #define CMK_MULTICAST_GROUP_TYPE                struct { unsigned pe, id; }
 #define CMK_MULTICAST_DEF_USE_COMMON_CODE                  1
index 0837e0131db5079018654035d96b64677d6a06ad..8bf772fac0da62bd977cc0d929dd2fc867a18fdb 100644 (file)
@@ -32,7 +32,7 @@
 #define CMK_MEMORY_PAGESIZE                                8192
 #define CMK_MEMORY_PROTECTABLE                             0
 
-#define CMK_MSG_HEADER_FIELDS  CmiUInt2 hdl,xhdl,info,stratid,root,pad1,pad2,pad3;
+#define CMK_MSG_HEADER_FIELDS  CmiUInt2 hdl,xhdl,info,stratid,root,redID,pad2,pad3;
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
 #define CMK_MSG_HEADER_EXT    { CMK_MSG_HEADER_FIELDS }
 #define CMK_MSG_HEADER_BLUEGENE    { CMK_MSG_HEADER_FIELDS CMK_BLUEGENE_FIELDS }
index 48e0a51b556ac8b94a5b0d455c3c5e8b42057ccd..bf5676a566d08d6ac46056caae1c2659d487c794 100644 (file)
@@ -14,7 +14,7 @@
 
 #define CMK_HANDLE_SIGUSR                                  1
 
-#define CMK_MSG_HEADER_EXT_    CmiUInt2 rank, root, hdl,xhdl,info, stratid; unsigned char cksum, magic;  CmiUInt2 padding;
+#define CMK_MSG_HEADER_EXT_    CmiUInt2 rank, root, hdl,xhdl,info, stratid; unsigned char cksum, magic; CmiUInt2 redID;
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
 #define CMK_MSG_HEADER_EXT    { CMK_MSG_HEADER_EXT_ }
 #define CMK_MSG_HEADER_BLUEGENE    { CMK_MSG_HEADER_EXT_ CMK_BLUEGENE_FIELDS }
index 5d593941c7576fc93be9e3e3ae45a1ae19b9c233..5e5b0eee54310a903af3c5f956b1a61c9ddd29df 100644 (file)
@@ -28,7 +28,7 @@
 #define CMK_MEMORY_PROTECTABLE                             0
 
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
-#define CMK_MSG_HEADER_EXT_   char gap[56]; CmiUInt2 hdl,xhdl,info,stratid,root,padding1,padding2,padding3;
+#define CMK_MSG_HEADER_EXT_   char gap[56]; CmiUInt2 hdl,xhdl,info,stratid,root,redID,padding2,padding3;
 #define CMK_MSG_HEADER_EXT       { CMK_MSG_HEADER_EXT_ }
 #define CMK_MSG_HEADER_BLUEGENE  {CMK_MSG_HEADER_EXT_ CMK_BLUEGENE_FIELDS}
 
index 85c605710d4de6c809c229dc2761644dd8584c3c..325085b51ef43bf88e5df7c4cb0a777b6a3f8018 100644 (file)
@@ -31,7 +31,7 @@
 #define CMK_MEMORY_PROTECTABLE                             1
 
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
-#define CMK_MSG_HEADER_EXT    { CmiUInt2 hdl,xhdl,info,stratid,root,padding1,padding2,padding3; }
+#define CMK_MSG_HEADER_EXT    { CmiUInt2 hdl,xhdl,info,stratid,root,redID,padding2,padding3; }
 
 #define CMK_MULTICAST_GROUP_TYPE                struct { unsigned pe, id; }
 #define CMK_MULTICAST_DEF_USE_COMMON_CODE                  1
index 1fd07bb7bb6173fad53aa0416dbe5e978a06d238..c600c10f6b460a4135d20f60dcccf34c41160e47 100644 (file)
@@ -28,7 +28,7 @@
 #define CMK_MEMORY_PROTECTABLE                             0
 
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
-#define CMK_MSG_HEADER_EXT    { CmiUInt2 hdl,xhdl,info,stratid,root,padding1,padding2,padding3; }
+#define CMK_MSG_HEADER_EXT    { CmiUInt2 hdl,xhdl,info,stratid,root,redID,padding2,padding3; }
 
 #define CMK_MULTICAST_GROUP_TYPE                struct { unsigned pe, id; }
 #define CMK_MULTICAST_DEF_USE_COMMON_CODE                  1
index 705b70866c27cc2417a944e3ed75e67669076b3c..cf1019978aa5c8c5c7f011349d8615b6e9b88455 100644 (file)
@@ -28,7 +28,7 @@
 #define CMK_MEMORY_PAGESIZE                                8192
 #define CMK_MEMORY_PROTECTABLE                             0
 
-#define CMK_MSG_HEADER_FIELDS   char gap[56]; CmiUInt2 hdl,xhdl,info,stratid,root,pad1,pad2,pad3;
+#define CMK_MSG_HEADER_FIELDS   char gap[56]; CmiUInt2 hdl,xhdl,info,stratid,root,redID,pad2,pad3;
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
 #define CMK_MSG_HEADER_EXT    { CMK_MSG_HEADER_FIELDS }
 #define CMK_MSG_HEADER_BLUEGENE    { CMK_MSG_HEADER_FIELDS CMK_BLUEGENE_FIELDS }
index 5e46b3f5a157cff72d7a0cb030e79914cd3ebfcb..a40a1881a3d5ba5a63f4f7315e944bc6da5b7d38 100644 (file)
@@ -1,5 +1,5 @@
 
-#define CMK_MSG_HEADER_FIELD  CmiUInt2 hdl,xhdl,info,stratid,root,pad1,pad2,pad3;
+#define CMK_MSG_HEADER_FIELD  CmiUInt2 hdl,xhdl,info,stratid,root,redID,pad2,pad3;
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
 #define CMK_MSG_HEADER_EXT    { CMK_MSG_HEADER_FIELD }
 #define CMK_MSG_HEADER_BLUEGENE    { CMK_MSG_HEADER_FIELD CMK_BLUEGENE_FIELDS }
index 905cdff526ab79e7241bc9192176881d7bf86e2d..0e2f36841b831681c2d6a923b6607e2743f15d90 100644 (file)
@@ -20,7 +20,7 @@
 #define CMK_SPANTREE_MAXSPAN                               4
 #define CMK_SPANTREE_USE_COMMON_CODE                       1
 
-#define CMK_MSG_HEADER_FIELDS  unsigned char vmitype,vmicredits; CmiUInt2 tree_rank,tree_root,hdl,xhdl,info,stratid,root;
+#define CMK_MSG_HEADER_FIELDS  unsigned char vmitype,vmicredits; CmiUInt2 tree_rank,tree_root,hdl,xhdl,info,stratid,root,redID,pad1,pad2,pad3;
 #define CMK_MSG_HEADER_BASIC  CMK_MSG_HEADER_EXT
 #define CMK_MSG_HEADER_EXT    { CMK_MSG_HEADER_FIELDS }
 #define CMK_MSG_HEADER_BLUEGENE    { CMK_MSG_HEADER_FIELDS CMK_BLUEGENE_FIELDS }
index d8abdc38e698dade4ca5fabc3dd30311ba7515b7..d8b1ab0e16a97e855d0849d66452731278356445 100644 (file)
@@ -2005,7 +2005,7 @@ void CmiSendReduce(CmiReduction *red) {
       if (red->ops.deleteFn != NULL) (red->ops.deleteFn)(red->localData);
     }
     CmiSetHandler(msg, CpvAccess(CmiReductionMessageHandler));
-    CmiSetRoot(msg, red->seqID);
+    CmiSetRedID(msg, red->seqID);
     /*CmiPrintf("CmiSendReduce(%d): sending %d bytes to %d\n",CmiMyPe(),msg_size,CpvAccess(_reduce_parent));*/
     CmiSyncSendAndFree(red->parent, msg_size, msg);
   } else {
@@ -2029,7 +2029,7 @@ void CmiReduce(void *msg, int size, CmiReduceMergeFn mergeFn) {
   red->ops.destination = (CmiHandler)CmiGetHandlerFunction(msg);
   red->ops.mergeFn = mergeFn;
   red->ops.pupFn = NULL;
-  //CmiPrintf("[%d] CmiReduce::local parent=%d, numChildren=%d\n",CmiMyPe(),red->parent,red->numChildren);
+  /*CmiPrintf("[%d] CmiReduce::local %hd parent=%d, numChildren=%d\n",CmiMyPe(),red->seqID,red->parent,red->numChildren);*/
   CmiSendReduce(red);
 /*  
   CpvAccess(_reduce_data) = data;
@@ -2057,6 +2057,7 @@ void CmiReduceStruct(void *data, CmiReducePupFn pupFn,
   red->ops.mergeFn = mergeFn;
   red->ops.pupFn = pupFn;
   red->ops.deleteFn = deleteFn;
+  /*CmiPrintf("[%d] CmiReduceStruct::local %hd parent=%d, numChildren=%d\n",CmiMyPe(),red->seqID,red->parent,red->numChildren);*/
   CmiSendReduce(red);
   /*
   CpvAccess(_reduce_data) = data;
@@ -2178,10 +2179,10 @@ void CmiNodeReduceStruct(void *data, CmiReducePupFn pupFn,
 }
 
 void CmiHandleReductionMessage(void *msg) {
-  CmiReduction *red = CmiGetReduction(CmiGetRoot(msg));
-  if (red->numRemoteReceived == red->numChildren) red = CmiGetReductionCreate(CmiGetRoot(msg), red->numChildren+4);
+  CmiReduction *red = CmiGetReduction(CmiGetRedID(msg));
+  if (red->numRemoteReceived == red->numChildren) red = CmiGetReductionCreate(CmiGetRedID(msg), red->numChildren+4);
   red->remoteData[red->numRemoteReceived++] = msg;
-  /*CmiPrintf("[%d] CmiReduce::remote\n",CmiMyPe());*/
+  /*CmiPrintf("[%d] CmiReduce::remote %hd\n",CmiMyPe(),red->seqID);*/
   CmiSendReduce(red);
 /*
   CpvAccess(_reduce_msg_list)[CpvAccess(_reduce_received)++] = msg;
index d5e0be65d5fe9baad86c4d3c5907f4227b9c96a3..0d89d45a38169422f97cc2113fa17190f8bdaa48 100644 (file)
@@ -561,12 +561,14 @@ extern void CmiNumberHandlerEx(int n, CmiHandlerEx h,void *userPtr);
 #define CmiGetXHandler(m) (((CmiMsgHeaderExt*)m)->xhdl)
 #define CmiGetInfo(m)     (((CmiMsgHeaderExt*)m)->info)
 #define CmiGetRoot(m)     (((CmiMsgHeaderExt*)m)->root)
+#define CmiGetRedID(m)     (((CmiMsgHeaderExt*)m)->redID)
 #define CmiGetStrategy(m) (((CmiMsgHeaderExt*)m)->stratid)
 
 #define CmiSetHandler(m,v)  do {((((CmiMsgHeaderExt*)m)->hdl)=(v));} while(0)
 #define CmiSetXHandler(m,v) do {((((CmiMsgHeaderExt*)m)->xhdl)=(v));} while(0)
 #define CmiSetInfo(m,v)     do {((((CmiMsgHeaderExt*)m)->info)=(v));} while(0)
 #define CmiSetRoot(m,v)     do {((((CmiMsgHeaderExt*)m)->root)=(v));} while(0)
+#define CmiSetRedID(m,v)     do {((((CmiMsgHeaderExt*)m)->redID)=(v));} while(0)
 #define CmiSetStrategy(m,v) do {((((CmiMsgHeaderExt*)m)->stratid)=(v);} while(0)
 
 #define CmiHandlerToInfo(n) (CpvAccess(CmiHandlerTable)[n])