Skip to content

Commit

Permalink
Avoid padding in converse message header due to alignment issues
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapb committed May 12, 2023
1 parent 9790de3 commit 621adc4
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions src/arch/gni/conv-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

#if DELTA_COMPRESS
#if CMK_ERROR_CHECKING
#define CMK_MSG_HEADER_EXT_ CmiUInt4 size; CmiUInt2 seq; unsigned char cksum, magic; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt4 compressStart; CmiUInt2 compress_flag,xxhdl; CmiUInt8 persistRecvHandler; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ CmiUInt8 persistRecvHandler; CmiUInt4 size, compressStart; CmiInt4 root; CmiUInt2 seq; unsigned char cksum, magic; CmiUInt2 rank,hdl,xhdl,info,redID,compress_flag,xxhdl; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#else
#define CMK_MSG_HEADER_EXT_ CmiUInt4 size; CmiUInt4 seq; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt4 compressStart; CmiUInt2 compress_flag,xxhdl; CmiUInt8 persistRecvHandler; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ CmiUInt8 persistRecvHandler; CmiUInt4 size, compressStart, seq; CmiInt4 root; CmiUInt2 rank,hdl,xhdl,info,redID; CmiUInt2 compress_flag,xxhdl; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#endif
#else
#if CMK_ERROR_CHECKING
#define CMK_MSG_HEADER_EXT_ CmiUInt4 size; CmiUInt2 seq; unsigned char cksum, magic; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ CmiInt4 root; CmiUInt4 size; CmiUInt2 seq; unsigned char cksum, magic; CmiUInt2 rank,hdl,xhdl,info,redID; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#else
#define CMK_MSG_HEADER_EXT_ CmiUInt4 size; CmiUInt4 seq; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ CmiInt4 root; CmiUInt4 size, seq; CmiUInt2 rank,hdl,xhdl,info,redID; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/arch/gni/conv-mach-syncft.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#undef CMK_MSG_HEADER_EXT_
//#undef CMK_MSG_HEADER_EXT
/* expand the header to store the restart phase counter(pn) */
#define CMK_MSG_HEADER_EXT_ CmiUInt4 size; CmiUInt4 seq; CmiUInt2 rank,hdl,xhdl,info,type,redID,pn,d9; CmiInt4 root; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;;
#define CMK_MSG_HEADER_EXT_ CmiInt4 root; CmiUInt4 size; CmiUInt4 seq; CmiUInt2 rank,hdl,xhdl,info,type,redID,pn,d9; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;;
//#define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_EXT_ }

#define CmiGetRestartPhase(m) ((((CmiMsgHeaderExt*)m)->pn))
Expand Down
4 changes: 2 additions & 2 deletions src/arch/mpi/conv-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#define CMK_HANDLE_SIGUSR 1

#if CMK_ERROR_CHECKING
#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, redID; CmiInt4 root; unsigned char cksum, magic, mpiMsgType; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ CmiInt4 root; CmiUInt2 rank, hdl,xhdl,info, redID; unsigned char cksum, magic, mpiMsgType; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#else
#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, redID; CmiInt4 root; unsigned char mpiMsgType; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ CmiInt4 root; CmiUInt2 rank, hdl,xhdl,info, redID; unsigned char mpiMsgType; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#endif

#define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT
Expand Down
2 changes: 1 addition & 1 deletion src/arch/mpi/conv-mach-syncft.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#undef CMK_MSG_HEADER_EXT_
//#undef CMK_MSG_HEADER_EXT
/* expand the header to store the restart phase counter(pn) */
#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, root, hdl,xhdl,info, type, pn,d7; unsigned char cksum, magic, mpiMsgType; CmiUInt2 redID; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, root, hdl,xhdl,info, type, pn,d7,redID; unsigned char cksum, magic, mpiMsgType; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
//#define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_EXT_ }

#define CmiGetRestartPhase(m) ((((CmiMsgHeaderExt*)m)->pn))
Expand Down
2 changes: 1 addition & 1 deletion src/arch/ofi/conv-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* - startid, redID
* - rank is needed by broadcast
*/
#define CMK_MSG_HEADER_UNIQUE CmiUInt4 size; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_UNIQUE CmiUInt4 size; CmiInt4 root; CmiUInt2 rank,hdl,xhdl,info,redID; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;

#define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT
#define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_UNIQUE }
Expand Down
2 changes: 1 addition & 1 deletion src/arch/pami/conv-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; CmiUInt2 redID, padding; CmiUInt1 cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ int root, size; CmiUInt2 rank, hdl,xhdl,info, stratid, redID, padding; unsigned char cksum, magic; CmiUInt1 cmaMsgType:2, nokeep:1;

