Update to atomics selection, fix octal issue and rename defines
This commit was SVN r31396.
Этот коммит содержится в:
родитель
d46db26721
Коммит
6d577a2663
@ -766,15 +766,15 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
|
|||||||
[Enable use of OSX builtin atomics (default: disabled)])])
|
[Enable use of OSX builtin atomics (default: disabled)])])
|
||||||
|
|
||||||
if test "$enable_builtin_atomics" = "yes" ; then
|
if test "$enable_builtin_atomics" = "yes" ; then
|
||||||
OPAL_CHECK_SYNC_BUILTINS([ompi_cv_asm_builtin="SYNC_BUILTIN"],
|
OPAL_CHECK_SYNC_BUILTINS([ompi_cv_asm_builtin="BUILTIN_SYNC"],
|
||||||
[AC_MSG_ERROR([__sync builtin atomics requested but not found.])])
|
[AC_MSG_ERROR([__sync builtin atomics requested but not found.])])
|
||||||
AC_DEFINE([OPAL_C_GCC_INLINE_ASSEMBLY], [1],
|
AC_DEFINE([OPAL_C_GCC_INLINE_ASSEMBLY], [1],
|
||||||
[Whether C compiler supports GCC style inline assembly])
|
[Whether C compiler supports GCC style inline assembly])
|
||||||
elif test "$enable_osx_builtin_atomics" = "yes" ; then
|
elif test "$enable_osx_builtin_atomics" = "yes" ; then
|
||||||
AC_CHECK_HEADER([libkern/OSAtomic.h],[ompi_cv_asm_builtin="OSX_BUILTIN"],
|
AC_CHECK_HEADER([libkern/OSAtomic.h],[ompi_cv_asm_builtin="BUILTIN_OSX"],
|
||||||
[AC_MSG_ERROR([OSX builtin atomics requested but not found.])])
|
[AC_MSG_ERROR([OSX builtin atomics requested but not found.])])
|
||||||
else
|
else
|
||||||
ompi_cv_asm_builtin="NO_BUILTIN"
|
ompi_cv_asm_builtin="BUILTIN_NO"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OMPI_CHECK_ASM_PROC
|
OMPI_CHECK_ASM_PROC
|
||||||
@ -901,12 +901,12 @@ AC_MSG_ERROR([Can not continue.])
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
OPAL_CHECK_SYNC_BUILTINS([ompi_cv_asm_builtin="SYNC_BUILTIN"],
|
OPAL_CHECK_SYNC_BUILTINS([ompi_cv_asm_builtin="BUILTIN_SYNC"],
|
||||||
[AC_MSG_ERROR([No atomic primitives available for $host])])
|
[AC_MSG_ERROR([No atomic primitives available for $host])])
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test "$ompi_cv_asm_builtin" = "SYNC_BUILTIN" ; then
|
if test "$ompi_cv_asm_builtin" = "BUILTIN_SYNC" ; then
|
||||||
AC_DEFINE([OPAL_C_GCC_INLINE_ASSEMBLY], [1],
|
AC_DEFINE([OPAL_C_GCC_INLINE_ASSEMBLY], [1],
|
||||||
[Whether C compiler supports GCC style inline assembly])
|
[Whether C compiler supports GCC style inline assembly])
|
||||||
else
|
else
|
||||||
@ -957,7 +957,7 @@ AC_MSG_ERROR([Can not continue.])
|
|||||||
AC_DEFINE_UNQUOTED([OPAL_ASSEMBLY_FORMAT], ["$OPAL_ASSEMBLY_FORMAT"],
|
AC_DEFINE_UNQUOTED([OPAL_ASSEMBLY_FORMAT], ["$OPAL_ASSEMBLY_FORMAT"],
|
||||||
[Format of assembly file])
|
[Format of assembly file])
|
||||||
AC_SUBST([OPAL_ASSEMBLY_FORMAT])
|
AC_SUBST([OPAL_ASSEMBLY_FORMAT])
|
||||||
fi # if ompi_cv_asm_builtin = SYNC_BUILTIN
|
fi # if ompi_cv_asm_builtin = BUILTIN_SYNC
|
||||||
|
|
||||||
result="OMPI_$ompi_cv_asm_arch"
|
result="OMPI_$ompi_cv_asm_arch"
|
||||||
OPAL_ASSEMBLY_ARCH="$ompi_cv_asm_arch"
|
OPAL_ASSEMBLY_ARCH="$ompi_cv_asm_arch"
|
||||||
@ -993,7 +993,7 @@ AC_DEFUN([OMPI_ASM_FIND_FILE], [
|
|||||||
AC_REQUIRE([AC_PROG_GREP])
|
AC_REQUIRE([AC_PROG_GREP])
|
||||||
AC_REQUIRE([AC_PROG_FGREP])
|
AC_REQUIRE([AC_PROG_FGREP])
|
||||||
|
|
||||||
if test "$ompi_cv_asm_arch" != "WINDOWS" -a "$ompi_cv_asm_builtin" != "SYNC_BUILTIN" -a "$ompi_cv_asm_builtin" != "OSX_BUILTIN" ; then
|
if test "$ompi_cv_asm_arch" != "WINDOWS" -a "$ompi_cv_asm_builtin" != "BUILTIN_SYNC" -a "$ompi_cv_asm_builtin" != "BUILTIN_OSX" ; then
|
||||||
AC_CHECK_PROG([PERL], [perl], [perl])
|
AC_CHECK_PROG([PERL], [perl], [perl])
|
||||||
|
|
||||||
# see if we have a pre-built one already
|
# see if we have a pre-built one already
|
||||||
|
@ -37,9 +37,9 @@
|
|||||||
#define OMPI_SPARCV9_64 0062
|
#define OMPI_SPARCV9_64 0062
|
||||||
#define OMPI_MIPS 0070
|
#define OMPI_MIPS 0070
|
||||||
#define OMPI_ARM 0100
|
#define OMPI_ARM 0100
|
||||||
#define OMPI_SYNC_BUILTIN 0200
|
#define OMPI_BUILTIN_SYNC 0200
|
||||||
#define OMPI_OSX_BUILTIN 0400
|
#define OMPI_BUILTIN_OSX 0201
|
||||||
#define OMPI_NO_BUILTIN 0800
|
#define OMPI_BUILTIN_NO 0202
|
||||||
|
|
||||||
/* Formats */
|
/* Formats */
|
||||||
#define OMPI_DEFAULT 1000 /* standard for given architecture */
|
#define OMPI_DEFAULT 1000 /* standard for given architecture */
|
||||||
|
@ -139,9 +139,9 @@ typedef struct opal_atomic_lock_t opal_atomic_lock_t;
|
|||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#if defined(DOXYGEN)
|
#if defined(DOXYGEN)
|
||||||
/* don't include system-level gorp when generating doxygen files */
|
/* don't include system-level gorp when generating doxygen files */
|
||||||
#elif OPAL_ASSEMBLY_BUILTIN == OMPI_SYNC_BUILTIN
|
#elif OPAL_ASSEMBLY_BUILTIN == OMPI_BUILTIN_SYNC
|
||||||
#include "opal/sys/sync_builtin/atomic.h"
|
#include "opal/sys/sync_builtin/atomic.h"
|
||||||
#elif OPAL_ASSEMBLY_BUILTIN == OMPI_OSX_BUILTIN
|
#elif OPAL_ASSEMBLY_BUILTIN == OMPI_BUILTIN_OSX
|
||||||
#include "opal/sys/osx/atomic.h"
|
#include "opal/sys/osx/atomic.h"
|
||||||
#elif OPAL_ASSEMBLY_ARCH == OMPI_ALPHA
|
#elif OPAL_ASSEMBLY_ARCH == OMPI_ALPHA
|
||||||
#include "opal/sys/alpha/atomic.h"
|
#include "opal/sys/alpha/atomic.h"
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user