Skip to content

Clean up atomics interface #9901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
837 changes: 151 additions & 686 deletions config/opal_config_asm.m4

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions config/opal_configure_options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@ else
WANT_BRANCH_PROBABILITIES=0
fi

AC_ARG_ENABLE([builtin-atomics-for-ppc],[AS_HELP_STRING([--enable-builtin-atomics-for-ppc],
[POWER architectures only: Force use of builtin atomics if available. This could either be gcc builtins or C11 atomics, depending on what is available on your system. Enabling this is known to cause poor performance in atomic operations on Power machines. (default: disabled)])])
if test "x$enable_builtin_atomics_for_ppc" = "xyes" ; then
force_gcc_atomics_ppc=1
else
force_gcc_atomics_ppc=0
fi

#
# Memory debugging
Expand Down Expand Up @@ -420,6 +413,7 @@ AM_CONDITIONAL([OPAL_WANT_SCRIPT_WRAPPER_COMPILERS], [test "$enable_script_wrapp
#
# Support per-user config files?
#
OPAL_VAR_SCOPE_PUSH([result])
AC_ARG_ENABLE([per-user-config-files],
[AS_HELP_STRING([--enable-per-user-config-files],
[Disable per-user configuration files, to save disk accesses during job start-up. This is likely desirable for large jobs. Note that this can also be achieved by environment variables at run-time. (default: enabled)])])
Expand All @@ -430,6 +424,7 @@ else
fi
AC_DEFINE_UNQUOTED([OPAL_WANT_HOME_CONFIG_FILES], [$result],
[Enable per-user config files])
OPAL_VAR_SCOPE_POP

#
# Do we want to enable IPv6 support?
Expand Down
5 changes: 3 additions & 2 deletions ompi/mca/osc/portals4/osc_portals4_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
* Copyright (c) 2018-2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
* Copyright (c) 2020 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* $COPYRIGHT$
Expand All @@ -24,6 +24,7 @@
#include "opal/util/printf.h"
#include "opal/include/opal/align.h"
#include "opal/mca/mpool/base/base.h"
#include "opal/opal_portable_platform.h"

#include "ompi/mca/osc/base/base.h"
#include "ompi/mca/osc/base/osc_base_obj_convert.h"
Expand Down Expand Up @@ -589,7 +590,7 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit

module->passive_target_access_epoch = false;

#if OPAL_ASSEMBLY_ARCH == OPAL_X86_64 || OPAL_ASSEMBLY_ARCH == OPAL_IA32
#if defined(PLATFORM_ARCH_X86) || defined(PLATFORM_ARCH_X86_64)
*model = MPI_WIN_UNIFIED;
#else
*model = MPI_WIN_SEPARATE;
Expand Down
8 changes: 5 additions & 3 deletions ompi/patterns/net/allreduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* All rights reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* Copyright (c) 2019 Intel, Inc. All rights reserved.
* Copyright (c) 2022 Amazon.com, Inc. or its affiliates.
* All Rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -34,7 +36,7 @@ void recv_completion(nt status, struct ompi_process_name_t* peer, struct iovec*
int count, ompi_rml_tag_t tag, void* cbdata)
{
/* set receive completion flag */
MB();
opal_atomic_mb();
*(int *)cbdata=1;
}

Expand Down Expand Up @@ -232,7 +234,7 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype,
send_buffer^=1;
}

MB();
opal_atomic_mb();
/*
* Signal parent that data is ready
*/
Expand All @@ -255,7 +257,7 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype,

*recv_done=0;
*send_done=0;
MB();
opal_atomic_mb();

/* post non-blocking receive */
recv_iov.iov_base=scratch_bufers[send_buffer];
Expand Down
10 changes: 8 additions & 2 deletions opal/include/opal/sys/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# Copyright (c) 2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2020-2021 Google, LLC. All rights reserved.
# Copyright (c) 2022 Amazon.com, Inc. or its affiliates.
# All Rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -26,10 +28,14 @@
# This makefile.am does not stand on its own - it is included from opal/Makefile.am

headers += \
opal/sys/architecture.h \
opal/sys/atomic.h \
opal/sys/atomic_stdc.h \
opal/sys/atomic_impl.h \
opal/sys/atomic_impl_minmax_math.h \
opal/sys/atomic_impl_ptr_cswap.h \
opal/sys/atomic_impl_ptr_llsc.h \
opal/sys/atomic_impl_ptr_swap.h \
opal/sys/atomic_impl_size_t_math.h \
opal/sys/atomic_impl_spinlock.h \
opal/sys/timer.h \
opal/sys/cma.h

Expand Down
48 changes: 0 additions & 48 deletions opal/include/opal/sys/architecture.h

This file was deleted.

Loading