Follow on to r12146. For platforms that dont' have a ptrdiff_t definition,
provide one for the internals of Open MPI. For mpi.h, typedef MPI_Aint either to ptrdiff_t or whatever we used as ptrdiff_t if that type doesn't actually exist. This commit was SVN r12212. The following SVN revision numbers were found above: r12146 --> open-mpi/ompi@8852c00c36
Этот коммит содержится в:
родитель
f43d4fa4f2
Коммит
4dad3ef3ef
25
configure.ac
25
configure.ac
@ -199,7 +199,8 @@ AC_CHECK_TYPES(uint64_t)
|
||||
AC_CHECK_TYPES(intptr_t)
|
||||
AC_CHECK_TYPES(uintptr_t)
|
||||
AC_CHECK_TYPES(mode_t)
|
||||
|
||||
AC_CHECK_TYPES(ssize_t)
|
||||
AC_CHECK_TYPES(ptrdiff_t)
|
||||
|
||||
#
|
||||
# Check for type sizes
|
||||
@ -219,6 +220,12 @@ AC_CHECK_SIZEOF(float)
|
||||
AC_CHECK_SIZEOF(double)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(size_t)
|
||||
if test $ac_cv_type_ssize_t = yes ; then
|
||||
AC_CHECK_SIZEOF(ssize_t)
|
||||
fi
|
||||
if test $ac_cv_type_ptrdiff_t = yes; then
|
||||
AC_CHECK_SIZEOF(ptrdiff_t)
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for type alignments
|
||||
@ -770,6 +777,22 @@ if test "$MPI_OFFSET_TYPE" = "not found"; then
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(OMPI_MPI_OFFSET_TYPE, $MPI_OFFSET_TYPE, [Type of MPI_Offset -- has to be defined here and typedef'ed later because mpi.h does not get AC SUBST's])
|
||||
|
||||
#
|
||||
# Check for MPI_Aint type. Yes, there are platforms where
|
||||
# sizeof(void*) != sizeof(long) (64 bit Windows, apparently).
|
||||
#
|
||||
if test $ac_cv_type_ptrdiff_t = yes ; then
|
||||
ompi_ptrdiff_t="ptrdiff_t"
|
||||
elif test $ac_cv_sizeof_void_p -eq $ac_cv_sizeof_long ; then
|
||||
ompi_ptrdiff_t="long"
|
||||
elif test $ac_cv_type_long_long = yes -a $ac_cv_sizeof_void_p -eq $ac_cv_sizeof_long_long ; then
|
||||
ompi_ptrdiff_t="long long"
|
||||
else
|
||||
AC_MSG_ERROR([Could not find datatype to emulate ptrdiff_t. Cannot continue])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OMPI_PTRDIFF_TYPE], [$ompi_ptrdiff_t],
|
||||
[type to use for ptrdiff_t])
|
||||
|
||||
#
|
||||
# If we haven't already, figure out an MPI datatype that corresponds
|
||||
# to the back-end C type of MPI_Offset.
|
||||
|
@ -71,6 +71,9 @@
|
||||
/* Type of MPI_Offset -- has to be defined here and typedef'ed later because mpi.h does not get AC SUBST's */
|
||||
#undef OMPI_MPI_OFFSET_TYPE
|
||||
|
||||
/* type to use for ptrdiff_t, if it does not exist, set to ptrdiff_t if it does exist */
|
||||
#undef OMPI_PTRDIFF_TYPE
|
||||
|
||||
/* Whether we want MPI cxx support or not */
|
||||
#undef OMPI_WANT_CXX_BINDINGS
|
||||
|
||||
@ -92,6 +95,9 @@
|
||||
/* MPI datatype corresponding to MPI_Offset */
|
||||
#undef OMPI_OFFSET_DATATYPE
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* A type that allows us to have sentinel type values that are still
|
||||
valid */
|
||||
#undef ompi_fortran_bogus_type_t
|
||||
@ -112,10 +118,15 @@
|
||||
#define MPI_Fint ompi_fortran_integer_t
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* #ifndef OMPI_CONFIG_H */
|
||||
|
||||
/* @OMPI_END_CONFIGURE_SECTION@ */
|
||||
|
||||
/* include for ptrdiff_t */
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifndef OMPI_BUILDING
|
||||
#define OMPI_BUILDING 0
|
||||
#endif
|
||||
@ -148,8 +159,8 @@ extern "C" {
|
||||
/*
|
||||
* Typedefs
|
||||
*/
|
||||
#include <stddef.h>
|
||||
typedef ptrdiff_t MPI_Aint;
|
||||
|
||||
typedef OMPI_PTRDIFF_TYPE MPI_Aint;
|
||||
typedef OMPI_MPI_OFFSET_TYPE MPI_Offset;
|
||||
typedef struct ompi_communicator_t *MPI_Comm;
|
||||
typedef struct ompi_datatype_t *MPI_Datatype;
|
||||
|
@ -123,6 +123,10 @@
|
||||
**********************************************************************/
|
||||
#if OMPI_BUILDING
|
||||
|
||||
#ifndef HAVE_PTRDIFF_T
|
||||
typedef OMPI_PTRDIFF_TYPE ptrdiff_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If we're in C, we may need to bring in the bool type and true/false
|
||||
* constants. OMPI_NEED_C_BOOL will be true if the compiler either
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user