diff --git a/opal/mca/pmix/pmix3x/configure.m4 b/opal/mca/pmix/pmix3x/configure.m4
index 8ad5343b6a..507ec0fa4d 100644
--- a/opal/mca/pmix/pmix3x/configure.m4
+++ b/opal/mca/pmix/pmix3x/configure.m4
@@ -16,6 +16,7 @@
# Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
# Copyright (c) 2015-2016 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
+# Copyright (c) 2020 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@@ -60,6 +61,9 @@ AC_DEFUN([MCA_opal_pmix_pmix3x_CONFIG],[
[opal_pmix_pmix3x_args="--with-devel-headers $opal_pmix_pmix3x_args"])
CPPFLAGS="-I$OPAL_TOP_SRCDIR -I$OPAL_TOP_BUILDDIR -I$OPAL_TOP_SRCDIR/opal/include -I$OPAL_TOP_BUILDDIR/opal/include $CPPFLAGS"
+ # OpenPMIx Man pages are not needed when embedded. Avoids pandoc check
+ opal_pmix_pmix3x_args="--disable-man-pages $opal_pmix_pmix3x_args"
+
OPAL_CONFIG_SUBDIR([$opal_pmix_pmix3x_basedir/pmix],
[$opal_pmix_pmix3x_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'],
[opal_pmix_pmix3x_happy=1], [opal_pmix_pmix3x_happy=0])
diff --git a/opal/mca/pmix/pmix3x/pmix/HACKING b/opal/mca/pmix/pmix3x/pmix/HACKING
new file mode 100644
index 0000000000..f96d2423a3
--- /dev/null
+++ b/opal/mca/pmix/pmix3x/pmix/HACKING
@@ -0,0 +1,274 @@
+Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
+ University Research and Technology
+ Corporation. All rights reserved.
+Copyright (c) 2004-2005 The University of Tennessee and The University
+ of Tennessee Research Foundation. All rights
+ reserved.
+Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
+ University of Stuttgart. All rights reserved.
+Copyright (c) 2004-2005 The Regents of the University of California.
+ All rights reserved.
+Copyright (c) 2008-2020 Cisco Systems, Inc. All rights reserved
+Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
+$COPYRIGHT$
+
+Additional copyrights may follow
+
+$HEADER$
+
+Overview
+========
+
+This file is here for those who are building/exploring PMIx in its
+source code form, most likely through a developer's tree (i.e., a Git
+checkout).
+
+
+Debugging vs. Optimized Builds
+==============================
+
+**If you are building PMIx from a Git checkout**, the default build
+includes a lot of debugging features. This happens automatically when
+when configure detects the hidden ".git" Git meta directory (that is
+present in all Git checkouts) in your source tree, and therefore
+activates a number of developer-only debugging features in the PMIx
+code base.
+
+By definition, debugging builds will perform [much] slower than
+optimized builds of PMIx. You should *NOT* conduct timing tests
+or try to run production performance numbers with debugging builds.
+
+**REMEMBER** that you need to add appropriate -O directives
+to your CFLAGS so your compiler will optimize the code! Otherwise,
+while we will have disabled various debug code paths, the resulting
+binary will not have been optimized.
+
+NOTE: this version of PMIx requires the Libevent package to build
+and operate. Any version of Libevent greater than or equal to
+2.0.21 is acceptable. It optionally supports the HWLOC package
+for providing topology information to both the host environment
+(by collecting local inventory for rollup) and local client
+processes. Any version of HWLOC greater than 1.10 is supported,
+although versions in the 2.x series are recommended.
+
+If you wish to build an optimized version of PMIx from a
+developer's checkout, you have a couple of options:
+
+1. Manually specify configure options to disable the debugging
+ option. You'll need to carefully examine the output of
+ "./configure --help" to see which options to disable.
+ They are all listed, but some are less obvious than others (they
+ are not listed here because it is a changing set of flags; by
+ Murphy's Law, listing them here will pretty much guarantee that
+ this file will get out of date):
+
+ shell$ ./autogen.pl
+ shell$ ./configure --disable-debug ...
+ [...lots of output...]
+ shell$ make all install
+
+2. Use a VPATH build. Simply build PMIx from a different
+ directory than the source tree -- one where the .git subdirectory
+ is not present. For example:
+
+ shell$ git clone https://github.com/openpmix/openpmix.git pmix
+ shell$ cd pmix
+ shell$ ./autogen.pl
+ shell$ mkdir build
+ shell$ cd build
+ shell$ ../configure ...
+ [...lots of output...]
+ shell$ make all install
+
+Note that in both cases you must point configure at the libevent
+installation using the --with-libevent=
option if it is in
+a non-standard location. Similarly, non-standard locations for
+the HWLOC package must be specified using the --with-hwloc=
+option. In both cases, PMIx will automatically detect these
+packages in standard locations and build-in support for them
+unless otherwise specified using the respective configure option.
+
+
+Use of GNU Autoconf, Automake, and Libtool (and m4)
+===================================================
+
+This procedure is *ONLY* necessary if you are building from a
+developer's tree. If you have a PMIx distribution tarball, this
+procedure is unnecessary -- you can (and should) skip reading this
+section.
+
+If you are building PMIx from a developer's tree, you must first
+install fairly recent versions of the GNU tools Autoconf, Automake,
+and Libtool (and possibly GNU m4, because recent versions of Autoconf
+have specific GNU m4 version requirements). The specific versions
+required depend on if you are using the master or a release branch (and
+which release branch you are using). The specific versions can be
+found at:
+
+ https://pmix.org/code/getting-the-reference-implementation/
+
+You can check what versions of the autotools you have installed with
+the following:
+
+shell$ m4 --version
+shell$ autoconf --version
+shell$ automake --version
+shell$ libtoolize --version
+
+To strengthen the above point: the core PMIx developers typically
+use very, very recent versions of the GNU tools. There are known bugs
+in older versions of the GNU tools that PMIx no longer compensates
+for (it seemed senseless to indefinitely support patches for ancient
+versions of Autoconf, for example). You *WILL* have problems if you
+do not use recent versions of the GNU tools.
+
+If you need newer versions, you are *strongly* encouraged to heed the
+following advice:
+
+NOTE: On MacOS/X, the default "libtool" program is different than the
+ GNU libtool. You must download and install the GNU version
+ (e.g., via MacPorts, Homebrew, or some other mechanism).
+
+1. Unless your OS distribution has easy-to-use binary installations,
+ the sources can be can be downloaded from:
+
+ ftp://ftp.gnu.org/gnu/autoconf/
+ ftp://ftp.gnu.org/gnu/automake/
+ ftp://ftp.gnu.org/gnu/libtool/
+ and if you need it:
+ ftp://ftp.gnu.org/gnu/m4/
+
+ NOTE: It is certainly easiest to download/build/install all four of
+ these tools together. But note that PMIx has no specific m4
+ requirements; it is only listed here because Autoconf requires
+ minimum versions of GNU m4. Hence, you may or may not *need* to
+ actually install a new version of GNU m4. That being said, if you
+ are confused or don't know, just install the latest GNU m4 with the
+ rest of the GNU Autotools and everything will work out fine.
+
+2. Build and install the tools in the following order:
+
+ 2a. m4
+ 2b. Autoconf
+ 2c. Automake
+ 2d. Libtool
+
+3. You MUST install the last three tools (Autoconf, Automake, Libtool)
+ into the same prefix directory. These three tools are somewhat
+ inter-related, and if they're going to be used together, they MUST
+ share a common installation prefix.
+
+ You can install m4 anywhere as long as it can be found in the path;
+ it may be convenient to install it in the same prefix as the other
+ three. Or you can use any recent-enough m4 that is in your path.
+
+ 3a. It is *strongly* encouraged that you do not install your new
+ versions over the OS-installed versions. This could cause
+ other things on your system to break. Instead, install into
+ $HOME/local, or /usr/local, or wherever else you tend to
+ install "local" kinds of software.
+ 3b. In doing so, be sure to prefix your $path with the directory
+ where they are installed. For example, if you install into
+ $HOME/local, you may want to edit your shell startup file
+ (.bashrc, .cshrc, .tcshrc, etc.) to have something like:
+
+ # For bash/sh:
+ export PATH=$HOME/local/bin:$PATH
+ # For csh/tcsh:
+ set path = ($HOME/local/bin $path)
+
+ 3c. Ensure to set your $path *BEFORE* you configure/build/install
+ the four packages.
+
+4. All four packages require two simple commands to build and
+ install (where PREFIX is the prefix discussed in 3, above).
+
+ shell$ cd m4-1.4.13
+ shell$ ./configure --prefix=PREFIX
+ shell$ make; make install
+
+ --> If you are using the csh or tcsh shells, be sure to run the
+ "rehash" command after you install each package.
+
+ shell$ cd ../autoconf-2.68
+ shell$ ./configure --prefix=PREFIX
+ shell$ make; make install
+
+ --> If you are using the csh or tcsh shells, be sure to run the
+ "rehash" command after you install each package.
+
+ shell$ cd ../automake-1.11.1
+ shell$ ./configure --prefix=PREFIX
+ shell$ make; make install
+
+ --> If you are using the csh or tcsh shells, be sure to run the
+ "rehash" command after you install each package.
+
+ shell$ cd ../libtool-2.2.8
+ shell$ ./configure --prefix=PREFIX
+ shell$ make; make install
+
+ --> If you are using the csh or tcsh shells, be sure to run the
+ "rehash" command after you install each package.
+
+ m4, Autoconf and Automake build and install very quickly; Libtool will
+ take a minute or two.
+
+5. You can now run PMIx’s top-level "autogen.pl" script. This script
+ will invoke the GNU Autoconf, Automake, and Libtool commands in the
+ proper order and setup to run PMIx's top-level "configure" script.
+
+ 5a. You generally need to run autogen.pl only when the top-level
+ file "configure.ac" changes, or any files in the config/ or
+ /config/ directories change (these directories are
+ where a lot of "include" files for PMI’xs configure script
+ live).
+
+ 5b. You do *NOT* need to re-run autogen.pl if you modify a
+ Makefile.am.
+
+Use of Flex
+===========
+
+Flex may be used during the compilation of a developer's checkout (it is
+not used to build official distribution tarballs). Other flavors of
+lex are *not* supported: given the choice of making parsing code
+portable between all flavors of lex and doing more interesting work on
+PMIx, we greatly prefer the latter.
+
+Note that no testing has been performed to see what the minimum
+version of Flex is required by PMIx. We suggest that you use
+v2.5.35 at the earliest.
+
+Note that the flex-generated code generates some compiler warnings on
+some platforms, but the warnings do not seem to be consistent or
+uniform on all platforms, compilers, and flex versions. As such, we
+have done little to try to remove those warnings.
+
+If you do not have Flex installed, it can be downloaded from the
+following URL:
+
+ https://github.com/westes/flex
+
+Use of Pandoc
+=============
+
+Similar to prior sections, you need to read/care about this section
+*ONLY* if you are building from a developer's tree (i.e., a Git clone
+of the Open MPI source tree). If you have an Open MPI distribution
+tarball, the contents of this section are optional -- you can (and
+probably should) skip reading this section.
+
+The Pandoc tool is used to generate Open MPI's man pages.
+Specifically: Open MPI's man pages are written in Markdown; Pandoc is
+the tool that converts that Markdown to nroff (i.e., the format of man
+pages).
+
+You must have Pandoc >=v1.12 when building Open MPI from a developer's
+tree. If configure cannot find Pandoc >=v1.12, it will abort.
+
+If you need to install Pandoc, check your operating system-provided
+packages (to include MacOS Homebrew and MacPorts). The Pandoc project
+itself also offers binaries for their releases:
+
+ https://pandoc.org/
diff --git a/opal/mca/pmix/pmix3x/pmix/Makefile.am b/opal/mca/pmix/pmix3x/pmix/Makefile.am
index 88eda87767..11f9918e98 100644
--- a/opal/mca/pmix/pmix3x/pmix/Makefile.am
+++ b/opal/mca/pmix/pmix3x/pmix/Makefile.am
@@ -11,7 +11,7 @@
# All rights reserved.
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
-# Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
+# Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
# Copyright (c) 2019 Amazon.com, Inc. or its affiliates. All Rights
# reserved.
# $COPYRIGHT$
@@ -32,7 +32,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --disable-dlopen
headers =
sources =
nodist_headers =
-EXTRA_DIST = AUTHORS README INSTALL VERSION LICENSE autogen.pl
+EXTRA_DIST = AUTHORS README HACKING INSTALL VERSION LICENSE autogen.pl Makefile.pmix-rules
# Only install the valgrind suppressions file and man pages
# if we're building in standalone mode
@@ -60,3 +60,6 @@ nroff:
dist-hook:
env LS_COLORS= sh "$(top_srcdir)/config/distscript.sh" "$(top_srcdir)" "$(distdir)" "$(PMIX_VERSION)" "$(PMIX_REPO_REV)"
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = maint/pmix.pc
diff --git a/opal/mca/pmix/pmix3x/pmix/Makefile.pmix-rules b/opal/mca/pmix/pmix3x/pmix/Makefile.pmix-rules
new file mode 100644
index 0000000000..a841cc5db0
--- /dev/null
+++ b/opal/mca/pmix/pmix3x/pmix/Makefile.pmix-rules
@@ -0,0 +1,42 @@
+# -*- makefile -*-
+# Copyright (c) 2008-2020 Cisco Systems, Inc. All rights reserved.
+# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright (c) 2019 Intel, Inc. All rights reserved.
+# $COPYRIGHT$
+#
+# Additional copyrights may follow
+#
+# $HEADER$
+#
+
+MD2NROFF = $(PMIX_TOP_SRCDIR)/config/md2nroff.pl
+
+%.1: %.1.md
+ $(PMIX_V_GEN) $(MD2NROFF) --source=$< --dest=$@ --pandoc=$(PANDOC)
+
+# It is an error to "configure --disable-man-pages" and then try to
+# "make dist".
+if !PMIX_ENABLE_MAN_PAGES
+dist-hook:
+ @echo "************************************************************************************"
+ @echo "ERROR: 'make dist' inoperable when Open PMIx is configured with --disable-man-pages"
+ @echo "************************************************************************************"
+ @/bin/false
+endif
+
+# A little verbosity magic; "make" will show the terse output. "make
+# V=1" will show the actual commands used (just like the other
+# Automake-generated compilation/linker rules).
+V=0
+
+PMIX_V_LN_S = $(pmix__v_LN_S_$V)
+pmix__v_LN_S_ = $(pmix__v_LN_S_$AM_DEFAULT_VERBOSITY)
+pmix__v_LN_S_0 = @echo " LN_S " `basename $@`;
+
+PMIX_V_MKDIR = $(pmix__v_MKDIR_$V)
+pmix__v_MKDIR_ = $(pmix__v_MKDIR_$AM_DEFAULT_VERBOSITY)
+pmix__v_MKDIR_0 = @echo " MKDIR " $@;
+
+PMIX_V_GEN = $(pmix__v_GEN_$V)
+pmix__v_GEN_ = $(pmix__v_GEN_$AM_DEFAULT_VERBOSITY)
+pmix__v_GEN_0 = @echo " GENERATE" $@;
diff --git a/opal/mca/pmix/pmix3x/pmix/NEWS b/opal/mca/pmix/pmix3x/pmix/NEWS
index ca24124edb..816afe1e65 100644
--- a/opal/mca/pmix/pmix3x/pmix/NEWS
+++ b/opal/mca/pmix/pmix3x/pmix/NEWS
@@ -20,11 +20,55 @@ 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
multiple release branches.
+Master (not on release branches yet)
+------------------------------------
-3.1.6 -- TBD
+
+3.2.2 -- TBD
----------------------
+3.2.1 -- 5 Nov 2020
+----------------------
+ - PR #1890:
+ - Fix Issue #1889: Fix symlinks in unit tests to include new timeout
+ - Fix Issue #1891: Remove pnet/opa component that should not be in v3.2
+ - PR #1904: Add more metadata to string generated from preg/compress
+
+
+3.2.0 -- 22 Oct 2020
+----------------------
+ - PR #1402/#1403/#1421/#1423: Modex size reductions
+ - PR #1752: Convert man pages to Markdown (pandoc)
+ - PR #1766: Move from -levent to -levent_core for linking Libevent
+ - PR #1832: Sync 3.2 branch with master
+ - New attributes:
+ - PMIX_HOSTNAME_ALIASES
+ - PMIX_HOSTNAME_KEEP_FQDN
+ - PMIX_GET_REFRESH_CACHE
+ - PMIX_REQUIRED_KEY
+ - Removed PMIX_VALUE_COMPRESSED_STRING_UNPACK macro from pmix_common.h
+ - New frameworks
+ - PR #1139: pcompress - Compression methods
+ - PR #1423: psquash - Flexible integer packing
+ - New components
+ - PR #1139: preg/compress - regular expression methods
+ - PR #1422 Modified string representations produced by PMIx_generate_regex
+ and PMIx_generate_ppn.
+ - Issue #1586: Fixed dmodex support and PMIx_Get behavior
+ - PR #1748: Removed --with-pmix-symbol-rename configure option
+ - PR #1848: Expose PMIX_REGEX constant per v3.2 standard
+ - PR #1885: Fix immediate flag behavior at the server
+
+
+3.1.6 -- 20 Aug 2020
+----------------------
+ - PR #1669: Silence unnecessary error log message
+ - PR #1776: Fixed crash of dstore locks destructor
+ - PR #1825: Add option to bypass local-only fence optimization
+ - PR #1830: Increase timeout in test case
+
+
3.1.5 -- 14 Feb 2020
----------------------
NOTE: The signature of the PMIx_Allocation_request has changed
@@ -33,7 +77,7 @@ in accordance with an Errata update of the PMIx v3 Standard
- PR #1433: Return the correct status from PMIx_Publish
- PR #1445: Sync. with master to fix 'get' of data for unknown namespace
Includes the following PRs from master
- - PR #1382: dstore: fixed truncate key-names while restoring
+ - PR #1382: dstore: fixed truncate key-names while restoring
- PR #1405: Fix xnspace dmodex and add verbose debug
- PR #1406: Resolve request for job-level data
- PR #1407/#1409/#1411: Fix dmodex across nspaces
@@ -58,11 +102,6 @@ in accordance with an Errata update of the PMIx v3 Standard
- PR #1613: dstore: Fix cache size calculation
- PR #1622: Fix multiple occurrences of unaligned access in pmix tests
- PR #1620: Re-address the collective tracker problem
-- PR #1625: Fix library triplet
-- PR #1630: Fix support for PGI compiler pgcc18
-- PR #1637: Realign behavior of PMIx_Get and PMIx_Get_nb
-- PR #1640: Properly handle forwarded output when no handler registered
-
3.1.4 -- 9 Aug 2019
@@ -293,6 +332,68 @@ in accordance with an Errata update of the PMIx v3 Standard
- Fix several memory and file descriptor leaks
+2.2.4 -- 07 Jun 2020
+----------------------
+- PR #1466: Silence spurious error log
+- PR #1489: Allow specification of hostname to use by client
+- PR #1499/#1512/#1518/#1525/#1528/#1533/#1553: Fix internal tests
+- PR #1678: Update "check_vendor" for PGI problem
+- PR #1734: Fix resource leaks in ptl/usock component
+- PR #1777: Fix crash of dstor locks destructor in ds12
+- PR #1788: Remove unnecessary error logs
+
+
+2.2.3 -- 15 Aug 2019
+----------------------
+- PR #1162: Fix race condition when clients fail while in a PMIx
+ collective operation
+- PR #1163: Fix a compiler warning in atomics on POWER arch
+- PR #1165: Add BuildRequires: libevent-devel to spec file
+- PR #1180: Remove dependency on C++ compiler for thread detection
+- PR #1180: Add detection for Flex when building in non-tarball situations
+- PR #1182: configury: use PMIX_ENABLE_DLOPEN_SUPPORT instead of enable_dlopen
+- PR #1188: Link libpmix.so to MCA component libraries
+- PR #1190: Ensure any cached notifications arrive after reg completes
+- PR #1194: Ensure any cached notifications arrive after registration completes
+- PR #1209: Update configure logic for clock_gettime
+- PR #1213/#1217/#1221: Add configure option "--enable-nonglobal-dlopen"
+ If the MCA component libraries should link back to libpmix.so
+- PR #1231: SPEC: Allow splitting PMIx in pmix and pmix-libpmi packages
+- PR #1253: Preserve user-provided CFLAGS to protect autotools
+- PR #1267: Correct dmodex example
+- PR #1275: IPv6 IF Read: Buffer Overflow
+- PR #1295: Fix comment: IPv6 IF_NAMESIZE
+- PR #1296: Allow setup_fork to proceed even if gdds and pnet don't contribute
+- PR #1296: Allow servers to pass NULL module
+- PR #1297: Provide internal blocking ability to the register/deregister fns
+- PR #1298: Add dummy handshake component to psec framework for testing
+- PR #1303: Allow jobs to not specify proc-level info
+- PR #1304: Provide proc data in cases where host does not
+- PR #1305: Add some more values that can be computed
+- PR #1308: Add missing tool rendezvous file
+- PR #1309: Fix potential integer overflow in regex
+- PR #1311: Work around memory bug in older gcc compilers
+- PR #1329: Add -fPIC to static builds
+- PR #1334: Cache only -W CFLAG entries to fix 32-bit builds
+- PR #1341: Do not use '==' in m4 test statements
+- PR #1342: Fix if_linux_ipv6_open interface filter
+- PR #1344: Remove unnecessary libtool init for c++
+- PR #1346: Fix incorrect pointer casts/deref
+- PR #1347/#1348: Fix use of gethostname
+- PR #1353/#1357: util/environ: use setenv() if available
+- PR #1354: Plug a misc memory leak in the pmix_query_caddy_t destructor
+- PR #1356: Fix another pointer cast/deref in test suite
+- PR #1358: Implement support for class-based info arrays
+- PR #1359: Plug misc minor memory leaks
+- PR #1369: Fix legacy support for PMI-1
+- PR #1370: Cleanup handling of data requests for different nspaces
+- PR #1193: Resolve get of proc-specific job-level info from another nspace
+- PR #1377: Skip fastpath/dstore for NULL keys
+- PR #1379: Change IF_NAMESIZE to PMIX_IF_NAMESIZE and set to safe size
+- PR #1385: Check for EINVAL return from posix_fallocate
+- PR #1389: Plug misc memory leaks in configure
+
+
2.2.2 -- 24 Jan 2019
----------------------
- Fix a bug in macro identifying system events
diff --git a/opal/mca/pmix/pmix3x/pmix/README b/opal/mca/pmix/pmix3x/pmix/README
index fa96176b7e..f26ae456d2 100644
--- a/opal/mca/pmix/pmix3x/pmix/README
+++ b/opal/mca/pmix/pmix3x/pmix/README
@@ -8,14 +8,14 @@ Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
University of Stuttgart. All rights reserved.
Copyright (c) 2004-2007 The Regents of the University of California.
All rights reserved.
-Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
+Copyright (c) 2006-2020 Cisco Systems, Inc. All rights reserved.
Copyright (c) 2006-2011 Mellanox Technologies. All rights reserved.
Copyright (c) 2006-2012 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2007 Myricom, Inc. All rights reserved.
Copyright (c) 2008 IBM Corporation. All rights reserved.
Copyright (c) 2010 Oak Ridge National Labs. All rights reserved.
Copyright (c) 2011 University of Houston. All rights reserved.
-Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
+Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
@@ -25,16 +25,20 @@ $HEADER$
===========================================================================
When submitting questions and problems, be sure to include as much
-extra information as possible. The issues template on the
-GitHub repo provides directions:
+extra information as possible. This web page details all the
+information that we request in order to provide assistance:
- http://github.com/pmix/pmix/issues
+ https://pmix.org/support/
The best way to report bugs, send comments, or ask questions is to
-open an issue on the repo. Alternatively, you are welcome to sign
-up for the developer/user mailing list:
+post them on the OpenPMIx GitHub issue tracker:
- pmix@googlegroups.com
+ https://github.com/openpmix/openpmix/issues
+
+Alternatively, you can sign up on the PMIx mailing list, which is
+hosted by Google Groups:
+
+ pmix@googlegroups.com
Because of spam, only subscribers are allowed to post to this list
(ensure that you subscribe with and post from exactly the same e-mail
@@ -43,18 +47,13 @@ joe@mycomputer.example.com!). You can subscribe to the list here:
https://groups.google.com/d/forum/pmix
-Finally, just to round out all the possible ways to communicate with the
-PMIx community, you are invited to join the community's Slack channel:
-
- pmix-workspace.slack.com
-
Thanks for your time.
===========================================================================
More information is available in the PMIx FAQ:
- https://pmix.org/support
+ https://pmix.org/support/faq/
We are in early days, so please be patient - info will grow as questions
are addressed.
@@ -69,7 +68,7 @@ General notes
- The majority of PMIx's documentation is here in this file, the
included man pages, and on the web site FAQ
- (https://pmix.org/support). This will eventually be
+ (https://pmix.org/support/faq/). This will eventually be
supplemented with cohesive installation and user documentation files.
- Systems that have been tested are:
@@ -197,22 +196,21 @@ PMIx's version numbers are the union of several different values:
major, minor, release, and an optional quantifier.
* Major: The major number is the first integer in the version string
- (e.g., v1.2.3) and indicates the corresponding version of the PMIx
- Standard. In other words, a PMIx library release starting with "v2"
- indicates that the implementation conforms to version 2 of the PMIx
- Standard.
+ (e.g., v1.2.3). Changes in the major number typically indicate a
+ significant change in the code base and/or end-user
+ functionality. The major number is always included in the version
+ number.
* Minor: The minor number is the second integer in the version
string (e.g., v1.2.3). Changes in the minor number typically
indicate a incremental change in the code base and/or end-user
- functionality, but not the supported version of the Standard.
- The minor number is always included in the version number.
+ functionality. The minor number is always included in the version
+ number:
* Release: The release number is the third integer in the version
string (e.g., v1.2.3). Changes in the release number typically
indicate a bug fix in the code base and/or end-user
- functionality. The release number is always included in the
- version number.
+ functionality.
* Quantifier: PMIx version numbers sometimes have an arbitrary
string affixed to the end of the version number. Common strings
@@ -299,15 +297,16 @@ Application Binary Interface (ABI) Compatibility
------------------------------------------------
PMIx provides forward ABI compatibility in all versions of a given
-feature release series. For example, on a single platform, an pmix
+feature release series and its corresponding
+super stable series. For example, on a single platform, an pmix
application linked against PMIx v1.3.2 shared libraries can be
updated to point to the shared libraries in any successive v1.3.x or
v1.4 release and still work properly (e.g., via the LD_LIBRARY_PATH
environment variable or other operating system mechanism).
-PMIx reserves the right to break ABI compatibility at new major
+PMIx reserves the right to break ABI compatibility at new feature
release series. For example, the same pmix application from above
-(linked against PMIx v1.3.2 shared libraries) may *not* work with
+(linked against PMIx v1.3.2 shared libraries) will *not* work with
PMIx v1.5 shared libraries.
===========================================================================
@@ -318,7 +317,7 @@ Common Questions
Many common questions about building and using PMIx are answered
on the FAQ:
- https://pmix.org/support
+ https://pmix.org/support/faq/
===========================================================================
@@ -329,19 +328,23 @@ Found a bug? Got a question? Want to make a suggestion? Want to
contribute to PMIx? Please let us know!
When submitting questions and problems, be sure to include as much
-extra information as possible. Again, the issues template is your
-friend in this regard!
+extra information as possible. This web page details all the
+information that we request in order to provide assistance:
- https://github.com/pmix/pmix/issues
+ https://pmix.org/support/
-Questions and comments should generally be sent to the PMIx mailing
-list (pmix@googlegroups.com). Because of spam, only
-subscribers are allowed to post to this list (ensure that you
-subscribe with and post from *exactly* the same e-mail address --
-joe@example.com is considered different than
-joe@mycomputer.example.com!). Visit this page to subscribe to the
-user's list:
+Questions and comments should generally be posted to the OpenPMIx
+GitHub issue tracker:
+
+ https://github.com/openpmix/openpmix/issues
+
+Alternatively, question can also be sent to the PMIx mailing list
+(pmix@googlegroups.com). Because of spam, only subscribers are
+allowed to post to this list (ensure that you subscribe with and post
+from *exactly* the same e-mail address -- joe@example.com is
+considered different than joe@mycomputer.example.com!). Visit this
+page to subscribe to the user's list:
https://groups.google.com/d/forum/pmix
-Make today a PMIx day!
+Make today an PMIx day!
diff --git a/opal/mca/pmix/pmix3x/pmix/VERSION b/opal/mca/pmix/pmix3x/pmix/VERSION
index ff271b549f..784177bf77 100644
--- a/opal/mca/pmix/pmix3x/pmix/VERSION
+++ b/opal/mca/pmix/pmix3x/pmix/VERSION
@@ -6,7 +6,6 @@
# Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
# Copyright (c) 2020 IBM Corporation. All rights reserved.
-
# This is the VERSION file for PMIx, describing the precise
# version of PMIx in this distribution. The various components of
# the version number below are combined to form a single version
@@ -16,8 +15,8 @@
# ...
major=3
-minor=1
-release=5
+minor=2
+release=1
# greek is used for alpha or beta release tags. If it is non-empty,
# it will be appended to the version number. It does not have to be
@@ -25,14 +24,14 @@ release=5
# 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".
-repo_rev=gitedebb24
+repo_rev=git1063ca6
# If tarball_version is not empty, it is used as the version string in
# the tarball filename, regardless of all other versions listed in
@@ -46,7 +45,7 @@ tarball_version=
# The date when this release was created
-date="Feb 19, 2020"
+date="Oct 30, 2020"
# The shared library version of each of PMIx's public libraries.
# These versions are maintained in accordance with the "Library
@@ -77,13 +76,13 @@ date="Feb 19, 2020"
# Version numbers are described in the Libtool current:revision:age
# format.
-libpmix_so_version=4:25:2
+libpmix_so_version=4:31:2
libpmi_so_version=1:1:0
libpmi2_so_version=1:0:0
# "Common" components install standalone libraries that are run-time
-# linked by one or more components. So they need to be versioned as
-# well. Yuck; this somewhat breaks the
-# components-don't-affect-the-build-system abstraction.
+# # linked by one or more components. So they need to be versioned as
+# # well. Yuck; this somewhat breaks the
+# # components-don't-affect-the-build-system abstraction.
#
libmca_common_dstore_so_version=1:2:0
diff --git a/opal/mca/pmix/pmix3x/pmix/autogen.pl b/opal/mca/pmix/pmix3x/pmix/autogen.pl
index 9d365783c8..9bd6596f06 100755
--- a/opal/mca/pmix/pmix3x/pmix/autogen.pl
+++ b/opal/mca/pmix/pmix3x/pmix/autogen.pl
@@ -4,7 +4,7 @@
# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
-# Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
+# Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2015 IBM Corporation. All rights reserved.
@@ -275,7 +275,7 @@ sub mca_generate_framework_header(\$\@) {
#ifndef $ifdef_string
#define $ifdef_string
-#include
+#include \"src/mca/base/pmix_mca_base_framework.h\"
$framework_decl_output
static pmix_mca_base_framework_t *pmix_frameworks[] = {
diff --git a/opal/mca/pmix/pmix3x/pmix/config/Makefile.am b/opal/mca/pmix/pmix3x/pmix/config/Makefile.am
index ffe2937060..9890e6ac5c 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/Makefile.am
+++ b/opal/mca/pmix/pmix3x/pmix/config/Makefile.am
@@ -1,7 +1,7 @@
-# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
+# Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
# Copyright (c) 2016 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
-# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
+# Copyright (c) 2006-2020 Cisco Systems, Inc. All rights reserved
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
@@ -27,6 +27,7 @@ EXTRA_DIST = \
c_get_alignment.m4 \
pmix_get_version.sh \
distscript.sh \
+ md2nroff.pl \
pmix_check_attributes.m4 \
pmix_check_broken_qsort.m4 \
pmix_check_compiler_version.m4 \
@@ -42,7 +43,6 @@ EXTRA_DIST = \
pmix.m4 \
pmix_search_libs.m4 \
pmix_setup_cc.m4 \
- pmix_setup_zlib.m4 \
pmix_setup_libevent.m4 \
pmix_mca_priority_sort.pl \
mca_library_paths.txt
diff --git a/opal/mca/pmix/pmix3x/pmix/config/md2nroff.pl b/opal/mca/pmix/pmix3x/pmix/config/md2nroff.pl
new file mode 100755
index 0000000000..7c943c0f21
--- /dev/null
+++ b/opal/mca/pmix/pmix3x/pmix/config/md2nroff.pl
@@ -0,0 +1,136 @@
+#!/usr/bin/env perl
+#
+# Copyright (c) 2020 Cisco Systems, Inc. All rights reserved.
+# $COPYRIGHT$
+#
+# Additional copyrights may follow
+#
+# $HEADER$
+#
+
+# This script is friendly to both Python 2 and Python 3.
+
+use strict;
+
+use IPC::Open3;
+use File::Basename;
+use Getopt::Long;
+
+#--------------------------------------------------------------------------
+
+my $source_arg;
+my $dest_arg;
+my $pandoc_arg = "pandoc";
+my $help_arg;
+my $verbose_arg;
+
+my $ok = Getopt::Long::GetOptions("source=s" => \$source_arg,
+ "dest=s" => \$dest_arg,
+ "pandoc=s" => \$pandoc_arg,
+ "help" => \$help_arg,
+ "verbose" => \$verbose_arg);
+
+if (!$source_arg || !$dest_arg) {
+ print("Must specify --source and --dest\n");
+ $ok = 0;
+}
+
+if (!$ok || $help_arg) {
+ print "Invalid command line argument.\n\n"
+ if (!$ok);
+ print "Options:
+ --source FILE Source Markdown filename
+ --dest FILE Destination nroff file
+ --pandoc FILE Location of pandoc executable
+ --help This help list
+ --verbose Be verbose when running\n";
+ exit($ok ? 0 : 1);
+}
+
+#--------------------------------------------------------------------------
+
+# If the destination exists, read it in
+my $dest_content;
+if (-f $dest_arg) {
+ open(FILE, $dest_arg) ||
+ die "Can't open $dest_arg";
+ $dest_content .= $_
+ while();
+ close(FILE);
+}
+
+#--------------------------------------------------------------------------
+
+# Read in the source
+die "Error: $source_arg does not exist"
+ if (! -f $source_arg);
+
+my $source_content;
+open(FILE, $source_arg) ||
+ die "Can't open $source_arg";
+$source_content .= $_
+ while();
+close(FILE);
+
+#--------------------------------------------------------------------------
+
+# Figure out the section of man page
+die "Cannot figure out man page section from source filename"
+ if (!($source_arg =~ m/(\d+).md$/));
+my $man_section = $1;
+
+my $shortfile = basename($source_arg);
+$shortfile =~ s/\.$man_section\.md$//;
+
+#--------------------------------------------------------------------------
+
+my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
+my $today = sprintf("%04d-%02d-%02d", ($year+1900), $mon, $mday);
+
+# Run opal_get_version.sh to get the OMPI version.
+my $config_dir = dirname($0);
+my $get_version = "$config_dir/opal_get_version.sh";
+my $VERSION_file = "$config_dir/../VERSION";
+my $out = `$get_version $VERSION_file --full`;
+chomp($out);
+
+# Pandoc does not handle markdown links in output nroff properly, so
+# just remove all links. Specifically: some versions of Pandoc ignore
+# the links, but others handle it badly.
+$source_content =~ s/\[(.+)\]\((.+)\)/\1/g;
+
+# Add the pandoc header
+$source_content = "---
+section: $man_section
+title: $shortfile
+header: Open PMIx
+footer: $today
+---
+
+$source_content";
+
+#--------------------------------------------------------------------------
+
+print("*** Processing: $source_arg --> $dest_arg\n")
+ if ($verbose_arg);
+
+# Run Pandoc
+my $pid = open3(my $child_stdin, my $child_stdout, my $child_stderr,
+ "$pandoc_arg -s --from=markdown --to=man");
+print $child_stdin $source_content;
+close($child_stdin);
+my $pandoc_rendered;
+$pandoc_rendered .= $_
+ while(<$child_stdout>);
+close($child_stdout);
+close($child_stderr)
+ if ($child_stderr);
+waitpid($pid, 0);
+
+# Write the output to the target file
+open(FILE, ">$dest_arg") ||
+ die "Can't open $dest_arg for writing";
+print FILE $pandoc_rendered;
+close(FILE);
+
+exit(0);
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix.m4
index b057aa91a6..f021571a0f 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix.m4
@@ -43,6 +43,11 @@ AC_DEFUN([PMIX_SETUP_CORE],[
AC_REQUIRE([AM_PROG_CC_C_O])
+ # initialize
+ PMIX_EMBEDDED_LDFLAGS=
+ PMIX_EMBEDDED_LIBS=
+ PMIX_EMBEDDED_CPPFLAGS=
+
# If no prefix was defined, set a good value
m4_ifval([$1],
[m4_define([pmix_config_prefix],[$1/])],
@@ -168,22 +173,6 @@ AC_DEFUN([PMIX_SETUP_CORE],[
# replaced, not the entire file.
AC_CONFIG_HEADERS(pmix_config_prefix[src/include/pmix_config.h])
- # Rename symbols?
- AC_ARG_WITH([pmix-symbol-rename],
- AC_HELP_STRING([--with-pmix-symbol-rename=PREFIX],
- [Provide a prefix to rename PMIx symbols]))
- AC_MSG_CHECKING([for symbol rename])
- AS_IF([test ! -z "$with_pmix_symbol_rename" && test "$with_pmix_symbol_rename" != "yes"],
- [AC_MSG_RESULT([$with_pmix_symbol_rename])
- pmix_symbol_rename="$with_pmix_symbol_rename"
- PMIX_RENAME=$with_pmix_symbol_rename],
- [AC_MSG_RESULT([no])
- pmix_symbol_rename=""
- PMIX_RENAME=])
- AC_DEFINE_UNQUOTED(PMIX_SYMBOL_RENAME, [$pmix_symbol_rename],
- [The pmix symbol rename include directive])
- AC_SUBST(PMIX_RENAME)
- AC_CONFIG_FILES(pmix_config_prefix[include/pmix_rename.h])
# Add any extra lib?
AC_ARG_WITH([pmix-extra-lib],
@@ -416,9 +405,11 @@ AC_DEFUN([PMIX_SETUP_CORE],[
time.h unistd.h dirent.h \
crt_externs.h signal.h \
ioLib.h sockLib.h hostLib.h limits.h \
- sys/statfs.h sys/statvfs.h \
+ sys/fcntl.h sys/statfs.h sys/statvfs.h \
netdb.h ucred.h zlib.h sys/auxv.h \
- sys/sysctl.h])
+ sys/sysctl.h termio.h termios.h pty.h \
+ libutil.h util.h grp.h sys/cdefs.h utmp.h stropts.h \
+ sys/utsname.h])
AC_CHECK_HEADERS([sys/mount.h], [], [],
[AC_INCLUDES_DEFAULT
@@ -663,7 +654,7 @@ AC_DEFUN([PMIX_SETUP_CORE],[
# -lrt might be needed for clock_gettime
PMIX_SEARCH_LIBS_CORE([clock_gettime], [rt])
- AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strsignal socketpair strncpy_s usleep statfs statvfs getpeereid getpeerucred strnlen posix_fallocate tcgetpgrp setpgid ptsname openpty setenv])
+ AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strsignal socketpair strncpy_s usleep statfs statvfs getpeereid getpeerucred strnlen posix_fallocate tcgetpgrp setpgid ptsname openpty setenv fork execve waitpid])
# On some hosts, htonl is a define, so the AC_CHECK_FUNC will get
# confused. On others, it's in the standard library, but stubbed with
@@ -752,7 +743,7 @@ AC_DEFUN([PMIX_SETUP_CORE],[
##################################
# Libevent
##################################
- pmix_show_title "Libevent"
+ pmix_show_title "Event libraries"
PMIX_LIBEV_CONFIG
PMIX_LIBEVENT_CONFIG
@@ -779,12 +770,13 @@ AC_DEFUN([PMIX_SETUP_CORE],[
##################################
- # ZLIB COMPRESSION
+ # ZLIB
##################################
pmix_show_title "ZLIB"
PMIX_ZLIB_CONFIG
+
##################################
# Dstore Locking
##################################
@@ -813,15 +805,19 @@ AC_DEFUN([PMIX_SETUP_CORE],[
MCA-variable-setting mechansism). This MCA variable
controls whether warnings are displayed when an MCA
component fails to load at run time due to an error.
- (default: enabled, meaning that
+ (default: enabled in --enable-debug builds, meaning that
mca_base_component_show_load_errors is enabled
- by default])])
+ by default when configured with --enable-debug])])
if test "$enable_show_load_errors_by_default" = "no" ; then
PMIX_SHOW_LOAD_ERRORS_DEFAULT=0
AC_MSG_RESULT([disabled by default])
else
- PMIX_SHOW_LOAD_ERRORS_DEFAULT=1
- AC_MSG_RESULT([enabled by default])
+ PMIX_SHOW_LOAD_ERRORS_DEFAULT=$WANT_DEBUG
+ if test "$WANT_DEBUG" = "1"; then
+ AC_MSG_RESULT([enabled by default])
+ else
+ AC_MSG_RESULT([disabled by default])
+ fi
fi
AC_DEFINE_UNQUOTED(PMIX_SHOW_LOAD_ERRORS_DEFAULT, $PMIX_SHOW_LOAD_ERRORS_DEFAULT,
[Default value for mca_base_component_show_load_errors MCA variable])
@@ -854,11 +850,16 @@ AC_DEFUN([PMIX_SETUP_CORE],[
# rather than have successive assignments to these shell
# variables, lest the $(foo) names try to get evaluated here.
# Yuck!
- CPPFLAGS="-I$PMIX_top_builddir -I$PMIX_top_srcdir -I$PMIX_top_srcdir/src -I$PMIX_top_builddir/include -I$PMIX_top_srcdir/include $CPPFLAGS"
+ cpp_includes="$PMIX_top_builddir $PMIX_top_srcdir $PMIX_top_srcdir/src $PMIX_top_builddir/include"
else
- CPPFLAGS="-I$PMIX_top_srcdir -I$PMIX_top_srcdir/src -I$PMIX_top_srcdir/include $CPPFLAGS"
+ cpp_includes="$PMIX_top_srcdir $PMIX_top_srcdir/src"
fi
+ CPP_INCLUDES="$(echo $cpp_includes | $SED 's/[[^ \]]* */'"$pmix_cc_iquote"'&/g')"
+ CPPFLAGS="$CPP_INCLUDES -I$PMIX_top_srcdir/include $CPPFLAGS $PMIX_FINAL_CPPFLAGS"
+ LDFLAGS="$LDFLAGS $PMIX_FINAL_LDFLAGS"
+ LIBS="$LIBS $PMIX_FINAL_LIBS"
+ ############################################################################
# pmixdatadir, pmixlibdir, and pmixinclude are essentially the same as
# pkg*dir, but will always be */pmix.
pmixdatadir='${datadir}/pmix'
@@ -891,8 +892,15 @@ AC_DEFUN([PMIX_SETUP_CORE],[
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests11.pl], [chmod +x test/run_tests11.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests12.pl], [chmod +x test/run_tests12.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests13.pl], [chmod +x test/run_tests13.pl])
- AC_CONFIG_FILES(pmix_config_prefix[test/run_tests14.pl], [chmod +x test/run_tests14.pl])
- AC_CONFIG_FILES(pmix_config_prefix[test/run_tests15.pl], [chmod +x test/run_tests15.pl])
+# AC_CONFIG_FILES(pmix_config_prefix[test/run_tests14.pl], [chmod +x test/run_tests14.pl])
+# AC_CONFIG_FILES(pmix_config_prefix[test/run_tests15.pl], [chmod +x test/run_tests15.pl])
+
+
+ ############################################################################
+ # Check for building man pages
+ ############################################################################
+ pmix_show_subtitle "Man page setup"
+ PMIX_SETUP_MAN_PAGES
############################################################################
# final output
@@ -1194,7 +1202,6 @@ fi
AM_CONDITIONAL([PMIX_INSTALL_BINARIES], [test $WANT_PMIX_BINARIES -eq 1])
-
# see if they want to disable non-RTLD_GLOBAL dlopen
AC_MSG_CHECKING([if want to support dlopen of non-global namespaces])
AC_ARG_ENABLE([nonglobal-dlopen],
@@ -1213,6 +1220,24 @@ fi
AS_IF([test -z "$enable_nonglobal_dlopen" && test "x$pmix_mode" = "xembedded" && test $WANT_INSTALL_HEADERS -eq 0 && test $pmix_need_libpmix -eq 1],
[pmix_need_libpmix=0])
+#
+# Do we want PTY support?
+#
+
+AC_MSG_CHECKING([if want pty support])
+AC_ARG_ENABLE(pty-support,
+ AC_HELP_STRING([--enable-pty-support],
+ [Enable/disable PTY support for STDIO forwarding. (default: enabled)]))
+if test "$enable_pty_support" = "no" ; then
+ AC_MSG_RESULT([no])
+ PMIX_ENABLE_PTY_SUPPORT=0
+else
+ AC_MSG_RESULT([yes])
+ PMIX_ENABLE_PTY_SUPPORT=1
+fi
+AC_DEFINE_UNQUOTED([PMIX_ENABLE_PTY_SUPPORT], [$PMIX_ENABLE_PTY_SUPPORT],
+ [Whether user wants PTY support or not])
+
#
# psec/dummy_handshake
#
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_psm2.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_check_psm2.m4
deleted file mode 100644
index b2c291fae4..0000000000
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_psm2.m4
+++ /dev/null
@@ -1,89 +0,0 @@
-# -*- shell-script -*-
-#
-# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
-# University Research and Technology
-# Corporation. All rights reserved.
-# Copyright (c) 2004-2005 The University of Tennessee and The University
-# of Tennessee Research Foundation. All rights
-# reserved.
-# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
-# University of Stuttgart. All rights reserved.
-# Copyright (c) 2004-2006 The Regents of the University of California.
-# All rights reserved.
-# Copyright (c) 2006 QLogic Corp. All rights reserved.
-# Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
-# Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
-# Copyright (c) 2015 Research Organization for Information Science
-# and Technology (RIST). All rights reserved.
-# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
-# reserved.
-# $COPYRIGHT$
-#
-# Additional copyrights may follow
-#
-# $HEADER$
-#
-
-# PMIX_CHECK_PSM2(prefix, [action-if-found], [action-if-not-found])
-# --------------------------------------------------------
-# check if PSM2 support can be found. sets prefix_{CPPFLAGS,
-# LDFLAGS, LIBS} as needed and runs action-if-found if there is
-# support, otherwise executes action-if-not-found
-AC_DEFUN([PMIX_CHECK_PSM2],[
- if test -z "$pmix_check_psm2_happy" ; then
- AC_ARG_WITH([psm2],
- [AC_HELP_STRING([--with-psm2(=DIR)],
- [Build PSM2 (Intel PSM2) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
- PMIX_CHECK_WITHDIR([psm2], [$with_psm2], [include/psm2.h])
- AC_ARG_WITH([psm2-libdir],
- [AC_HELP_STRING([--with-psm2-libdir=DIR],
- [Search for PSM (Intel PSM2) libraries in DIR])])
- PMIX_CHECK_WITHDIR([psm2-libdir], [$with_psm2_libdir], [libpsm2.*])
-
- pmix_check_psm2_$1_save_CPPFLAGS="$CPPFLAGS"
- pmix_check_psm2_$1_save_LDFLAGS="$LDFLAGS"
- pmix_check_psm2_$1_save_LIBS="$LIBS"
-
- AS_IF([test "$with_psm2" != "no"],
- [AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "yes"],
- [pmix_check_psm2_dir="$with_psm2"])
- AS_IF([test ! -z "$with_psm2_libdir" && test "$with_psm2_libdir" != "yes"],
- [pmix_check_psm2_libdir="$with_psm2_libdir"])
-
- PMIX_CHECK_PACKAGE([pmix_check_psm2],
- [psm2.h],
- [psm2],
- [psm2_mq_irecv2],
- [],
- [$pmix_check_psm2_dir],
- [$pmix_check_psm2_libdir],
- [pmix_check_psm2_happy="yes"],
- [pmix_check_psm2_happy="no"])],
- [pmix_check_psm2_happy="no"])
-
- CPPFLAGS="$pmix_check_psm2_$1_save_CPPFLAGS"
- LDFLAGS="$pmix_check_psm2_$1_save_LDFLAGS"
- LIBS="$pmix_check_psm2_$1_save_LIBS"
-
- AS_IF([test "$pmix_check_psm2_happy" = "yes" && test "$enable_progress_threads" = "yes"],
- [AC_MSG_WARN([PSM2 driver does not currently support progress threads. Disabling MTL.])
- pmix_check_psm2_happy="no"])
-
- AS_IF([test "$pmix_check_psm2_happy" = "yes"],
- [AC_CHECK_HEADERS(
- glob.h,
- [],
- [AC_MSG_WARN([glob.h not found. Can not build component.])
- pmix_check_psm2_happy="no"])])
-
- fi
-
- AS_IF([test "$pmix_check_psm2_happy" = "yes"],
- [$1_LDFLAGS="[$]$1_LDFLAGS $pmix_check_psm2_LDFLAGS"
- $1_CPPFLAGS="[$]$1_CPPFLAGS $pmix_check_psm2_CPPFLAGS"
- $1_LIBS="[$]$1_LIBS $pmix_check_psm2_LIBS"
- $2],
- [AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "no"],
- [AC_MSG_ERROR([PSM2 support requested but not found. Aborting])])
- $3])
-])
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_config_asm.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_config_asm.m4
index a46b73ad4d..64e286cbe4 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_config_asm.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_config_asm.m4
@@ -11,13 +11,14 @@ dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2008-2018 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) 2015-2018 Research Organization for Information Science
+dnl and Technology (RIST). All rights reserved.
dnl Copyright (c) 2014-2018 Los Alamos National Security, LLC. All rights
dnl reserved.
dnl Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
dnl reserved.
-dnl Copyright (c) 2018-2019 Intel, Inc. All rights reserved.
+dnl Copyright (c) 2020 Google, LLC. All rights reserved.
+dnl Copyright (c) 2020 Intel, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
@@ -32,12 +33,10 @@ AC_DEFUN([PMIX_ATOMIC_COMPARE_EXCHANGE_N_TEST_SOURCE],[[
#include
#include
#include
-
typedef union {
uint64_t fake@<:@2@:>@;
__int128 real;
} pmix128;
-
static void test1(void)
{
// As of Aug 2018, we could not figure out a way to assign 128-bit
@@ -53,7 +52,6 @@ static void test1(void)
exit(1);
}
}
-
static void test2(void)
{
pmix128 ptr = { .fake = { 0xFFEEDDCCBBAA0099, 0x8877665544332211 }};
@@ -66,7 +64,6 @@ static void test2(void)
exit(2);
}
}
-
int main(int argc, char** argv)
{
test1();
@@ -84,12 +81,10 @@ AC_DEFUN([PMIX_SYNC_BOOL_COMPARE_AND_SWAP_TEST_SOURCE],[[
#include
#include
#include
-
typedef union {
uint64_t fake@<:@2@:>@;
__int128 real;
} pmix128;
-
static void test1(void)
{
// As of Aug 2018, we could not figure out a way to assign 128-bit
@@ -103,7 +98,6 @@ static void test1(void)
exit(1);
}
}
-
static void test2(void)
{
pmix128 ptr = { .fake = { 0xFFEEDDCCBBAA0099, 0x8877665544332211 }};
@@ -114,7 +108,6 @@ static void test2(void)
exit(2);
}
}
-
int main(int argc, char** argv)
{
test1();
@@ -131,12 +124,11 @@ AC_DEFUN([PMIX_ATOMIC_COMPARE_EXCHANGE_STRONG_TEST_SOURCE],[[
#include
#include
#include
-
typedef union {
uint64_t fake@<:@2@:>@;
_Atomic __int128 real;
+ __int128 real2;
} pmix128;
-
static void test1(void)
{
// As of Aug 2018, we could not figure out a way to assign 128-bit
@@ -145,27 +137,23 @@ static void test1(void)
pmix128 ptr = { .fake = { 0xFFEEDDCCBBAA0099, 0x8877665544332211 }};
pmix128 expected = { .fake = { 0x11EEDDCCBBAA0099, 0x88776655443322FF }};
pmix128 desired = { .fake = { 0x1122DDCCBBAA0099, 0x887766554433EEFF }};
- bool r = atomic_compare_exchange_strong (&ptr.real, &expected.real,
- desired.real, true,
- atomic_relaxed, atomic_relaxed);
+ bool r = atomic_compare_exchange_strong (&ptr.real, &expected.real2,
+ desired.real);
if ( !(r == false && ptr.real == expected.real)) {
exit(1);
}
}
-
static void test2(void)
{
pmix128 ptr = { .fake = { 0xFFEEDDCCBBAA0099, 0x8877665544332211 }};
pmix128 expected = ptr;
pmix128 desired = { .fake = { 0x1122DDCCBBAA0099, 0x887766554433EEFF }};
- bool r = atomic_compare_exchange_strong (&ptr.real, &expected.real,
- desired.real, true,
- atomic_relaxed, atomic_relaxed);
+ bool r = atomic_compare_exchange_strong (&ptr.real, &expected.real2,
+ desired.real);
if (!(r == true && ptr.real == desired.real)) {
exit(2);
}
}
-
int main(int argc, char** argv)
{
test1();
@@ -206,10 +194,8 @@ dnl #4: action if all of 1, 2, and 3 fail
dnl
AC_DEFUN([PMIX_ASM_CHECK_ATOMIC_FUNC],[
PMIX_VAR_SCOPE_PUSH([pmix_asm_check_func_happy pmix_asm_check_func_CFLAGS_save pmix_asm_check_func_LIBS_save])
-
pmix_asm_check_func_CFLAGS_save=$CFLAGS
pmix_asm_check_func_LIBS_save=$LIBS
-
dnl Check with no compiler/linker flags
AC_MSG_CHECKING([for $1])
AC_LINK_IFELSE([$2],
@@ -217,7 +203,6 @@ AC_DEFUN([PMIX_ASM_CHECK_ATOMIC_FUNC],[
AC_MSG_RESULT([yes])],
[pmix_asm_check_func_happy=0
AC_MSG_RESULT([no])])
-
dnl If that didn't work, try again with CFLAGS+=mcx16
AS_IF([test $pmix_asm_check_func_happy -eq 0],
[AC_MSG_CHECKING([for $1 with -mcx16])
@@ -229,7 +214,6 @@ AC_DEFUN([PMIX_ASM_CHECK_ATOMIC_FUNC],[
CFLAGS=$pmix_asm_check_func_CFLAGS_save
AC_MSG_RESULT([no])])
])
-
dnl If that didn't work, try again with LIBS+=-latomic
AS_IF([test $pmix_asm_check_func_happy -eq 0],
[AC_MSG_CHECKING([for $1 with -latomic])
@@ -241,7 +225,6 @@ AC_DEFUN([PMIX_ASM_CHECK_ATOMIC_FUNC],[
LIBS=$pmix_asm_check_func_LIBS_save
AC_MSG_RESULT([no])])
])
-
dnl If we have it, try it and make sure it gives a correct result.
dnl As of Aug 2018, we know that it links but does *not* work on clang
dnl 6 on ARM64.
@@ -253,15 +236,12 @@ AC_DEFUN([PMIX_ASM_CHECK_ATOMIC_FUNC],[
AC_MSG_RESULT([no])],
[AC_MSG_RESULT([cannot test -- assume yes (cross compiling)])])
])
-
dnl If we were unsuccessful, restore CFLAGS/LIBS
AS_IF([test $pmix_asm_check_func_happy -eq 0],
[CFLAGS=$pmix_asm_check_func_CFLAGS_save
LIBS=$pmix_asm_check_func_LIBS_save])
-
dnl Run the user actions
AS_IF([test $pmix_asm_check_func_happy -eq 1], [$3], [$4])
-
PMIX_VAR_SCOPE_POP
])
@@ -269,7 +249,6 @@ dnl ------------------------------------------------------------------
AC_DEFUN([PMIX_CHECK_SYNC_BUILTIN_CSWAP_INT128], [
PMIX_VAR_SCOPE_PUSH([sync_bool_compare_and_swap_128_result])
-
# Do we have __sync_bool_compare_and_swap?
# Use a special macro because we need to check with a few different
# CFLAGS/LIBS.
@@ -277,51 +256,16 @@ AC_DEFUN([PMIX_CHECK_SYNC_BUILTIN_CSWAP_INT128], [
[AC_LANG_SOURCE(PMIX_SYNC_BOOL_COMPARE_AND_SWAP_TEST_SOURCE)],
[sync_bool_compare_and_swap_128_result=1],
[sync_bool_compare_and_swap_128_result=0])
-
AC_DEFINE_UNQUOTED([PMIX_HAVE_SYNC_BUILTIN_CSWAP_INT128],
[$sync_bool_compare_and_swap_128_result],
[Whether the __sync builtin atomic compare and swap supports 128-bit values])
-
PMIX_VAR_SCOPE_POP
])
-AC_DEFUN([PMIX_CHECK_SYNC_BUILTINS], [
- AC_MSG_CHECKING([for __sync builtin atomics])
-
- AC_TRY_LINK([long tmp;], [__sync_synchronize();
-__sync_bool_compare_and_swap(&tmp, 0, 1);
-__sync_add_and_fetch(&tmp, 1);],
- [AC_MSG_RESULT([yes])
- $1],
- [AC_MSG_RESULT([no])
- $2])
-
- AC_MSG_CHECKING([for 64-bit __sync builtin atomics])
-
- AC_TRY_LINK([
-#include
-uint64_t tmp;], [
-__sync_bool_compare_and_swap(&tmp, 0, 1);
-__sync_add_and_fetch(&tmp, 1);],
- [AC_MSG_RESULT([yes])
- pmix_asm_sync_have_64bit=1],
- [AC_MSG_RESULT([no])
- pmix_asm_sync_have_64bit=0])
-
- AC_DEFINE_UNQUOTED([PMIX_ASM_SYNC_HAVE_64BIT],[$pmix_asm_sync_have_64bit],
- [Whether 64-bit is supported by the __sync builtin atomics])
-
- # Check for 128-bit support
- PMIX_CHECK_SYNC_BUILTIN_CSWAP_INT128
-])
-
-
AC_DEFUN([PMIX_CHECK_GCC_BUILTIN_CSWAP_INT128], [
PMIX_VAR_SCOPE_PUSH([atomic_compare_exchange_n_128_result atomic_compare_exchange_n_128_CFLAGS_save atomic_compare_exchange_n_128_LIBS_save])
-
atomic_compare_exchange_n_128_CFLAGS_save=$CFLAGS
atomic_compare_exchange_n_128_LIBS_save=$LIBS
-
# Do we have __sync_bool_compare_and_swap?
# Use a special macro because we need to check with a few different
# CFLAGS/LIBS.
@@ -329,7 +273,6 @@ AC_DEFUN([PMIX_CHECK_GCC_BUILTIN_CSWAP_INT128], [
[AC_LANG_SOURCE(PMIX_ATOMIC_COMPARE_EXCHANGE_N_TEST_SOURCE)],
[atomic_compare_exchange_n_128_result=1],
[atomic_compare_exchange_n_128_result=0])
-
# If we have it and it works, check to make sure it is always lock
# free.
AS_IF([test $atomic_compare_exchange_n_128_result -eq 1],
@@ -347,23 +290,20 @@ AC_DEFUN([PMIX_CHECK_GCC_BUILTIN_CSWAP_INT128], [
AC_MSG_RESULT([no])],
[AC_MSG_RESULT([cannot test -- assume yes (cross compiling)])])
])
-
AC_DEFINE_UNQUOTED([PMIX_HAVE_GCC_BUILTIN_CSWAP_INT128],
[$atomic_compare_exchange_n_128_result],
[Whether the __atomic builtin atomic compare swap is both supported and lock-free on 128-bit values])
-
dnl If we could not find decent support for 128-bits __atomic let's
dnl try the GCC _sync
AS_IF([test $atomic_compare_exchange_n_128_result -eq 0],
[PMIX_CHECK_SYNC_BUILTIN_CSWAP_INT128])
-
PMIX_VAR_SCOPE_POP
])
AC_DEFUN([PMIX_CHECK_GCC_ATOMIC_BUILTINS], [
- AC_MSG_CHECKING([for __atomic builtin atomics])
-
- AC_TRY_LINK([
+ if test -z "$pmix_cv_have___atomic" ; then
+ AC_MSG_CHECKING([for 32-bit GCC built-in atomics])
+ AC_TRY_LINK([
#include
uint32_t tmp, old = 0;
uint64_t tmp64, old64 = 0;], [
@@ -372,21 +312,39 @@ __atomic_compare_exchange_n(&tmp, &old, 1, 0, __ATOMIC_RELAXED, __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])
- $2])
-
- # Check for 128-bit support
- PMIX_CHECK_GCC_BUILTIN_CSWAP_INT128
+ [pmix_cv_have___atomic=yes],
+ [pmix_cv_have___atomic=no])
+ AC_MSG_RESULT([$pmix_cv_have___atomic])
+ if test $pmix_cv_have___atomic = "yes" ; then
+ AC_MSG_CHECKING([for 64-bit GCC built-in atomics])
+ AC_TRY_LINK([
+#include
+uint64_t tmp64, old64 = 0;], [
+__atomic_compare_exchange_n(&tmp64, &old64, 1, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+__atomic_add_fetch(&tmp64, 1, __ATOMIC_RELAXED);],
+ [pmix_cv_have___atomic_64=yes],
+ [pmix_cv_have___atomic_64=no])
+ AC_MSG_RESULT([$pmix_cv_have___atomic_64])
+ if test $pmix_cv_have___atomic_64 = "yes" ; then
+ AC_MSG_CHECKING([if 64-bit GCC built-in atomics are lock-free])
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([], [if (!__atomic_is_lock_free (8, 0)) { return 1; }])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ pmix_cv_have___atomic_64=no],
+ [AC_MSG_RESULT([cannot test -- assume yes (cross compiling)])])
+ fi
+ else
+ pmix_cv_have___atomic_64=no
+ fi
+ # Check for 128-bit support
+ PMIX_CHECK_GCC_BUILTIN_CSWAP_INT128
+ fi
])
AC_DEFUN([PMIX_CHECK_C11_CSWAP_INT128], [
PMIX_VAR_SCOPE_PUSH([atomic_compare_exchange_result atomic_compare_exchange_CFLAGS_save atomic_compare_exchange_LIBS_save])
-
atomic_compare_exchange_CFLAGS_save=$CFLAGS
atomic_compare_exchange_LIBS_save=$LIBS
-
# Do we have C11 atomics on 128-bit integers?
# Use a special macro because we need to check with a few different
# CFLAGS/LIBS.
@@ -394,7 +352,6 @@ AC_DEFUN([PMIX_CHECK_C11_CSWAP_INT128], [
[AC_LANG_SOURCE(PMIX_ATOMIC_COMPARE_EXCHANGE_STRONG_TEST_SOURCE)],
[atomic_compare_exchange_result=1],
[atomic_compare_exchange_result=0])
-
# If we have it and it works, check to make sure it is always lock
# free.
AS_IF([test $atomic_compare_exchange_result -eq 1],
@@ -412,41 +369,16 @@ AC_DEFUN([PMIX_CHECK_C11_CSWAP_INT128], [
AC_MSG_RESULT([no])],
[AC_MSG_RESULT([cannot test -- assume yes (cross compiling)])])
])
-
AC_DEFINE_UNQUOTED([PMIX_HAVE_C11_CSWAP_INT128],
[$atomic_compare_exchange_result],
[Whether C11 atomic compare swap is both supported and lock-free on 128-bit values])
-
dnl If we could not find decent support for 128-bits atomic let's
dnl try the GCC _sync
AS_IF([test $atomic_compare_exchange_result -eq 0],
[PMIX_CHECK_SYNC_BUILTIN_CSWAP_INT128])
-
PMIX_VAR_SCOPE_POP
])
-AC_DEFUN([PMIX_CHECK_GCC_ATOMIC_BUILTINS], [
- AC_MSG_CHECKING([for __atomic builtin atomics])
-
- AC_TRY_LINK([
-#include
-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_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])
- $2])
-
- # Check for 128-bit support
- PMIX_CHECK_GCC_BUILTIN_CSWAP_INT128
-])
-
-
dnl #################################################################
dnl
dnl PMIX_CHECK_ASM_TEXT
@@ -526,9 +458,7 @@ dnl #################################################################
# ---------------------------------------
AC_DEFUN([_PMIX_CHECK_ASM_LSYM],[
AC_REQUIRE([AC_PROG_GREP])
-
$1="L"
-
for sym in L .L $ L$ ; do
asm_result=0
echo "configure: trying $sym" >&AC_FD_CC
@@ -565,7 +495,6 @@ ${sym}mytestlabel$pmix_cv_asm_label_suffix],
# ---------------------
AC_DEFUN([PMIX_CHECK_ASM_LSYM],[
AC_REQUIRE([AC_PROG_NM])
-
AC_CACHE_CHECK([prefix for lsym labels],
[pmix_cv_asm_lsym],
[_PMIX_CHECK_ASM_LSYM([pmix_cv_asm_lsym])])
@@ -593,7 +522,6 @@ mysym:
.endp mysym],
[pmix_cv_asm_need_proc="yes"])
rm -f conftest.out])
-
if test "$pmix_cv_asm_need_proc" = "yes" ; then
pmix_cv_asm_proc=".proc"
pmix_cv_asm_endproc=".endp"
@@ -616,21 +544,17 @@ AC_DEFUN([PMIX_CHECK_ASM_GSYM],[
AC_CACHE_CHECK([prefix for global symbol labels],
[pmix_cv_asm_gsym],
[_PMIX_CHECK_ASM_GSYM])
-
if test "$pmix_cv_asm_gsym" = "none" ; then
AC_MSG_ERROR([Could not determine global symbol label prefix])
fi
-
AC_DEFINE_UNQUOTED([PMIX_ASM_GSYM], ["$pmix_cv_asm_gsym"],
[Assembly prefix for gsym labels])
PMIX_ASM_GSYM="$pmix_cv_asm_gsym"
AC_SUBST(PMIX_ASM_GSYM)
-
])
AC_DEFUN([_PMIX_CHECK_ASM_GSYM],[
pmix_cv_asm_gsym="none"
-
for sym in "_" "" "." ; do
asm_result=0
echo "configure: trying $sym" >&AC_FD_CC
@@ -727,7 +651,6 @@ dnl #################################################################
AC_DEFUN([PMIX_CHECK_ASM_ALIGN_LOG],[
AC_REQUIRE([AC_PROG_NM])
AC_REQUIRE([AC_PROG_GREP])
-
AC_CACHE_CHECK([if .align directive takes logarithmic value],
[pmix_cv_asm_align_log],
[ PMIX_TRY_ASSEMBLE([ $pmix_cv_asm_text
@@ -746,17 +669,14 @@ foo$pmix_cv_asm_label_suffix
else
pmix_cv_asm_align_log="no"
fi])
-
if test "$pmix_cv_asm_align_log" = "yes" || test "$pmix_cv_asm_align_log" = "1" ; then
pmix_asm_align_log_result=1
else
pmix_asm_align_log_result=0
fi
-
AC_DEFINE_UNQUOTED([PMIX_ASM_ALIGN_LOG],
[$asm_align_log_result],
[Assembly align directive expects logarithmic value])
-
unset omp_asm_addr asm_result
])dnl
@@ -777,7 +697,6 @@ AC_DEFUN([PMIX_CHECK_ASM_TYPE],[
AC_CACHE_CHECK([prefix for function in .type],
[pmix_cv_asm_type],
[_PMIX_CHECK_ASM_TYPE])
-
AC_DEFINE_UNQUOTED([PMIX_ASM_TYPE], ["$pmix_cv_asm_type"],
[How to set function type in .type directive])
PMIX_ASM_TYPE="$pmix_cv_asm_type"
@@ -786,7 +705,6 @@ AC_DEFUN([PMIX_CHECK_ASM_TYPE],[
AC_DEFUN([_PMIX_CHECK_ASM_TYPE],[
pmix_cv_asm_type=""
-
case "${host}" in
*-sun-solaris*)
# GCC on solaris seems to accept just about anything, not
@@ -809,7 +727,6 @@ mysym:],
;;
esac
rm -f conftest.out
-
unset asm_result type
])dnl
@@ -829,13 +746,11 @@ AC_DEFUN([PMIX_CHECK_ASM_SIZE],[
PMIX_TRY_ASSEMBLE([ .size mysym, 1],
[pmix_cv_asm_need_size="yes"])
rm -f conftest.out])
-
if test "$pmix_cv_asm_need_size" = "yes" ; then
pmix_asm_size=1
else
pmix_asm_size=0
fi
-
AC_DEFINE_UNQUOTED([PMIX_ASM_SIZE], ["$pmix_asm_size"],
[Do we need to give a .size directive])
PMIX_ASM_SIZE="$pmix_asm_size"
@@ -850,7 +765,6 @@ AC_DEFUN([PMIX_CHECK_ASM_SIZE],[
# disable execable stacks with GAS
AC_DEFUN([PMIX_CHECK_ASM_GNU_STACKEXEC], [
AC_REQUIRE([AC_PROG_GREP])
-
AC_CHECK_PROG([OBJDUMP], [objdump], [objdump])
AC_CACHE_CHECK([if .note.GNU-stack is needed],
[pmix_cv_asm_gnu_stack_result],
@@ -860,7 +774,7 @@ AC_DEFUN([PMIX_CHECK_ASM_GNU_STACKEXEC], [
int testfunc() {return 0; }
EOF
PMIX_LOG_COMMAND([$CC $CFLAGS -c conftest.c -o conftest.$OBJEXT],
- [$OBJDUMP -x conftest.$OBJEXT | $GREP '\.note\.GNU-stack' > /dev/null && pmix_cv_asm_gnu_stack_result=yes],
+ [$OBJDUMP -x conftest.$OBJEXT 2>&1 | $GREP '\.note\.GNU-stack' &> /dev/null && pmix_cv_asm_gnu_stack_result=yes],
[PMIX_LOG_MSG([the failed program was:], 1)
PMIX_LOG_FILE([conftest.c])
pmix_cv_asm_gnu_stack_result=no])
@@ -899,7 +813,6 @@ AC_DEFUN([PMIX_CHECK_POWERPC_REG],[
else
AC_MSG_RESULT([no])
fi
-
AC_DEFINE_UNQUOTED([PMIX_POWERPC_R_REGISTERS],
[$pmix_cv_asm_powerpc_r_reg],
[Whether r notation is used for ppc registers])
@@ -939,7 +852,6 @@ AC_DEFUN([PMIX_CHECK_POWERPC_64BIT],[
ppc64_result=0
;;
esac
-
if test "$ppc64_result" = "1" ; then
AC_MSG_RESULT([yes])
ifelse([$1],,:,[$1])
@@ -947,34 +859,10 @@ AC_DEFUN([PMIX_CHECK_POWERPC_64BIT],[
AC_MSG_RESULT([no])
ifelse([$2],,:,[$2])
fi
-
unset ppc64_result ldarx_asm
])dnl
-dnl #################################################################
-dnl
-dnl PMIX_CHECK_SPARCV8PLUS
-dnl
-dnl #################################################################
-AC_DEFUN([PMIX_CHECK_SPARCV8PLUS],[
- AC_MSG_CHECKING([if have Sparc v8+/v9 support])
- sparc_result=0
- PMIX_TRY_ASSEMBLE([$pmix_cv_asm_text
- casa [%o0] 0x80, %o1, %o2],
- [sparc_result=1],
- [sparc_result=0])
- if test "$sparc_result" = "1" ; then
- AC_MSG_RESULT([yes])
- ifelse([$1],,:,[$1])
- else
- AC_MSG_RESULT([no])
- ifelse([$2],,:,[$2])
- fi
-
- unset sparc_result
-])dnl
-
dnl #################################################################
dnl
dnl PMIX_CHECK_CMPXCHG16B
@@ -983,7 +871,6 @@ dnl #################################################################
AC_DEFUN([PMIX_CMPXCHG16B_TEST_SOURCE],[[
#include
#include
-
union pmix_counted_pointer_t {
struct {
uint64_t counter;
@@ -996,17 +883,13 @@ union pmix_counted_pointer_t {
#endif
};
typedef union pmix_counted_pointer_t pmix_counted_pointer_t;
-
int main(int argc, char* argv) {
volatile pmix_counted_pointer_t a;
pmix_counted_pointer_t b;
-
a.data.counter = 0;
a.data.item = 0x1234567890ABCDEF;
-
b.data.counter = a.data.counter;
b.data.item = a.data.item;
-
/* bozo checks */
assert(16 == sizeof(pmix_counted_pointer_t));
assert(a.data.counter == b.data.counter);
@@ -1029,7 +912,6 @@ int main(int argc, char* argv) {
AC_DEFUN([PMIX_CHECK_CMPXCHG16B],[
PMIX_VAR_SCOPE_PUSH([cmpxchg16b_result])
-
PMIX_ASM_CHECK_ATOMIC_FUNC([cmpxchg16b],
[AC_LANG_PROGRAM([[unsigned char tmp[16];]],
[[__asm__ __volatile__ ("lock cmpxchg16b (%%rsi)" : : "S" (tmp) : "memory", "cc");]])],
@@ -1044,7 +926,6 @@ AC_DEFUN([PMIX_CHECK_CMPXCHG16B],[
AC_MSG_RESULT([no])],
[AC_MSG_RESULT([cannot test -- assume yes (cross compiling)])])
])
-
AC_DEFINE_UNQUOTED([PMIX_HAVE_CMPXCHG16B], [$cmpxchg16b_result],
[Whether the processor supports the cmpxchg16b instruction])
PMIX_VAR_SCOPE_POP
@@ -1079,9 +960,7 @@ dnl #################################################################
AC_DEFUN([PMIX_CHECK_INLINE_C_GCC],[
assembly="$1"
asm_result="unknown"
-
AC_MSG_CHECKING([if $CC supports GCC inline assembly])
-
if test ! "$assembly" = "" ; then
AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
int ret = 1;
@@ -1094,7 +973,6 @@ return ret;
else
assembly="test skipped - assuming no"
fi
-
# if we're cross compiling, just try to compile and figure good enough
if test "$asm_result" = "unknown" ; then
AC_LINK_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
@@ -1105,20 +983,16 @@ return ret;
]])],
[asm_result="yes"], [asm_result="no"])
fi
-
AC_MSG_RESULT([$asm_result])
-
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
-
AC_DEFINE_UNQUOTED([PMIX_C_GCC_INLINE_ASSEMBLY],
[$PMIX_C_GCC_INLINE_ASSEMBLY],
[Whether C compiler supports GCC style inline assembly])
-
unset PMIX_C_GCC_INLINE_ASSEMBLY assembly asm_result
])dnl
@@ -1136,32 +1010,28 @@ dnl #################################################################
AC_DEFUN([PMIX_CONFIG_ASM],[
AC_REQUIRE([PMIX_SETUP_CC])
AC_REQUIRE([AM_PROG_AS])
-
AC_ARG_ENABLE([c11-atomics],[AC_HELP_STRING([--enable-c11-atomics],
[Enable use of C11 atomics if available (default: enabled)])])
-
AC_ARG_ENABLE([builtin-atomics],
[AC_HELP_STRING([--enable-builtin-atomics],
- [Enable use of __sync builtin atomics (default: disabled)])])
-
+ [Enable use of GCC built-in atomics (default: autodetect)])])
PMIX_CHECK_C11_CSWAP_INT128
-
+ pmix_cv_asm_builtin="BUILTIN_NO"
+ PMIX_CHECK_GCC_ATOMIC_BUILTINS
if test "x$enable_c11_atomics" != "xno" && test "$pmix_cv_c11_supported" = "yes" ; then
pmix_cv_asm_builtin="BUILTIN_C11"
PMIX_CHECK_C11_CSWAP_INT128
elif test "x$enable_c11_atomics" = "xyes"; then
AC_MSG_WARN([C11 atomics were requested but are not supported])
AC_MSG_ERROR([Cannot continue])
+ elif test "$enable_builtin_atomics" = "yes" ; then
+ if test $pmix_cv_have___atomic = "yes" ; then
+ pmix_cv_asm_builtin="BUILTIN_GCC"
else
- pmix_cv_asm_builtin="BUILTIN_NO"
- AS_IF([test "$pmix_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" = "yes"],
- [PMIX_CHECK_GCC_ATOMIC_BUILTINS([pmix_cv_asm_builtin="BUILTIN_GCC"], [])])
- AS_IF([test "$pmix_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" = "yes"],
- [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_ERROR([__sync builtin atomics requested but not found.])])
+ AC_MSG_WARN([GCC built-in atomics requested but not found.])
+ AC_MSG_ERROR([Cannot continue])
+ fi
fi
-
PMIX_CHECK_ASM_PROC
PMIX_CHECK_ASM_TEXT
PMIX_CHECK_ASM_GLOBAL
@@ -1172,11 +1042,14 @@ AC_DEFUN([PMIX_CONFIG_ASM],[
PMIX_CHECK_ASM_TYPE
PMIX_CHECK_ASM_SIZE
PMIX_CHECK_ASM_ALIGN_LOG
-
# find our architecture for purposes of assembly stuff
pmix_cv_asm_arch="UNSUPPORTED"
PMIX_GCC_INLINE_ASSIGN=""
+ if test "$pmix_cv_have___atomic_64" ; then
+ PMIX_ASM_SUPPORT_64BIT=1
+ else
PMIX_ASM_SUPPORT_64BIT=0
+ fi
case "${host}" in
x86_64-*x32)
pmix_cv_asm_arch="X86_64"
@@ -1193,60 +1066,29 @@ AC_DEFUN([PMIX_CONFIG_ASM],[
PMIX_GCC_INLINE_ASSIGN='"xaddl %1,%0" : "=m"(ret), "+r"(negone) : "m"(ret)'
PMIX_CHECK_CMPXCHG16B
;;
-
- ia64-*)
- pmix_cv_asm_arch="IA64"
- PMIX_CHECK_SYNC_BUILTINS([pmix_cv_asm_builtin="BUILTIN_SYNC"],
- [AC_MSG_ERROR([No atomic primitives available for $host])])
- ;;
aarch64*)
pmix_cv_asm_arch="ARM64"
PMIX_ASM_SUPPORT_64BIT=1
PMIX_ASM_ARM_VERSION=8
- AC_DEFINE_UNQUOTED([PMIX_ASM_ARM_VERSION], [$PMIX_ASM_ARM_VERSION],
- [What ARM assembly version to use])
PMIX_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
;;
-
armv7*|arm-*-linux-gnueabihf)
pmix_cv_asm_arch="ARM"
PMIX_ASM_SUPPORT_64BIT=1
PMIX_ASM_ARM_VERSION=7
- AC_DEFINE_UNQUOTED([PMIX_ASM_ARM_VERSION], [$PMIX_ASM_ARM_VERSION],
- [What ARM assembly version to use])
PMIX_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
;;
-
armv6*)
pmix_cv_asm_arch="ARM"
PMIX_ASM_SUPPORT_64BIT=0
PMIX_ASM_ARM_VERSION=6
CCASFLAGS="$CCASFLAGS -march=armv7-a"
- AC_DEFINE_UNQUOTED([PMIX_ASM_ARM_VERSION], [$PMIX_ASM_ARM_VERSION],
- [What ARM assembly version to use])
PMIX_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
;;
-
- armv5*linux*|armv4*linux*|arm-*-linux-gnueabi)
- # uses Linux kernel helpers for some atomic operations
- pmix_cv_asm_arch="ARM"
- PMIX_CHECK_SYNC_BUILTINS([pmix_cv_asm_builtin="BUILTIN_SYNC"],
- [AC_MSG_ERROR([No atomic primitives available for $host])])
- ;;
-
- mips-*|mips64*)
- # Should really find some way to make sure that we are on
- # a MIPS III machine (r4000 and later)
- pmix_cv_asm_arch="MIPS"
- PMIX_CHECK_SYNC_BUILTINS([pmix_cv_asm_builtin="BUILTIN_SYNC"],
- [AC_MSG_ERROR([No atomic primitives available for $host])])
- ;;
-
powerpc-*|powerpc64-*|powerpcle-*|powerpc64le-*|rs6000-*|ppc-*)
PMIX_CHECK_POWERPC_REG
if test "$ac_cv_sizeof_long" = "4" ; then
pmix_cv_asm_arch="POWERPC32"
-
# Note that on some platforms (Apple G5), even if we are
# compiling in 32 bit mode (and therefore should assume
# sizeof(long) == 4), we can use the 64 bit test and set
@@ -1260,87 +1102,32 @@ 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
- # earlier (casa is v8+/v9).
- if test "$ac_cv_sizeof_long" = "4" ; then
- have_v8plus=0
- PMIX_CHECK_SPARCV8PLUS([have_v8plus=1])
- if test "$have_v8plus" = "0" ; then
- PMIX_ASM_SUPPORT_64BIT=0
- pmix_cv_asm_arch="SPARC"
-AC_MSG_WARN([Sparc v8 target is not supported in this release of Open MPI.])
-AC_MSG_WARN([You must specify the target architecture v8plus to compile])
-AC_MSG_WARN([Open MPI in 32 bit mode on Sparc processors (see the README).])
-AC_MSG_ERROR([Can not continue.])
- else
- PMIX_ASM_SUPPORT_64BIT=1
- pmix_cv_asm_arch="SPARCV9_32"
- fi
-
- elif test "$ac_cv_sizeof_long" = "8" ; then
- PMIX_ASM_SUPPORT_64BIT=1
- pmix_cv_asm_arch="SPARCV9_64"
- else
- AC_MSG_ERROR([Could not determine Sparc word size: $ac_cv_sizeof_long])
- fi
- PMIX_GCC_INLINE_ASSIGN='"mov 0,%0" : "=&r"(ret)'
- ;;
-
*)
- PMIX_CHECK_SYNC_BUILTINS([pmix_cv_asm_builtin="BUILTIN_SYNC"],
- [AC_MSG_ERROR([No atomic primitives available for $host])])
- ;;
- esac
-
- if test "x$PMIX_ASM_SUPPORT_64BIT" = "x1" && test "$pmix_cv_asm_builtin" = "BUILTIN_SYNC" &&
- test "$pmix_asm_sync_have_64bit" = "0" ; then
- # __sync builtins exist but do not implement 64-bit support. Fall back on inline asm.
- pmix_cv_asm_builtin="BUILTIN_NO"
+ if test $pmix_cv_have___atomic = "yes" ; then
+ pmix_cv_asm_builtin="BUILTIN_GCC"
+ else
+ AC_MSG_ERROR([No atomic primitives available for $host])
fi
-
- if test "$pmix_cv_asm_builtin" = "BUILTIN_SYNC" || test "$pmix_cv_asm_builtin" = "BUILTIN_GCC" ; then
- AC_DEFINE([PMIX_C_GCC_INLINE_ASSEMBLY], [1],
- [Whether C compiler supports GCC style inline assembly])
- else
- AC_DEFINE_UNQUOTED([PMIX_ASM_SUPPORT_64BIT],
- [$PMIX_ASM_SUPPORT_64BIT],
- [Whether we can do 64bit assembly operations or not. Should not be used outside of the assembly header files])
- AC_SUBST([PMIX_ASM_SUPPORT_64BIT])
-
- #
- # figure out if we need any special function start / stop code
- #
- case $host_os in
- aix*)
- pmix_asm_arch_config="aix"
- ;;
- *)
- pmix_asm_arch_config="default"
- ;;
- esac
-
+ ;;
+ esac
+ if ! test -z "$PMIX_ASM_ARM_VERSION" ; then
+ AC_DEFINE_UNQUOTED([PMIX_ASM_ARM_VERSION], [$PMIX_ASM_ARM_VERSION],
+ [What ARM assembly version to use])
+ fi
+ if test "$pmix_cv_asm_builtin" = "BUILTIN_GCC" ; then
+ AC_DEFINE([PMIX_C_GCC_INLINE_ASSEMBLY], [1],
+ [Whether C compiler supports GCC style inline assembly])
+ else
+ AC_DEFINE_UNQUOTED([PMIX_ASM_SUPPORT_64BIT],
+ [$PMIX_ASM_SUPPORT_64BIT],
+ [Whether we can do 64bit assembly operations or not. Should not be used outside of the assembly header files])
+ AC_SUBST([PMIX_ASM_SUPPORT_64BIT])
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])
-
# format:
# config_file-text-global-label_suffix-gsym-lsym-type-size-align_log-ppc_r_reg-64_bit-gnu_stack
- asm_format="${pmix_asm_arch_config}"
+ asm_format="default"
asm_format="${asm_format}-${pmix_cv_asm_text}-${pmix_cv_asm_global}"
asm_format="${asm_format}-${pmix_cv_asm_label_suffix}-${pmix_cv_asm_gsym}"
asm_format="${asm_format}-${pmix_cv_asm_lsym}"
@@ -1357,14 +1144,12 @@ AC_MSG_ERROR([Can not continue.])
# this version, but make sure the Makefile gives the right thing
# when regenerating the files because the base has been touched.
PMIX_ASSEMBLY_FORMAT=`echo "$pmix_cv_asm_format" | sed -e 's/\\\$/\\\$\\\$/'`
-
AC_MSG_CHECKING([for assembly format])
AC_MSG_RESULT([$pmix_cv_asm_format])
AC_DEFINE_UNQUOTED([PMIX_ASSEMBLY_FORMAT], ["$PMIX_ASSEMBLY_FORMAT"],
[Format of assembly file])
AC_SUBST([PMIX_ASSEMBLY_FORMAT])
- fi # if pmix_cv_asm_builtin = BUILTIN_SYNC
-
+ fi # if pmix_cv_asm_builtin = BUILTIN_GCC
result="PMIX_$pmix_cv_asm_arch"
PMIX_ASSEMBLY_ARCH="$pmix_cv_asm_arch"
AC_MSG_CHECKING([for assembly architecture])
@@ -1372,7 +1157,6 @@ AC_MSG_ERROR([Can not continue.])
AC_DEFINE_UNQUOTED([PMIX_ASSEMBLY_ARCH], [$result],
[Architecture type of assembly to use for atomic operations and CMA])
AC_SUBST([PMIX_ASSEMBLY_ARCH])
-
# Check for RDTSCP support
result=0
AS_IF([test "$pmix_cv_asm_arch" = "PMIX_X86_64" || test "$pmix_cv_asm_arch" = "PMIX_IA32"],
@@ -1394,7 +1178,6 @@ int main(int argc, char* argv[])
AC_LANG_POP([C])])
AC_DEFINE_UNQUOTED([PMIX_ASSEMBLY_SUPPORTS_RDTSCP], [$result],
[Whether we have support for RDTSCP instruction])
-
result="PMIX_$pmix_cv_asm_builtin"
PMIX_ASSEMBLY_BUILTIN="$pmix_cv_asm_builtin"
AC_MSG_CHECKING([for builtin atomics])
@@ -1402,9 +1185,7 @@ int main(int argc, char* argv[])
AC_DEFINE_UNQUOTED([PMIX_ASSEMBLY_BUILTIN], [$result],
[Whether to use builtin atomics])
AC_SUBST([PMIX_ASSEMBLY_BUILTIN])
-
PMIX_ASM_FIND_FILE
-
unset result asm_format
])dnl
@@ -1420,8 +1201,7 @@ dnl #################################################################
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" && test "$pmix_cv_asm_inline_arch" = "no" ; then
+if test "$pmix_cv_asm_arch" != "WINDOWS" && 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
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_functions.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_functions.m4
index a75d339b2b..d326c81bb1 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_functions.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_functions.m4
@@ -12,7 +12,7 @@ dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
-dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
+dnl Copyright (c) 2009-2020 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
dnl Copyright (c) 2017 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
@@ -287,7 +287,7 @@ for val in ${$1}; do
# Check for special cases where we do want to allow repeated
# arguments (per
- # http://www.open-mpi.org/community/lists/devel/2012/08/11362.php).
+ # https://www.open-mpi.org/community/lists/devel/2012/08/11362.php).
case $val in
-Xclang|-Xg)
@@ -373,7 +373,7 @@ AC_DEFUN([PMIX_FLAGS_UNIQ],[
# Check for special cases where we do want to allow repeated
# arguments (per
- # http://www.open-mpi.org/community/lists/devel/2012/08/11362.php
+ # https://www.open-mpi.org/community/lists/devel/2012/08/11362.php
# and
# https://github.com/open-mpi/ompi/issues/324).
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_load_platform.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_load_platform.m4
index 53d4afbf7d..21ce6b1ab6 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_load_platform.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_load_platform.m4
@@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
-dnl Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
+dnl Copyright (c) 2014-2020 Intel, Inc. All rights reserved.
dnl Copyright (c) 2015 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl $COPYRIGHT$
@@ -23,6 +23,9 @@ dnl
# PMIX_LOAD_PLATFORM()
# --------------------
AC_DEFUN([PMIX_LOAD_PLATFORM], [
+ AC_ARG_WITH([platform-patches-dir],
+ [AC_HELP_STRING([--with-platform-patches-dir=DIR],
+ [Location of the platform patches directory. If you use this option, you must also use --with-platform.])])
AC_ARG_WITH([platform],
[AC_HELP_STRING([--with-platform=FILE],
@@ -30,7 +33,10 @@ AC_DEFUN([PMIX_LOAD_PLATFORM], [
command line not in FILE are used. Options on the
command line and in FILE are replaced by what is
in FILE.])])
-
+ m4_ifval([autogen_platform_file], [
+ if test "$with_platform" = "" ; then
+ with_platform=autogen_platform_file
+ fi])
if test "$with_platform" = "yes" ; then
AC_MSG_ERROR([--with-platform argument must include FILE option])
elif test "$with_platform" = "no" ; then
@@ -77,5 +83,106 @@ AC_DEFUN([PMIX_LOAD_PLATFORM], [
# return to where we started
cd "$platform_savedir"
+
+ # define an alternate default mca param filename
+ platform_alt_mca_file="`basename $platform_loaded`.conf"
+
+ # look where platform file is located for platform.conf name
+ if test -r "${platform_file_dir}/${platform_alt_mca_file}" ; then
+ AC_SUBST(PMIX_DEFAULT_MCA_PARAM_CONF, [$platform_file_dir/$platform_alt_mca_file])
+ AC_SUBST(PMIX_PARAM_FROM_PLATFORM, "yes")
+ # if not, see if a file is there with the default name
+ elif test -r "${platform_file_dir}/pmix-mca-params.conf" ; then
+ AC_SUBST(PMIX_DEFAULT_MCA_PARAM_CONF, [$platform_file_dir/pmix-mca-params.conf])
+ AC_SUBST(PMIX_PARAM_FROM_PLATFORM, "yes")
+ # if not, then just use the default
+ else
+ AC_SUBST(PMIX_DEFAULT_MCA_PARAM_CONF, [pmix-mca-params.conf])
+ AC_SUBST(PMIX_PARAM_FROM_PLATFORM, "no")
+ fi
+
+ patch_dir="${with_platform}.patches"
+ if test -n "$with_platform_patches_dir"; then
+ if test "$with_platform_patches_dir" = "yes"; then
+ patch_dir="${with_platform}.patches"
+ elif test "$with_platform_patches_dir" = "no"; then
+ AC_MSG_NOTICE([Disabling platform patches on user request])
+ patch_dir=""
+ elif test -d "$with_platform_patches_dir"; then
+ patch_dir=$with_platform_patches_dir
+ else
+ AC_MSG_ERROR([User provided patches directory: $with_platform_patches_dir not found])
+ fi
+ fi
+
+ patch_done="${srcdir}/.platform_patches"
+ patch_found=no
+
+ if test -d "${patch_dir}"; then
+ if test ! -f "${patch_done}"; then
+
+ AC_MSG_NOTICE([Checking patches from ${patch_dir}/ directory ])
+ for one_patch in $patch_dir/*.patch ; do
+
+ AC_MSG_CHECKING([patch: $one_patch for errors ])
+ patch -d ${srcdir} -p1 -t -s --dry-run < ${one_patch}
+ if test "$?" != "0"; then
+ AC_MSG_RESULT([fail])
+ AC_MSG_ERROR([Platform patches failed to apply])
+ else
+ AC_MSG_RESULT([ok])
+ fi
+
+ AC_MSG_CHECKING([patch: $one_patch for unsupported configury changes ])
+ has_configury_items=$(patch -d ${srcdir} -p1 -t --dry-run < ${one_patch} 2>&1 | egrep "^patching" | egrep '*\.(am|m4)$' | wc -l)
+
+ if test $has_configury_items -ne 0; then
+ AC_MSG_RESULT([fail])
+ AC_MSG_ERROR([Platform patches should not change configury files])
+ else
+ AC_MSG_RESULT([ok])
+ fi
+ done
+
+
+ for one_patch in $patch_dir/*.patch ; do
+ AC_MSG_NOTICE([Applying patch ${one_patch}])
+ patch -d ${srcdir} -p1 -t -s < ${one_patch}
+ if test "$?" != "0"; then
+ AC_MSG_ERROR([Failed to apply patch ${one_patch}])
+ fi
+ patch_found=yes
+ done
+
+ if test "$patch_found" = "yes"; then
+
+ platform_root_short="$(basename $platform_base)"
+
+ # If platform file resides under platform/ root folder - use filename as ident
+ if [ test "$platform_root_short" = "platform" ]; then
+ platform_ident="$platform_file"
+ else
+ platform_ident="$(basename $platform_base)"
+ fi
+
+ # Set custom ident for platform patched PMIX
+ if [ test -z "$with_ident_string" ]; then
+ with_ident_string="Platform: $platform_ident"
+ fi
+
+ AC_MSG_NOTICE([Platform patches applied, created stamp file ${patch_done}])
+ touch ${patch_done}
+ else
+ AC_MSG_NOTICE([No platform patches in ${patch_dir}])
+ fi
+
+ else
+ AC_MSG_WARN([Platform patches already applied, skipping. ${patch_done} can be removed to re-apply ])
+ fi
+ elif test -n "${patch_dir}"; then
+ AC_MSG_NOTICE([No platform patches in ${patch_dir}])
+ fi
+ else
+ AC_SUBST(PMIX_DEFAULT_MCA_PARAM_CONF, [pmix-mca-params.conf])
fi
])
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_mca.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_mca.m4
index 2978c928b9..2131f85be0 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_mca.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_mca.m4
@@ -262,11 +262,6 @@ AC_DEFUN([PMIX_MCA],[
[MCA_pmix_]mca_framework[_CONFIG](mca_framework),
[MCA_CONFIGURE_FRAMEWORK(mca_framework, 1)])])])
- # note that mca_wrapper_extra_* is a running list, and we take checkpoints at the end of our project
- pmix_mca_wrapper_extra_cppflags="$mca_wrapper_extra_cppflags"
- pmix_mca_wrapper_extra_ldflags="$mca_wrapper_extra_ldflags"
- pmix_mca_wrapper_extra_libs="$mca_wrapper_extra_libs"
-
AC_SUBST(MCA_pmix_FRAMEWORKS)
AC_SUBST(MCA_pmix_FRAMEWORKS_SUBDIRS)
AC_SUBST(MCA_pmix_FRAMEWORK_COMPONENT_ALL_SUBDIRS)
@@ -622,14 +617,6 @@ AC_DEFUN([MCA_CONFIGURE_ALL_CONFIG_COMPONENTS],[
AC_MSG_WARN([MCA component configure script told me to abort])
AC_MSG_ERROR([cannot continue])
fi
-
- m4_foreach(flags, [LDFLAGS, LIBS],
- [[line="`$GREP WRAPPER_EXTRA_]flags[= $infile | cut -d= -f2-`"]
- eval "line=$line"
- if test -n "$line"; then
- $2[_]$3[_WRAPPER_EXTRA_]flags[="$line"]
- fi
- ])dnl
fi
MCA_PROCESS_COMPONENT($1, $component, $2, $3, $4, $5, $compile_mode)
@@ -754,38 +741,6 @@ AC_MSG_ERROR([*** $1 component $2 was supposed to be direct-called, but
*** Aborting])
fi
fi
-
- # if the component is building, add it's WRAPPER_EXTRA_LDFLAGS and
- # WRAPPER_EXTRA_LIBS. If the component doesn't specify it's
- # WRAPPER_EXTRA_LIBS and WRAPPER_EXTRA_LDFLAGS, try using LDFLAGS and LIBS if
- # component didn't have it's own configure script (in which case,
- # we know it didn't set LDFLAGS and LIBS because it can't) Don't
- # have to do this if the component is building dynamically,
- # because it will link against these (without a dependency from
- # libmpi.so to these flags)
- if test "$7" = "static"; then
- AS_LITERAL_IF([$2],
- [m4_foreach(flags, [LDFLAGS, LIBS],
- [AS_IF([test "$$1_$2_WRAPPER_EXTRA_]flags[" = ""],
- [PMIX_FLAGS_APPEND_UNIQ([mca_wrapper_extra_]m4_tolower(flags), [$$1_$2_]flags)],
- [PMIX_FLAGS_APPEND_UNIQ([mca_wrapper_extra_]m4_tolower(flags), [$$1_$2_WRAPPER_EXTRA_]flags)])
- ])],
- [m4_foreach(flags, [LDFLAGS, LIBS],
- [[str="line=\$$1_$2_WRAPPER_EXTRA_]flags["]
- eval "$str"
- PMIX_FLAGS_APPEND_UNIQ([mca_wrapper_extra_]m4_tolower(flags), [$line])])])
- fi
-
- # if needed, copy over WRAPPER_EXTRA_CPPFLAGS. Since a configure script
- # component can never be used in a STOP_AT_FIRST framework, we
- # don't have to implement the else clause in the literal check...
- AS_LITERAL_IF([$2],
- [AS_IF([test "$$1_$2_WRAPPER_EXTRA_CPPFLAGS" != ""],
- [m4_if(PMIX_EVAL_ARG([MCA_pmix_$1_CONFIGURE_MODE]), [STOP_AT_FIRST], [stop_at_first=1], [stop_at_first=0])
- AS_IF([test "$7" = "static" && test "$stop_at_first" = "1"],
- [AS_IF([test "$with_devel_headers" = "yes"],
- [PMIX_FLAGS_APPEND_UNIQ([mca_wrapper_extra_cppflags], [$$1_$2_WRAPPER_EXTRA_CPPFLAGS])])],
- [AC_MSG_WARN([ignoring $1_$2_WRAPPER_EXTRA_CPPFLAGS ($$1_$2_WRAPPER_EXTRA_CPPFLAGS): component conditions not met])])])])
])
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_cc.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_cc.m4
index 026c3a800b..d3ed855bb9 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_cc.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_cc.m4
@@ -16,7 +16,7 @@ dnl Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
dnl reserved.
dnl Copyright (c) 2015-2019 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
-dnl Copyright (c) 2018 Intel, Inc. All rights reserved.
+dnl Copyright (c) 2018-2020 Intel, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
@@ -120,6 +120,28 @@ AC_DEFUN([PMIX_PROG_CC_C11],[
])
+# PMIX_CHECK_CC_IQUOTE()
+# ----------------------
+# Check if the compiler supports the -iquote option. This options
+# removes the specified directory from the search path when using
+# #include <>. This check works around an issue caused by C++20
+# which added a header. This conflicts with the
+# VERSION file at the base of our source directory on case-
+# insensitive filesystems.
+AC_DEFUN([PMIX_CHECK_CC_IQUOTE],[
+ PMIX_VAR_SCOPE_PUSH([pmix_check_cc_iquote_CFLAGS_save])
+ pmix_check_cc_iquote_CFLAGS_save=${CFLAGS}
+ CFLAGS="${CFLAGS} -iquote ."
+ AC_MSG_CHECKING([for $CC option to add a directory only to the search path for the quote form of include])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[])],
+ [pmix_cc_iquote="-iquote"],
+ [pmix_cc_iquote="-I"])
+ CFLAGS=${pmix_check_cc_iquote_CFLAGS_save}
+ PMIX_VAR_SCOPE_POP
+ AC_MSG_RESULT([$pmix_cc_iquote])
+])
+
+
# PMIX_SETUP_CC()
# ---------------
# Do everything required to setup the C compiler. Safe to AC_REQUIRE
@@ -135,7 +157,13 @@ AC_DEFUN([PMIX_SETUP_CC],[
PMIX_VAR_SCOPE_PUSH([pmix_prog_cc_c11_helper__Thread_local_available pmix_prog_cc_c11_helper_atomic_var_available pmix_prog_cc_c11_helper__Atomic_available pmix_prog_cc_c11_helper__static_assert_available pmix_prog_cc_c11_helper__Generic_available pmix_prog_cc__thread_available pmix_prog_cc_c11_helper_atomic_fetch_xor_explicit_available])
+ # AC_PROG_CC_C99 changes CC (instead of CFLAGS) so save CC (without c99
+ # flags) for use in our wrappers.
+ WRAPPER_CC="$CC"
+ AC_SUBST([WRAPPER_CC])
+
PMIX_PROG_CC_C11
+ PMIX_CHECK_CC_IQUOTE
if test $pmix_cv_c11_supported = no ; then
# It is not currently an error if C11 support is not available. Uncomment the
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_cli.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_cli.m4
index 043c0c4d44..f3ea6a3c91 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_cli.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_cli.m4
@@ -2,8 +2,8 @@ dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2016 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
-dnl Copyright (c) 2017-2019 Intel, Inc. All rights reserved.
-dnl Copyright (c) 2018 Cisco, Inc. All rights reserved.
+dnl Copyright (c) 2017-2018 Intel, Inc. All rights reserved.
+dnl Copyright (c) 2018-2020 Cisco, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
@@ -24,7 +24,7 @@ AC_DEFUN([PMIX_CAPTURE_CONFIGURE_CLI],[
PMIX_VAR_SCOPE_PUSH([sed_quote_subst arg quoted_arg])
$1=
for arg in "$[]@"; do
- sed_quote_subst='s/\(@<:@`"$\\@:>@\)/\\\1/g'
+ sed_quote_subst='s/\(@<:@`"\\@:>@\)/\\\1/g'
case "$arg" in
*@<:@\\\`\"\$[]@:>@*)
quoted_arg=\'`echo "$arg" | sed $sed_quote_subst`\' ;;
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_hwloc.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_hwloc.m4
index a17313259a..7f83952ee1 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_hwloc.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_hwloc.m4
@@ -2,7 +2,7 @@
#
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
-# Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
+# Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@@ -46,7 +46,7 @@ AC_DEFUN([_PMIX_HWLOC_EMBEDDED_MODE],[
])
AC_DEFUN([_PMIX_HWLOC_EXTERNAL],[
- PMIX_VAR_SCOPE_PUSH([pmix_hwloc_dir pmix_hwloc_libdir pmix_hwloc_standard_lib_location pmix_hwloc_standard_header_location])
+ PMIX_VAR_SCOPE_PUSH([pmix_hwloc_dir pmix_hwloc_libdir pmix_hwloc_standard_lib_location pmix_hwloc_standard_header_location pmix_check_hwloc_save_CPPFLAGS pmix_check_hwloc_save_LDFLAGS pmix_check_hwloc_save_LIBS])
AC_ARG_WITH([hwloc],
[AC_HELP_STRING([--with-hwloc=DIR],
@@ -57,13 +57,19 @@ AC_DEFUN([_PMIX_HWLOC_EXTERNAL],[
[Search for hwloc libraries in DIR ])])
pmix_hwloc_support=0
+ pmix_check_hwloc_save_CPPFLAGS="$CPPFLAGS"
+ pmix_check_hwloc_save_LDFLAGS="$LDFLAGS"
+ pmix_check_hwloc_save_LIBS="$LIBS"
+ pmix_hwloc_standard_header_location=yes
+ pmix_hwloc_standard_lib_location=yes
+
AS_IF([test "$with_hwloc" = "internal" || test "$with_hwloc" = "external"],
[with_hwloc=])
if test "$with_hwloc" != "no"; then
AC_MSG_CHECKING([for hwloc in])
if test ! -z "$with_hwloc" && test "$with_hwloc" != "yes"; then
- pmix_hwloc_dir=$with_hwloc
+ pmix_hwloc_dir=$with_hwloc/include
pmix_hwloc_standard_header_location=no
pmix_hwloc_standard_lib_location=no
AS_IF([test -z "$with_hwloc_libdir" || test "$with_hwloc_libdir" = "yes"],
@@ -134,6 +140,10 @@ AC_DEFUN([_PMIX_HWLOC_EXTERNAL],[
AC_MSG_ERROR([Cannot continue])])
fi
+ CPPFLAGS=$pmix_check_hwloc_save_CPPFLAGS
+ LDFLAGS=$pmix_check_hwloc_save_LDFLAGS
+ LIBS=$pmix_check_hwloc_save_LIBS
+
AC_MSG_CHECKING([will hwloc support be built])
if test "$pmix_hwloc_support" != "1"; then
AC_MSG_RESULT([no])
@@ -143,6 +153,12 @@ AC_DEFUN([_PMIX_HWLOC_EXTERNAL],[
AC_MSG_RESULT([yes])
pmix_hwloc_source=$pmix_hwloc_dir
pmix_hwloc_support_will_build=yes
+ AS_IF([test "$pmix_hwloc_standard_header_location" != "yes"],
+ [PMIX_FLAGS_APPEND_UNIQ(PMIX_FINAL_CPPFLAGS, $pmix_hwloc_CPPFLAGS)])
+
+ AS_IF([test "$pmix_hwloc_standard_lib_location" != "yes"],
+ [PMIX_FLAGS_APPEND_UNIQ(PMIX_FINAL_LDFLAGS, $pmix_hwloc_LDFLAGS)])
+ PMIX_FLAGS_APPEND_UNIQ(PMIX_FINAL_LIBS, $pmix_hwloc_LIBS)
fi
# Set output variables
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_libev.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_libev.m4
index 494cc2a2c3..c25fb83b99 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_libev.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_libev.m4
@@ -2,7 +2,7 @@
#
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
-# Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
+# Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
# Copyright (c) 2017-2019 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
@@ -15,7 +15,7 @@
# MCA_libev_CONFIG([action-if-found], [action-if-not-found])
# --------------------------------------------------------------------
AC_DEFUN([PMIX_LIBEV_CONFIG],[
- PMIX_VAR_SCOPE_PUSH([pmix_libev_dir pmix_libev_libdir pmix_libev_standard_header_location pmix_libev_standard_lib_location])
+ PMIX_VAR_SCOPE_PUSH([pmix_libev_dir pmix_libev_libdir pmix_libev_standard_header_location pmix_libev_standard_lib_location pmix_check_libev_save_CPPFLAGS pmix_check_libev_save_LDFLAGS pmix_check_libev_save_LIBS])
AC_ARG_WITH([libev],
[AC_HELP_STRING([--with-libev=DIR],
@@ -61,7 +61,7 @@ AC_DEFUN([PMIX_LIBEV_CONFIG],[
PMIX_CHECK_PACKAGE([pmix_libev],
[event.h],
[ev],
- [event_base_new],
+ [ev_async_send],
[],
[$pmix_libev_dir],
[$pmix_libev_libdir],
@@ -72,12 +72,12 @@ AC_DEFUN([PMIX_LIBEV_CONFIG],[
LIBS="$pmix_check_libev_save_LIBS"])
AS_IF([test $pmix_libev_support -eq 1],
- [LIBS="$LIBS $pmix_libev_LIBS"
+ [PMIX_FLAGS_APPEND_UNIQ(PMIX_FINAL_LIBS, $pmix_libev_LIBS)
AS_IF([test "$pmix_libev_standard_header_location" != "yes"],
- [CPPFLAGS="$CPPFLAGS $pmix_libev_CPPFLAGS"])
+ [PMIX_FLAGS_APPEND_UNIQ(PMIX_FINAL_CPPFLAGS, $pmix_libev_CPPFLAGS)])
AS_IF([test "$pmix_libev_standard_lib_location" != "yes"],
- [LDFLAGS="$LDFLAGS $pmix_libev_LDFLAGS"])])
+ [PMIX_FLAGS_APPEND_UNIQ(PMIX_FINAL_LDFLAGS, $pmix_libev_LDFLAGS)])])
AC_MSG_CHECKING([will libev support be built])
if test $pmix_libev_support -eq 1; then
@@ -88,6 +88,10 @@ AC_DEFUN([PMIX_LIBEV_CONFIG],[
PMIX_SUMMARY_ADD([[External Packages]],[[libev]],[libev],[$pmix_libev_dir])
else
AC_MSG_RESULT([no])
+ # if they asked us to use it, then this is an error
+ AS_IF([test -n "$with_libev" && test "$with_libev" != "no"],
+ [AC_MSG_WARN([LIBEV SUPPORT REQUESTED AND NOT FOUND])
+ AC_MSG_ERROR([CANNOT CONTINUE])])
fi
AC_DEFINE_UNQUOTED([PMIX_HAVE_LIBEV], [$pmix_libev_support], [Whether we are building against libev])
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_libevent.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_libevent.m4
index 28e3a41227..858dd7ace5 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_libevent.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_libevent.m4
@@ -2,9 +2,10 @@
#
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
-# Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
+# Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
# Copyright (c) 2017-2019 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
+# Copyright (c) 2020 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@@ -55,7 +56,7 @@ AC_DEFUN([_PMIX_LIBEVENT_EMBEDDED_MODE],[
])
AC_DEFUN([_PMIX_LIBEVENT_EXTERNAL],[
- PMIX_VAR_SCOPE_PUSH([pmix_event_dir pmix_event_libdir pmix_event_defaults])
+ PMIX_VAR_SCOPE_PUSH([pmix_event_dir pmix_event_libdir pmix_event_defaults pmix_check_libevent_save_CPPFLAGS pmix_check_libevent_save_LDFLAGS pmix_check_libevent_save_LIBS])
AC_ARG_WITH([libevent],
[AC_HELP_STRING([--with-libevent=DIR],
@@ -68,6 +69,7 @@ AC_DEFUN([_PMIX_LIBEVENT_EXTERNAL],[
pmix_check_libevent_save_CPPFLAGS="$CPPFLAGS"
pmix_check_libevent_save_LDFLAGS="$LDFLAGS"
pmix_check_libevent_save_LIBS="$LIBS"
+ pmix_event_defaults=yes
# get rid of the trailing slash(es)
libevent_prefix=$(echo $with_libevent | sed -e 'sX/*$XXg')
@@ -108,14 +110,36 @@ AC_DEFUN([_PMIX_LIBEVENT_EXTERNAL],[
PMIX_CHECK_PACKAGE([pmix_libevent],
[event.h],
- [event],
+ [event_core],
[event_config_new],
- [-levent -levent_pthreads],
+ [-levent_pthreads],
[$pmix_event_dir],
[$pmix_event_libdir],
[pmix_libevent_support=1],
[pmix_libevent_support=0])
+ # Check to see if the above check failed because it conflicted with LSF's libevent.so
+ # This can happen if LSF's library is in the LDFLAGS envar or default search
+ # path. The 'event_getcode4name' function is only defined in LSF's libevent.so and not
+ # in Libevent's libevent.so
+ if test $pmix_libevent_support -eq 0; then
+ AC_CHECK_LIB([event], [event_getcode4name],
+ [AC_MSG_WARN([===================================================================])
+ AC_MSG_WARN([Possible conflicting libevent.so libraries detected on the system.])
+ AC_MSG_WARN([])
+ AC_MSG_WARN([LSF provides a libevent.so that is not from Libevent in its])
+ AC_MSG_WARN([library path. It is possible that you have installed Libevent])
+ AC_MSG_WARN([on the system, but the linker is picking up the wrong version.])
+ AC_MSG_WARN([])
+ AC_MSG_WARN([You will need to address this linker path issue. One way to do so is])
+ AC_MSG_WARN([to make sure the libevent system library path occurs before the])
+ AC_MSG_WARN([LSF library path.])
+ AC_MSG_WARN([===================================================================])
+ ])
+ fi
+
+ # need to add resulting flags to global ones so we can
+ # test for thread support
AS_IF([test "$pmix_event_defaults" = "no"],
[PMIX_FLAGS_APPEND_UNIQ(CPPFLAGS, $pmix_libevent_CPPFLAGS)
PMIX_FLAGS_APPEND_UNIQ(LDFLAGS, $pmix_libevent_LDFLAGS)])
@@ -125,7 +149,7 @@ AC_DEFUN([_PMIX_LIBEVENT_EXTERNAL],[
# Ensure that this libevent has the symbol
# "evthread_set_lock_callbacks", which will only exist if
# libevent was configured with thread support.
- AC_CHECK_LIB([event], [evthread_set_lock_callbacks],
+ AC_CHECK_LIB([event_core], [evthread_set_lock_callbacks],
[],
[AC_MSG_WARN([External libevent does not have thread support])
AC_MSG_WARN([PMIx requires libevent to be compiled with])
@@ -156,9 +180,9 @@ AC_DEFUN([_PMIX_LIBEVENT_EXTERNAL],[
[Location of event.h])
pmix_libevent_source=$pmix_event_dir
AS_IF([test "$pmix_event_defaults" = "no"],
- [PMIX_FLAGS_APPEND_UNIQ(CPPFLAGS, $pmix_libevent_CPPFLAGS)
- PMIX_FLAGS_APPEND_UNIQ(LDFLAGS, $pmix_libevent_LDFLAGS)])
- PMIX_FLAGS_APPEND_UNIQ(LIBS, $pmix_libevent_LIBS)
+ [PMIX_FLAGS_APPEND_UNIQ(PMIX_FINAL_CPPFLAGS, $pmix_libevent_CPPFLAGS)
+ PMIX_FLAGS_APPEND_UNIQ(PMIX_FINAL_LDFLAGS, $pmix_libevent_LDFLAGS)])
+ PMIX_FLAGS_APPEND_UNIQ(PMIX_FINAL_LIBS, $pmix_libevent_LIBS)
else
AC_MSG_RESULT([no])
fi
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_man_pages.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_man_pages.m4
new file mode 100644
index 0000000000..a6b28130a1
--- /dev/null
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_man_pages.m4
@@ -0,0 +1,91 @@
+dnl -*- shell-script -*-
+dnl
+dnl Copyright (c) 2020 Cisco Systems, Inc. All rights reserved.
+dnl
+dnl Copyright (c) 2020 Intel, Inc. All rights reserved.
+dnl $COPYRIGHT$
+dnl
+dnl Additional copyrights may follow
+dnl
+dnl $HEADER$
+dnl
+
+dnl
+dnl Just in case someone looks for it here someday, here is a
+dnl conveninent reference for what Markdown pandoc supports:
+dnl
+dnl https://rmarkdown.rstudio.com/authoring_pandoc_markdown.html
+dnl
+
+AC_DEFUN([PMIX_SETUP_MAN_PAGES],[
+ AC_ARG_ENABLE(man-pages,
+ [AC_HELP_STRING([--disable-man-pages],
+ [Do not generate/install man pages (default: enabled)])])
+
+ PANDOC=
+ PMIX_ENABLE_MAN_PAGES=0
+ AC_MSG_CHECKING([if want man pages])
+ AS_IF([test -z "$enable_man_pages" || test "$enable_man_pages" = "yes"],
+ [AC_MSG_RESULT([yes])
+ PMIX_ENABLE_MAN_PAGES=1
+ _PMIX_SETUP_PANDOC],
+ [AC_MSG_RESULT([no])])
+
+ AC_SUBST(PANDOC)
+ AM_CONDITIONAL([PMIX_ENABLE_MAN_PAGES], [test $PMIX_ENABLE_MAN_PAGES -eq 1])
+ AC_DEFINE_UNQUOTED([PMIX_ENABLE_MAN_PAGES], [$PMIX_ENABLE_MAN_PAGES],
+ [Whether or not we will build manpages])
+
+ AS_IF([test $PMIX_ENABLE_MAN_PAGES -eq 1],
+ [PMIX_SUMMARY_ADD([[Options]],[[Manpages built]], [pmix_manpages], [yes])],
+ [PMIX_SUMMARY_ADD([[Options]],[[Manpages built]], [pmix_manpages], [yes])])
+
+])
+
+dnl Back-end pandoc setup
+AC_DEFUN([_PMIX_SETUP_PANDOC],[
+ PMIX_VAR_SCOPE_PUSH([min_major_version min_minor_version pandoc_version pandoc_major pandoc_minor])
+
+ # If we need to generate man pages, we need pandoc >v1.12.
+ AC_PATH_PROG([PANDOC], [pandoc])
+
+ # If we found Pandoc, check its version. We need >=v1.12.
+ # To be clear: I know that v1.12 works, and I know that v1.9 does not
+ # work. I did not test the versions in between to know exactly what
+ # the lowest version is that works. Someone is free to update this
+ # check someday to be more accurate if they wish.
+ min_major_version=1
+ min_minor_version=12
+ AS_IF([test -n "$PANDOC"],
+ [pandoc_version=`pandoc --version | head -n 1 | awk '{ print $[2] }'`
+ pandoc_major=`echo $pandoc_version | cut -d\. -f1`
+ pandoc_minor=`echo $pandoc_version | cut -d\. -f2`
+ AC_MSG_CHECKING([pandoc version])
+ AC_MSG_RESULT([major: $pandoc_major, minor: $pandoc_minor])
+
+ AC_MSG_CHECKING([if pandoc version is >=v$min_major_version.$min_minor_version])
+ AS_IF([test $pandoc_major -lt $min_major_version], [PANDOC=])
+ AS_IF([test $pandoc_major -eq $min_major_version && test $pandoc_minor -lt $min_minor_version],
+ [PANDOC=])
+ AS_IF([test -n "$PANDOC"],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+ ])
+
+ AS_IF([test -z "$PANDOC" || test -n "`echo $PANDOC | $GREP missing`"],
+ [AS_IF([test "$PMIX_DEVEL" = "1" && test -z "$enable_man_pages"],
+ [AC_MSG_CHECKING([man pages will be built])
+ AC_MSG_RESULT([no - adequate pandoc installation not found])
+ PANDOC=
+ PMIX_ENABLE_MAN_PAGES=0],
+ [AS_IF([test ! -f "$srcdir/tools/wrapper/pmix_wrapper.1"],
+ [AC_MSG_WARN([*** Could not find a suitable pandoc on your system.])
+ AC_MSG_WARN([*** You need pandoc >=$min_major_version.$min_minor_version to build OpenPMIx man pages.])
+ AC_MSG_WARN([*** See pandoc.org.])
+ AC_MSG_WARN([*** NOTE: If you are building from a tarball downloaded from the OpenPMIx GitHub repository, you do not need Pandoc])
+ AC_MSG_ERROR([Cannot continue])
+ ])])
+ ])
+
+ PMIX_VAR_SCOPE_POP
+])
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_zlib.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_zlib.m4
index 5440999eb1..3a42c6f28f 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_zlib.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_zlib.m4
@@ -2,7 +2,7 @@
#
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
-# Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
+# Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_summary.m4 b/opal/mca/pmix/pmix3x/pmix/config/pmix_summary.m4
index 9b9bc9024e..6c9487e55e 100644
--- a/opal/mca/pmix/pmix3x/pmix/config/pmix_summary.m4
+++ b/opal/mca/pmix/pmix3x/pmix/config/pmix_summary.m4
@@ -5,7 +5,7 @@ dnl reserved.
dnl Copyright (c) 2016-2018 Cisco Systems, Inc. All rights reserved
dnl Copyright (c) 2016 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
-dnl Copyright (c) 2018-2019 Intel, Inc. All rights reserved.
+dnl Copyright (c) 2018 Intel, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
diff --git a/opal/mca/pmix/pmix3x/pmix/configure.ac b/opal/mca/pmix/pmix3x/pmix/configure.ac
index 4bab86e668..a42a6844be 100644
--- a/opal/mca/pmix/pmix3x/pmix/configure.ac
+++ b/opal/mca/pmix/pmix3x/pmix/configure.ac
@@ -10,7 +10,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
-# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
+# Copyright (c) 2006-2020 Cisco Systems, Inc. All rights reserved
# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2006-2017 Los Alamos National Security, LLC. All rights
# reserved.
@@ -19,7 +19,7 @@
# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
-# Copyright (c) 2014-2019 Intel, Inc. All rights reserved.
+# Copyright (c) 2014-2020 Intel, Inc. All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# Copyright (c) 2016-2018 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
@@ -44,7 +44,7 @@ m4_include([config/autogen_found_items.m4])
AC_INIT([pmix],
[m4_normalize(esyscmd([config/pmix_get_version.sh VERSION --tarball]))],
- [http://pmix.github.io/master], [pmix])
+ [https://github.com/pmix/pmix/issues], [pmix])
AC_PREREQ(2.69)
AC_CONFIG_AUX_DIR(./config)
# Note that this directory must *exactly* match what was specified via
@@ -94,7 +94,7 @@ pmix_show_title "Configuring PMIx"
AC_CANONICAL_TARGET
# Init automake
-AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define 1.13.4 -Wall -Werror])
+AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define 1.13.4])
# SILENT_RULES is new in AM 1.11, but we require 1.13.4 or higher via
# autogen. Limited testing shows that calling SILENT_RULES directly
@@ -143,11 +143,11 @@ AH_TOP([/* -*- c -*-
#ifndef PMIX_CONFIG_H
#define PMIX_CONFIG_H
-#include
+#include "src/include/pmix_config_top.h"
])
AH_BOTTOM([
-#include
+#include "src/include/pmix_config_bottom.h"
#endif /* PMIX_CONFIG_H */
])
@@ -231,6 +231,7 @@ AS_IF([test ! -z "$PMIX_CFLAGS_cache"], [CFLAGS="$CFLAGS $PMIX_CFLAGS_cache"])
#fi
# Cleanup duplicate flags
+PMIX_FLAGS_UNIQ(CFLAGS)
PMIX_FLAGS_UNIQ(CPPFLAGS)
PMIX_FLAGS_UNIQ(LDFLAGS)
PMIX_FLAGS_UNIQ(LIBS)
@@ -257,6 +258,43 @@ AC_MSG_RESULT([$LDFLAGS])
AC_MSG_CHECKING([final LIBS])
AC_MSG_RESULT([$LIBS])
+####################################################################
+# Setup variables for pkg-config file (maint/pmix.pc.in)
+####################################################################
+
+#
+# Dependencies that themselves have a pkg-config file available.
+#
+PC_REQUIRES=""
+AS_IF([test "$pmix_hwloc_support_will_build" = "yes"],
+ [PC_REQUIRES="$PC_REQUIRES hwloc"])
+AS_IF([test $pmix_libevent_support -eq 1],
+ [PC_REQUIRES="$PC_REQUIRES libevent"])
+AS_IF([test "$pmix_zlib_support" = "1"],
+ [PC_REQUIRES="$PC_REQUIRES zlib"])
+AC_SUBST([PC_REQUIRES], ["$PC_REQUIRES"])
+
+#
+# Dependencies that don't have a pkg-config file available.
+# In this case we need to manually add -L and -l
+# to the PC_PRIVATE_LIBS variable.
+#
+PC_PRIVATE_LIBS=""
+AS_IF([test $pmix_libev_support -eq 1],
+ [PC_PRIVATE_LIBS="$PC_PRIVATE_LIBS $pmix_libev_LDFLAGS $pmix_libev_LIBS"])
+AC_SUBST([PC_PRIVATE_LIBS], ["$PC_PRIVATE_LIBS"])
+
+####################################################################
+# -Werror for CI scripts
+####################################################################
+
+AC_ARG_ENABLE(werror,
+ AC_HELP_STRING([--enable-werror],
+ [Treat compiler warnings as errors]),
+[
+ CFLAGS="$CFLAGS -Werror"
+])
+
####################################################################
# Version information
####################################################################
@@ -275,7 +313,8 @@ AC_SUBST([libmca_common_dstore_so_version])
AC_CONFIG_FILES(pmix_config_prefix[contrib/Makefile]
pmix_config_prefix[examples/Makefile]
pmix_config_prefix[test/Makefile]
- pmix_config_prefix[test/simple/Makefile])
+ pmix_config_prefix[test/simple/Makefile]
+ pmix_config_prefix[maint/pmix.pc])
pmix_show_title "Configuration complete"
diff --git a/opal/mca/pmix/pmix3x/pmix/contrib/Makefile.am b/opal/mca/pmix/pmix3x/pmix/contrib/Makefile.am
index 2086924a85..13512b0532 100644
--- a/opal/mca/pmix/pmix3x/pmix/contrib/Makefile.am
+++ b/opal/mca/pmix/pmix3x/pmix/contrib/Makefile.am
@@ -14,7 +14,7 @@
# Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved.
# Copyright (c) 2013-2016 Los Alamos National Security, Inc. All rights
# reserved.
-# Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
+# Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@@ -25,12 +25,13 @@
EXTRA_DIST = \
make_dist_tarball \
buildrpm.sh \
- platform/optimized \
- pmix_jenkins.sh \
- pmix-release.sh \
- pmix.spec \
- update-my-copyright.pl \
- whitespace-purge.sh
+ pmix_jenkins.sh \
+ pmix-release.sh \
+ pmix.spec \
+ update-my-copyright.pl \
+ whitespace-purge.sh \
+ make_manpage.pl \
+ platform/optimized
include perf_tools/Makefile.include
diff --git a/opal/mca/pmix/pmix3x/pmix/contrib/make_dist_tarball b/opal/mca/pmix/pmix3x/pmix/contrib/make_dist_tarball
index f3fc22b5e4..3fb951bf96 100755
--- a/opal/mca/pmix/pmix3x/pmix/contrib/make_dist_tarball
+++ b/opal/mca/pmix/pmix3x/pmix/contrib/make_dist_tarball
@@ -264,7 +264,7 @@ make_tarball() {
#
echo "*** Running autogen $autogen_args..."
rm -f success
- (./autogen.sh $autogen_args 2>&1 && touch success) | tee auto.out
+ (./autogen.pl $autogen_args 2>&1 && touch success) | tee auto.out
if test ! -f success; then
echo "Autogen failed. Aborting"
exit 1
diff --git a/opal/mca/pmix/pmix3x/pmix/contrib/make_manpage.pl b/opal/mca/pmix/pmix3x/pmix/contrib/make_manpage.pl
new file mode 100755
index 0000000000..7a2c2de169
--- /dev/null
+++ b/opal/mca/pmix/pmix3x/pmix/contrib/make_manpage.pl
@@ -0,0 +1,56 @@
+#!/usr/bin/env perl
+#
+# Copyright (c) 2015 Research Organization for Information Science
+# and Technology (RIST). All rights reserved.
+# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
+# Copyright (c) 2016-2019 Intel, Inc. All rights reserved.
+# $COPYRIGHT$
+#
+# Subroutine to generate a bunch of Fortran declarations and symbols
+#
+
+use strict;
+
+use Getopt::Long;
+
+my $package_name;
+my $package_version;
+my $pmix_date;
+my $input;
+my $output;
+my $help_arg = 0;
+
+&Getopt::Long::Configure("bundling");
+my $ok = Getopt::Long::GetOptions("package-name=s" => \$package_name,
+ "package-version=s" => \$package_version,
+ "pmix-date=s" => \$pmix_date,
+ "input=s" => \$input,
+ "output=s" => \$output);
+
+if ($help_arg || !$ok ||
+ !defined($input) ||
+ !defined($output) ||
+ !defined($package_name) ||
+ !defined($package_version) ||
+ !defined($pmix_date)) {
+ print "Usage: $0 --package-name= --package-version= --pmix-date= --input= --output=