@@ -17,6 +17,7 @@ dnl Copyright (c) 2014-2017 Los Alamos National Security, LLC. All rights
1717dnl reserved.
1818dnl Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
1919dnl reserved.
20+ dnl Copyright (c) 2021 Google, LLC. All rights reserved.
2021dnl $COPYRIGHT$
2122dnl
2223dnl Additional copyrights may follow
@@ -1022,7 +1023,7 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
10221023
10231024 AC_ARG_ENABLE ( [ builtin-atomics] ,
10241025 [ AC_HELP_STRING ([ --enable-builtin-atomics] ,
1025- [ Enable use of __sync builtin atomics (default: enabled)] )] )
1026+ [ Enable use of __atomic builtin atomics (default: enabled)] )] )
10261027
10271028 opal_cv_asm_builtin="BUILTIN_NO"
10281029 AS_IF ( [ test "$opal_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" != "no"] ,
@@ -1075,6 +1076,12 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
10751076 OPAL_ASM_ARM_VERSION=8
10761077 AC_DEFINE_UNQUOTED ( [ OPAL_ASM_ARM_VERSION] , [ $OPAL_ASM_ARM_VERSION] ,
10771078 [ What ARM assembly version to use] )
1079+ # If built-in atomics were not specifically request then disable the
1080+ # use of built-in atomics. The performance of Open MPI when using the
1081+ # built-ins is worse than when they are not in use.
1082+ if test "$enable_builtin_atomics" != "yes" ; then
1083+ opal_cv_asm_builtin="BUILTIN_NO"
1084+ fi
10781085 OPAL_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
10791086 ;;
10801087
0 commit comments