#define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT
#define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_EXT_ }
Expand Down
2 changes: 1 addition & 1 deletion src/arch/pami/conv-mach-async.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

#undef CMK_MSG_HEADER_EXT_

#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, stratid; unsigned char cksum, magic; int root, size, dstnode; CmiUInt2 redID, padding; char work[8*sizeof(void *)]; CmiUInt1 cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ int root, size, dstnode; CmiUInt2 rank, hdl,xhdl,info, stratid; unsigned char cksum, magic, redID, padding; char work[8*sizeof(void *)]; CmiUInt1 cmaMsgType:2, nokeep:1;


4 changes: 2 additions & 2 deletions src/arch/pamilrts/conv-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

//#define DELTA_COMPRESS 1
#if DELTA_COMPRESS
#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info; unsigned char cksum, magic; int root, size; CmiUInt2 redID, padding; CmiUInt4 compressStart; CmiUInt2 compress_flag,xxhdl; CmiUInt8 persistRecvHandler; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ CmiUInt8 persistRecvHandler; CmiUInt4 compressStart; int root, size; CmiUInt2 rank, hdl,xhdl,info,redID,padding,compress_flag,xxhdl; unsigned char cksum, magic; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#else
#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info; unsigned char cksum, magic; int root, size; CmiUInt2 redID, padding; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ int root, size; CmiUInt2 rank, hdl,xhdl,info,redID,padding; unsigned char cksum, magic; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#endif

#define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT
Expand Down
4 changes: 2 additions & 2 deletions src/arch/pamilrts/conv-mach-async.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

#undef CMK_MSG_HEADER_EXT_
#if DELTA_COMPRESS
#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, type; unsigned char cksum, magic; int root, size, dstnode; CmiUInt2 redID, padding; char work[6*sizeof(void *)]; CmiUInt4 compressStart; CmiUInt2 compress_flag,xxhdl; CmiUInt8 persistRecvHandler; CmiUInt1 cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ CmiUInt8 persistRecvHandler; int root, size, dstnode; CmiUInt4 compressStart; CmiUInt2 rank, hdl,xhdl,info, type, redID, padding, compress_flag,xxhdl; unsigned char cksum, magic; char work[6*sizeof(void *)]; CmiUInt1 cmaMsgType:2, nokeep:1;
#else
#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, type; unsigned char cksum, magic; int root, size, dstnode; CmiUInt2 redID, padding; char work[6*sizeof(void *)]; CmiUInt1 cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ int root, size, dstnode; CmiUInt2 rank, hdl,xhdl,info, type, redID, padding; unsigned char cksum, magic; char work[6*sizeof(void *)]; CmiUInt1 cmaMsgType:2, nokeep:1;
#endif


2 changes: 1 addition & 1 deletion src/arch/ucx/conv-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* - startid, redID
* - rank is needed by broadcast
*/
#define CMK_MSG_HEADER_UNIQUE CmiUInt4 size; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_UNIQUE CmiUInt4 size; CmiInt4 root; CmiUInt2 rank,hdl,xhdl,info,redID; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;

#define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT
#define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_UNIQUE }
Expand Down
2 changes: 1 addition & 1 deletion src/arch/verbs/conv-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
of the message and used in the LRTS based CMA implementaion.
*/
#define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT
#define CMK_MSG_HEADER_EXT_ CmiUInt2 d0,d1,d2,d3,hdl,xhdl,info,redID,rank; CmiInt4 root, size; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ CmiInt4 root, size; CmiUInt2 d0,d1,d2,d3,hdl,xhdl,info,redID,rank; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_EXT_ }

#define CMK_SPANTREE_MAXSPAN 4
Expand Down
2 changes: 1 addition & 1 deletion src/arch/verbs/conv-mach-syncft.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//#undef CMK_MSG_HEADER_EXT
/* expand the header to store the restart phase counter(pn) */
#define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT
#define CMK_MSG_HEADER_EXT_ CmiUInt2 d0,d1,d2,d3,hdl,pn,d4,type,xhdl,info,dd,redID,pad2,rank; CmiUInt4 root,size; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
#define CMK_MSG_HEADER_EXT_ CmiUInt4 root,size; CmiUInt2 d0,d1,d2,d3,hdl,pn,d4,type,xhdl,info,dd,redID,pad2,rank; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;
//#define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_EXT_ }

#define CmiGetRestartPhase(m) ((((CmiMsgHeaderExt*)m)->pn))
Expand Down

0 comments on commit 621adc4

Please sign in to comment.