Commit 40e7f379 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r3298] Allow a configure option to set the rank to 16 or 32 bits. 16-bit...

[svn-r3298] Allow a configure option to set the rank to 16 or 32 bits. 16-bit rank is still the default. 32-bit ranks cannot be used till the Generic packet type size is fixed.
parent ea863089
......@@ -95,6 +95,18 @@ if test -s $srcdir/channels/$channel_name/setup_$channel_name ; then
fi
AC_SUBST(ch3subsystems)
AC_ARG_WITH(ch3-rank-bits, [--with-ch3-rank-bits=16/32 Number of bits allocated to the rank field (16 or 32)],
[ rankbits=$withval ],
[ rankbits=16 ])
AC_MSG_RESULT($rankbits)
if test "$rankbits" = "16" ; then
AC_DEFINE(CH3_RANK_BITS,16,[Define the number of CH3_RANK_BITS])
elif test "$rankbits" = "32" ; then
AC_DEFINE(CH3_RANK_BITS,32,[Define the number of CH3_RANK_BITS])
else
AC_MSG_ERROR(Only 16 or 32-bit ranks are supported)
fi
AC_CHECK_HEADERS(assert.h limits.h string.h sys/types.h sys/uio.h uuid/uuid.h \
time.h ctype.h unistd.h arpa/inet.h sys/socket.h net/if.h)
......
......@@ -47,6 +47,12 @@ typedef unsigned long MPID_Seqnum_t;
#include "mpichconf.h"
#if CH3_RANK_BITS == 16
typedef int16_t MPIR_Rank_t;
#elif CH3_RANK_BITS == 32
typedef int32_t MPIR_Rank_t;
#endif /* CH3_RANK_BITS */
/* For the typical communication system for which the ch3 channel is
appropriate, 16 bits is sufficient for the rank. By also using 16
bits for the context, we can reduce the size of the match
......@@ -68,7 +74,7 @@ typedef unsigned long MPID_Seqnum_t;
typedef union {
struct {
int32_t tag;
int16_t rank;
MPIR_Rank_t rank;
MPIR_Context_id_t context_id;
} parts;
MPIR_Upint whole;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment