Skip to content
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

opal/pmix112: Sync with PMIx v1.2.3rc1 #4080

Merged
merged 1 commit into from
Aug 15, 2017
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
37 changes: 4 additions & 33 deletions opal/mca/pmix/pmix112/pmix/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ include src/server/Makefile.am
include src/sec/Makefile.am
include src/common/Makefile.am

include src/atomics/asm/Makefile.am
include src/atomics/sys/Makefile.include

if WANT_DSTORE
Expand All @@ -69,30 +68,18 @@ include src/dstore/Makefile.am
endif

if PMIX_EMBEDDED_MODE
noinst_LTLIBRARIES = libpmix.la libasm.la
noinst_LTLIBRARIES = libpmix.la
libpmix_la_SOURCES = $(headers) $(sources)
libpmix_la_LDFLAGS =

else

lib_LTLIBRARIES = libpmix.la libasm.la
lib_LTLIBRARIES = libpmix.la
libpmix_la_SOURCES = $(headers) $(sources)
libpmix_la_LDFLAGS = -version-info $(libpmix_so_version)
SUBDIRS = . test examples src/atomics/asm
SUBDIRS = . test examples
endif

# ASM Start
if PMIX_HAVE_ASM_FILE
nodist_libasm_la_SOURCES = src/atomics/asm/atomic-asm.S
libasm_la_DEPENDENCIES = src/atomics/asm/generated/@PMIX_ASM_FILE@
else
nodist_libasm_la_SOURCES =
libasm_la_DEPENDENCIES =
endif

dist_libasm_la_SOURCES = src/atomics/asm/asm.c
# ASM End

if WANT_INSTALL_HEADERS
pmixdir = $(pmixincludedir)/$(subdir)
nobase_pmix_HEADERS = $(headers)
Expand All @@ -114,27 +101,11 @@ EXTRA_DIST += README INSTALL VERSION LICENSE autogen.sh \
test/test_common.h test/cli_stages.h \
test/server_callbacks.h test/test_fence.h \
test/test_publish.h test/test_resolve_peers.h \
test/test_spawn.h test/utils.h test/test_cd.h \
src/atomics/asm/asm-data.txt \
src/atomics/asm/generate-asm.pl \
src/atomics/asm/generate-all-asm.pl \
src/atomics/asm/base/aix.conf \
src/atomics/asm/base/default.conf \
src/atomics/asm/base/X86_64.asm \
src/atomics/asm/base/ARM.asm \
src/atomics/asm/base/IA32.asm \
src/atomics/asm/base/IA64.asm \
src/atomics/asm/base/MIPS.asm \
src/atomics/asm/base/POWERPC32.asm \
src/atomics/asm/base/POWERPC64.asm \
src/atomics/asm/base/SPARCV9_32.asm \
src/atomics/asm/base/SPARCV9_64.asm
test/test_spawn.h test/utils.h test/test_cd.h


#
# Copy over all the generated files
#
dist-hook:
mkdir "${distdir}/src/atomics/asm/generated"
$(PERL) "$(top_srcdir)/src/atomics/asm/generate-all-asm.pl" "$(PERL)" "$(srcdir)/src/atomics/asm" "$(distdir)/src/atomics/asm"
env LS_COLORS= sh "$(top_srcdir)/config/distscript.sh" "$(top_srcdir)" "$(distdir)" "$(PMIX_VERSION)" "$(PMIX_REPO_REV)"
17 changes: 15 additions & 2 deletions opal/mca/pmix/pmix112/pmix/NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
$COPYRIGHT$

Expand All @@ -20,10 +20,23 @@ other, a single NEWS-worthy item might apply to different series. For
example, a bug might be fixed in the master, and then moved to the
current release as well as the "stable" bug fix release branch.

1.2.3 -- TBD
1.2.4 -- TBD
----------------------


1.2.3 -- 24 Aug. 2017
----------------------
- Resolve visibility issues for public APIs (PR #451)
- Atomics update - remove custom ASM atomics (PR #458)
- Fix job-fence test (PR #423)
- Replace stale PMIX_DECLSPEC with PMIX_EXPORT (PR #448)
- Memory barrier fixes for thread shifting (PR #387)
- Fix race condition in dmodex (PR #346)
- Allow disable backward compatability for PMI-1/2 (PR #350)
- Fix segv in PMIx_server_deregister_nspace (PR #343)
- Fix possible hang in PMIx_Abort (PR #339)


1.2.2 -- 21 March 2017
----------------------
- Compiler fix for Sun/Oracle CC (PR #322)
Expand Down
6 changes: 3 additions & 3 deletions opal/mca/pmix/pmix112/pmix/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ release=3
# The only requirement is that it must be entirely printable ASCII
# characters and have no white space.

greek=
greek=rc1

# If repo_rev is empty, then the repository version number will be
# obtained during "make dist" via the "git describe --tags --always"
# command, or with the date (if "git describe" fails) in the form of
# "date<date>".

repo_rev=git445f882
repo_rev=gitb5387205

# If tarball_version is not empty, it is used as the version string in
# the tarball filename, regardless of all other versions listed in
Expand All @@ -45,7 +45,7 @@ tarball_version=

# The date when this release was created

date="Aug 10, 2017"
date="Aug 14, 2017"

# The shared library version of each of PMIx's public libraries.
# These versions are maintained in accordance with the "Library
Expand Down
1 change: 0 additions & 1 deletion opal/mca/pmix/pmix112/pmix/config/pmix.m4
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ AC_DEFUN([PMIX_SETUP_CORE],[

AC_CONFIG_FILES(
pmix_config_prefix[Makefile]
pmix_config_prefix[src/atomics/asm/Makefile]
)

# Success
Expand Down
156 changes: 23 additions & 133 deletions opal/mca/pmix/pmix112/pmix/config/pmix_config_asm.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dnl Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
dnl Copyright (c) 2015-2017 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
dnl Copyright (c) 2014-2017 Los Alamos National Security, LLC. All rights
dnl reserved.
dnl Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
dnl reserved.
Expand Down Expand Up @@ -194,9 +194,15 @@ AC_DEFUN([PMIX_CHECK_GCC_BUILTIN_CSWAP_INT128], [
AC_DEFUN([PMIX_CHECK_GCC_ATOMIC_BUILTINS], [
AC_MSG_CHECKING([for __atomic builtin atomics])

AC_TRY_LINK([long tmp, old = 0;], [__atomic_thread_fence(__ATOMIC_SEQ_CST);
AC_TRY_LINK([
#include <stdint.h>
uint32_t tmp, old = 0;
uint64_t tmp64, old64 = 0;], [
__atomic_thread_fence(__ATOMIC_SEQ_CST);
__atomic_compare_exchange_n(&tmp, &old, 1, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
__atomic_add_fetch(&tmp, 1, __ATOMIC_RELAXED);],
__atomic_add_fetch(&tmp, 1, __ATOMIC_RELAXED);
__atomic_compare_exchange_n(&tmp64, &old64, 1, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
__atomic_add_fetch(&tmp64, 1, __ATOMIC_RELAXED);],
[AC_MSG_RESULT([yes])
$1],
[AC_MSG_RESULT([no])
Expand Down Expand Up @@ -879,6 +885,7 @@ return ret;

if test "$asm_result" = "yes" ; then
PMIX_C_GCC_INLINE_ASSEMBLY=1
pmix_cv_asm_inline_supported="yes"
else
PMIX_C_GCC_INLINE_ASSEMBLY=0
fi
Expand All @@ -890,70 +897,6 @@ return ret;
unset PMIX_C_GCC_INLINE_ASSEMBLY assembly asm_result
])dnl


dnl #################################################################
dnl
dnl PMIX_CHECK_INLINE_DEC
dnl
dnl DEFINE PMIX_DEC to 0 or 1 depending on DEC
dnl support
dnl
dnl #################################################################
AC_DEFUN([PMIX_CHECK_INLINE_C_DEC],[

AC_MSG_CHECKING([if $CC supports DEC inline assembly])

AC_LINK_IFELSE([AC_LANG_PROGRAM([
AC_INCLUDES_DEFAULT
#include <c_asm.h>],
[[asm("");
return 0;]])],
[asm_result="yes"], [asm_result="no"])

AC_MSG_RESULT([$asm_result])

if test "$asm_result" = "yes" ; then
PMIX_C_DEC_INLINE_ASSEMBLY=1
else
PMIX_C_DEC_INLINE_ASSEMBLY=0
fi

AC_DEFINE_UNQUOTED([PMIX_C_DEC_INLINE_ASSEMBLY],
[$PMIX_C_DEC_INLINE_ASSEMBLY],
[Whether C compiler supports DEC style inline assembly])

unset PMIX_C_DEC_INLINE_ASSEMBLY asm_result
])dnl


dnl #################################################################
dnl
dnl PMIX_CHECK_INLINE_XLC
dnl
dnl DEFINE PMIX_XLC to 0 or 1 depending on XLC
dnl support
dnl
dnl #################################################################
AC_DEFUN([PMIX_CHECK_INLINE_C_XLC],[

AC_MSG_CHECKING([if $CC supports XLC inline assembly])

PMIX_C_XLC_INLINE_ASSEMBLY=0
asm_result="no"
if test "$CC" = "xlc" ; then
PMIX_XLC_INLINE_ASSEMBLY=1
asm_result="yes"
fi

AC_MSG_RESULT([$asm_result])
AC_DEFINE_UNQUOTED([PMIX_C_XLC_INLINE_ASSEMBLY],
[$PMIX_C_XLC_INLINE_ASSEMBLY],
[Whether C compiler supports XLC style inline assembly])

unset PMIX_C_XLC_INLINE_ASSEMBLY
])dnl


dnl #################################################################
dnl
dnl PMIX_CONFIG_ASM
Expand All @@ -975,12 +918,12 @@ AC_DEFUN([PMIX_CONFIG_ASM],[
[], [enable_builtin_atomics="yes"])

pmix_cv_asm_builtin="BUILTIN_NO"
if test "$pmix_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" = "yes" ; then
PMIX_CHECK_GCC_ATOMIC_BUILTINS([pmix_cv_asm_builtin="BUILTIN_GCC"], [])
fi
if test "$pmix_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" = "yes" ; then
PMIX_CHECK_SYNC_BUILTINS([pmix_cv_asm_builtin="BUILTIN_SYNC"], [])
fi
AS_IF([test "$pmix_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" != "no"],
[PMIX_CHECK_GCC_ATOMIC_BUILTINS([pmix_cv_asm_builtin="BUILTIN_GCC"], [])])
AS_IF([test "$pmix_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" != "no"],
[PMIX_CHECK_SYNC_BUILTINS([pmix_cv_asm_builtin="BUILTIN_SYNC"], [])])
AS_IF([test "$pmix_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" = "yes"],
[AC_MSG_WARN([__sync builtin atomics requested but not found - proceeding with inline atomics])])

PMIX_CHECK_ASM_PROC
PMIX_CHECK_ASM_TEXT
Expand Down Expand Up @@ -1084,17 +1027,19 @@ AC_DEFUN([PMIX_CONFIG_ASM],[
fi
PMIX_GCC_INLINE_ASSIGN='"1: li %0,0" : "=&r"(ret)'
;;

# There is no current difference between s390 and s390x
# But use two different defines in case some come later
# as s390 is 31bits while s390x is 64bits
s390-*)
pmix_cv_asm_arch="S390"
PMIX_CHECK_SYNC_BUILTINS([pmix_cv_asm_builtin="BUILTIN_SYNC"],
[AC_MSG_ERROR([No atomic primitives available for $host])])
;;
s390x-*)
pmix_cv_asm_arch="S390X"
PMIX_CHECK_SYNC_BUILTINS([pmix_cv_asm_builtin="BUILTIN_SYNC"],
[AC_MSG_ERROR([No atomic primitives available for $host])])
;;

sparc*-*)
# SPARC v9 (and above) are the only ones with 64bit support
# if compiling 32 bit, see if we are v9 (aka v8plus) or
Expand Down Expand Up @@ -1156,10 +1101,9 @@ AC_MSG_ERROR([Can not continue.])
;;
esac

pmix_cv_asm_inline_supported="no"
# now that we know our architecture, try to inline assemble
PMIX_CHECK_INLINE_C_GCC([$PMIX_GCC_INLINE_ASSIGN])
PMIX_CHECK_INLINE_C_DEC
PMIX_CHECK_INLINE_C_XLC

# format:
# config_file-text-global-label_suffix-gsym-lsym-type-size-align_log-ppc_r_reg-64_bit-gnu_stack
Expand Down Expand Up @@ -1244,64 +1188,10 @@ AC_DEFUN([PMIX_ASM_FIND_FILE], [
AC_REQUIRE([AC_PROG_GREP])
AC_REQUIRE([AC_PROG_FGREP])

if test "$pmix_cv_asm_arch" != "WINDOWS" && test "$pmix_cv_asm_builtin" != "BUILTIN_SYNC" && test "$pmix_cv_asm_builtin" != "BUILTIN_GCC" && test "$pmix_cv_asm_builtin" != "BUILTIN_OSX" ; then
# see if we have a pre-built one already
AC_MSG_CHECKING([for pre-built assembly file])
pmix_cv_asm_file=""
if $GREP "$pmix_cv_asm_arch" "${PMIX_TOP_SRCDIR}/src/atomics/asm/asm-data.txt" | $FGREP "$pmix_cv_asm_format" >conftest.out 2>&1 ; then
pmix_cv_asm_file="`cut -f3 conftest.out`"
if test ! "$pmix_cv_asm_file" = "" ; then
pmix_cv_asm_file="atomic-${pmix_cv_asm_file}.s"
if test -f "${PMIX_TOP_SRCDIR}/src/atomics/asm/generated/${pmix_cv_asm_file}" ; then
AC_MSG_RESULT([yes ($pmix_cv_asm_file)])
else
AC_MSG_RESULT([no ($pmix_cv_asm_file not found)])
pmix_cv_asm_file=""
fi
fi
else
AC_MSG_RESULT([no (not in asm-data)])
fi
rm -rf conftest.*

if test "$pmix_cv_asm_file" = "" ; then
# Can we generate a file?
AC_MSG_CHECKING([whether possible to generate assembly file])
mkdir -p pmix/asm/generated
pmix_cv_asm_file="atomic-local.s"
pmix_try='$PERL $PMIX_TOP_SRCDIR/src/atomics/asm/generate-asm.pl $pmix_cv_asm_arch "$pmix_cv_asm_format" $PMIX_TOP_SRCDIR/src/atomics/asm/base $PMIX_TOP_BUILDDIR/src/atomics/asm/generated/$pmix_cv_asm_file >conftest.out 2>&1'
if AC_TRY_EVAL(pmix_try) ; then
# save the warnings
cat conftest.out >&AC_FD_CC
AC_MSG_RESULT([yes])
else
# save output
cat conftest.out >&AC_FD_CC
pmix_cv_asm_file=""
AC_MSG_RESULT([failed])
AC_MSG_WARN([Could not build atomic operations assembly file.])
AC_MSG_WARN([There will be no atomic operations for this build.])
fi
fi
rm -rf conftest.*
if test "$pmix_cv_asm_arch" != "WINDOWS" && test "$pmix_cv_asm_builtin" != "BUILTIN_SYNC" && test "$pmix_cv_asm_builtin" != "BUILTIN_GCC" && test "$pmix_cv_asm_builtin" != "BUILTIN_OSX" && test "$pmix_cv_asm_inline_arch" = "no" ; then
AC_MSG_ERROR([no atomic support available. exiting])
else
# On windows with VC++, atomics are done with compiler primitives
pmix_cv_asm_file=""
fi

AC_MSG_CHECKING([for atomic assembly filename])
if test "$pmix_cv_asm_file" = "" ; then
AC_MSG_RESULT([none])
result=0
else
AC_MSG_RESULT([$pmix_cv_asm_file])
result=1
fi

AC_DEFINE_UNQUOTED([PMIX_HAVE_ASM_FILE], [$result],
[Whether there is an atomic assembly file available])
AM_CONDITIONAL([PMIX_HAVE_ASM_FILE], [test "$result" = "1"])

PMIX_ASM_FILE=$pmix_cv_asm_file
AC_SUBST(PMIX_ASM_FILE)
])dnl
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@ typedef unsigned long long uintptr_t;
#endif

#endif /* PMIX_STDINT_H */

Loading