Skip to content

Commit 16f4797

Browse files
authored
Merge pull request #8413 from hjelmn/v4.1.x_use_hand_written_atomics_for_aarch64_by_default_because_the_builtins_are_inferior_for_our_usage
opal: disable the __atomic built-in atomics by default on AArch64
2 parents 4421fce + 3248a77 commit 16f4797

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

NEWS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
2222
Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
2323
Copyright (c) 2018-2020 Amazon.com, Inc. or its affiliates. All Rights
2424
reserved.
25-
Copyright (c) 2019-2020 Triad National Security, LLC. All rights
25+
Copyright (c) 2019-2021 Triad National Security, LLC. All rights
2626
reserved.
27+
Copyright (c) 2021 Google, LLC. All rights reserved.
2728
$COPYRIGHT$
2829

2930
Additional copyrights may follow
@@ -103,6 +104,7 @@ included in the vX.Y.Z section and be denoted as:
103104
- OFI/libfabric: Added btl for one-sided support
104105
- OFI/libfabric: Multiple small bugfixes
105106
- libnbc: Adding numerous performance-improving algorithms
107+
- AArch64: disable gcc built-in atomics by default.
106108

107109
4.0.5 -- August, 2020
108110
---------------------

config/opal_config_asm.m4

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dnl Copyright (c) 2014-2017 Los Alamos National Security, LLC. All rights
1717
dnl reserved.
1818
dnl Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
1919
dnl reserved.
20+
dnl Copyright (c) 2021 Google, LLC. All rights reserved.
2021
dnl $COPYRIGHT$
2122
dnl
2223
dnl 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

Comments
 (0)