Commit 1fe37d80 authored by Jayesh Krishna's avatar Jayesh Krishna
Browse files

[svn-r6817] Adding format specifier for Pints and removing instances of custom...

[svn-r6817] Adding format specifier for Pints and removing instances of custom Aint format specifier defns - Codes that need Aint format spec should use MPI_AINT_FMT_*
parent 52659478
......@@ -5622,12 +5622,41 @@ fi
for type in int long long_long short ; do
eval len=\$ac_cv_sizeof_$type
if test "$len" = "$ac_cv_sizeof_void_p" ; then
case $type in
int)
MPIR_PINT_FMT_DEC_SPEC="\"%d\""
MPIR_UPINT_FMT_DEC_SPEC="\"%u\""
;;
long)
MPIR_PINT_FMT_DEC_SPEC="\"%ld\""
MPIR_UPINT_FMT_DEC_SPEC="\"%lu\""
;;
long_long)
MPIR_PINT_FMT_DEC_SPEC="\"%lld\""
MPIR_UPINT_FMT_DEC_SPEC="\"%llu\""
;;
short)
MPIR_PINT_FMT_DEC_SPEC="\"%hd\""
MPIR_UPINT_FMT_DEC_SPEC="\"%hu\""
;;
*)
AC_MSG_WARN([unable to determine format specifiers for MPIR_Pint, defaulting to int])
MPIR_PINT_FMT_DEC_SPEC="\"%d\""
MPIR_UPINT_FMT_DEC_SPEC="\"%u\""
;;
esac
MPIR_PINT=`echo $type | sed -e 's/_/ /'`
break
fi
done
AC_DEFINE_UNQUOTED(MPIR_Pint,$MPIR_PINT,[MPIR_Pint is a pointer-sized integer])
AC_DEFINE_UNQUOTED(MPIR_PINT_FMT_DEC_SPEC,
$MPIR_PINT_FMT_DEC_SPEC,[MPIR_PINT_FMT_DEC_SPEC is the format
specifier for printing Pint as a decimal])
AC_DEFINE_UNQUOTED(MPIR_Upint,unsigned $MPIR_PINT,[MPIR_Upint is an unsigned pointer-sized integer])
AC_DEFINE_UNQUOTED(MPIR_UPINT_FMT_DEC_SPEC,
$MPIR_UPINT_FMT_DEC_SPEC,[MPIR_UPINT_FMT_DEC_SPEC is the format
specifier for printing Upint as a decimal])
# ----------------------------------------------------------------------------
# MPI_AINT datatype
......
......@@ -238,19 +238,6 @@ fi
if test "$pac_found_struct_ifconf" = "yes" ; then
AC_DEFINE(HAVE_STRUCT_IFCONF,1,[Define if struct ifconf can be used])
fi
#
# We need to know whether to use %d or %ld for writing out MPI_Aint values
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(void *)
if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_void_p" ; then
:
elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_void_p" ; then
AC_DEFINE(MPI_AINT_IS_LONG_INT,1,[Define if the size of an MPI_Aint is long])
elif test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_void_p" ; then
AC_DEFINE(MPI_AINT_IS_LONG_LONG_INT,1,[Define if the size of an MPI_Aint is long long])
fi
#
# bring in the default implementation of the MPID_Thread package
......
......@@ -30,15 +30,9 @@
/* Add the ch3 packet definitions */
#include "mpidpkt.h"
/* We need to match the size of MPI_Aint to the relevant Format control
/* We need to match the size of MPIR_Pint to the relevant Format control
*/
#ifdef MPI_AINT_IS_LONG_INT
#define MPIDI_MSG_SZ_FMT "%ld"
#elif defined(MPI_AINT_IS_LONG_LONG_INT)
#define MPIDI_MSG_SZ_FMT "%lld"
#else
#define MPIDI_MSG_SZ_FMT "%d"
#endif
#define MPIDI_MSG_SZ_FMT MPIR_PINT_FMT_DEC_SPEC
#if !defined(MPIDI_IOV_DENSITY_MIN)
# define MPIDI_IOV_DENSITY_MIN (16 * 1024)
......
......@@ -135,19 +135,6 @@ if test "$pac_cv_have_struct_ifconf" = "yes" -o \
"$pac_cv_have_struct_ifconf_without_posix" ; then
AC_DEFINE(HAVE_STRUCT_IFCONF,1,[Define if struct ifconf can be used])
fi
#
# We need to know whether to use %d or %ld for writing out MPI_Aint values
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(void *)
if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_void_p" ; then
:
elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_void_p" ; then
AC_DEFINE(MPI_AINT_IS_LONG_INT,1,[Define if the size of an MPI_Aint is long])
elif test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_void_p" ; then
AC_DEFINE(MPI_AINT_IS_LONG_LONG_INT,1,[Define if the size of an MPI_Aint is long long])
fi
# AR_FLAGS provides a way to potentially improve build performance on Mac OSX
if test -z "$AR_FLAGS" ; then AR_FLAGS=cr ; fi
......
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