always align words if heterogeneous support is enabled
Этот коммит содержится в:
родитель
973a9ec247
Коммит
c4ebdba035
@ -325,6 +325,29 @@ AC_DEFINE_UNQUOTED([OPAL_ENABLE_HETEROGENEOUS_SUPPORT],
|
||||
[Enable features required for heterogeneous support])
|
||||
|
||||
|
||||
if test "$opal_want_heterogeneous" = 1; then
|
||||
ompi_cv_c_word_size_align=yes
|
||||
else
|
||||
AC_CACHE_CHECK([if word-sized integers must be word-size aligned],
|
||||
[ompi_cv_c_word_size_align],
|
||||
[AC_LANG_PUSH(C)
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([dnl
|
||||
#include <stdlib.h>], [[ long data[2] = {0, 0};
|
||||
long *lp;
|
||||
int *ip;
|
||||
ip = (int*) data;
|
||||
ip++;
|
||||
lp = (long*) ip;
|
||||
return lp[0]; ]])],
|
||||
[ompi_cv_c_word_size_align=no],
|
||||
[ompi_cv_c_word_size_align=yes],
|
||||
[ompi_cv_c_word_size_align=yes])])
|
||||
fi
|
||||
AS_IF([test $ompi_cv_c_word_size_align = yes], [results=1], [results=0])
|
||||
AC_DEFINE_UNQUOTED([OPAL_ALIGN_WORD_SIZE_INTEGERS], [$results],
|
||||
[set to 1 if word-size integers must be aligned to word-size padding to prevent bus errors])
|
||||
|
||||
|
||||
#
|
||||
# Cross-compile data
|
||||
#
|
||||
|
18
configure.ac
18
configure.ac
@ -935,24 +935,6 @@ AC_C_BIGENDIAN
|
||||
|
||||
OPAL_CHECK_BROKEN_QSORT
|
||||
|
||||
AC_CACHE_CHECK([if word-sized integers must be word-size aligned],
|
||||
[ompi_cv_c_word_size_align],
|
||||
[AC_LANG_PUSH(C)
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([dnl
|
||||
#include <stdlib.h>], [[ long data[2] = {0, 0};
|
||||
long *lp;
|
||||
int *ip;
|
||||
ip = (int*) data;
|
||||
ip++;
|
||||
lp = (long*) ip;
|
||||
return lp[0]; ]])],
|
||||
[ompi_cv_c_word_size_align=no],
|
||||
[ompi_cv_c_word_size_align=yes],
|
||||
[ompi_cv_c_word_size_align=yes])])
|
||||
AS_IF([test $ompi_cv_c_word_size_align = yes], [results=1], [results=0])
|
||||
AC_DEFINE_UNQUOTED([OPAL_ALIGN_WORD_SIZE_INTEGERS], [$results],
|
||||
[set to 1 if word-size integers must be aligned to word-size padding to prevent bus errors])
|
||||
|
||||
# all: SYSV semaphores
|
||||
# all: SYSV shared memory
|
||||
# all: size of FD_SET
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user