From d416c7fd8a31a3b4b45f735ce8aa796c4827cc7e Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 28 Dec 2015 21:43:13 +0900 Subject: [PATCH 1/9] pmix/external: no more circular dependencies if not building shared DSO --- opal/mca/pmix/external/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/opal/mca/pmix/external/Makefile.am b/opal/mca/pmix/external/Makefile.am index d7fbefcfc8..770850c6e3 100644 --- a/opal/mca/pmix/external/Makefile.am +++ b/opal/mca/pmix/external/Makefile.am @@ -44,7 +44,5 @@ noinst_LTLIBRARIES = $(component_noinst) libmca_pmix_external_la_SOURCES =$(sources) libmca_pmix_external_la_CFLAGS = libmca_pmix_external_la_CPPFLAGS = $(opal_pmix_ext_CPPFLAGS) -libmca_pmix_external_la_LDFLAGS = -module -avoid-version -L$(opal_pmix_ext_LDFLAGS) -libmca_pmix_external_la_LIBADD = $(opal_pmix_ext_LIBS) \ - $(OPAL_TOP_BUILDDIR)/opal/mca/event/lib@OPAL_LIB_PREFIX@mca_event.la \ - $(OPAL_TOP_BUILDDIR)/opal/mca/hwloc/lib@OPAL_LIB_PREFIX@mca_hwloc.la +libmca_pmix_external_la_LDFLAGS = -module -avoid-version $(opal_pmix_ext_LDFLAGS) +libmca_pmix_external_la_LIBADD = $(opal_pmix_ext_LIBS) From 55ae6768d3af1234b389aca81f09db156346e37f Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 28 Dec 2015 17:25:41 +0900 Subject: [PATCH 2/9] configury: use --with-pmix option instead of --with-external-pmix --- config/opal_check_pmi.m4 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/config/opal_check_pmi.m4 b/config/opal_check_pmi.m4 index 67804a733d..a50bcb53f0 100644 --- a/config/opal_check_pmi.m4 +++ b/config/opal_check_pmi.m4 @@ -232,20 +232,25 @@ AC_DEFUN([OPAL_CHECK_PMIX],[ OPAL_VAR_SCOPE_PUSH([pmix_ext_install_dir]) - AC_ARG_WITH([external-pmix], - [AC_HELP_STRING([--with-external-pmix(=DIR)], - [Use external PMIx support, optionally adding DIR to the search path (default: no)])], - [], with_external_pmix=no) + AC_ARG_WITH([pmix], + [AC_HELP_STRING([--with-pmix(=DIR)], + [Build PMIx support. DIR can take one of three values: "internal", "external", or a valid directory name. "internal" (or no DIR value) forces Open MPI to use its internal copy of PMIx. "external" forces Open MPI to use an external installation of PMIx. Supplying a valid directory name also forces Open MPI to use an external installation of PMIx, and adds DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries. Note that Open MPI does not support --without-pmix.])]) - AC_MSG_CHECKING([if user requested PMIx support]) - AS_IF([test "$with_external_pmix" = "no"], + AS_IF([test "$with_pmix" = "no"], + [AC_MSG_WARN([Open MPI requires PMIx support. It can be built]) + AC_MSG_WARN([with either its own internal copy of PMIx, or with]) + AC_MSG_WARN([an external copy that you supply.]) + AC_MSG_ERROR([Cannot continue])]) + + AC_MSG_CHECKING([if user requested PMIx support($with_pmix)]) + AS_IF([test -z "$with_pmix" || test "$with_pmix" = "yes" || test "$with_mpix" = "internal"], [AC_MSG_RESULT([no]) opal_external_pmix_happy="no"], [AC_MSG_RESULT([yes]) # check for external pmix lib */ - AS_IF([test "$with_external_pmix" == "yes" || test -z "$with_external_pmix"], + AS_IF([test "$with_pmix" = "external"], [pmix_ext_install_dir=/usr], - [pmix_ext_install_dir=$with_external_pmix]) + [pmix_ext_install_dir=$with_pmix]) # cannot use check_package because there are # external dependencies to make the headers From 11573297329bf7ddb53d39c51abf19feb6243a09 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 28 Dec 2015 23:08:53 +0900 Subject: [PATCH 3/9] configury: misc pmix112 fixes --- opal/mca/pmix/pmix112/configure.m4 | 66 ++++++++++++++---------------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/opal/mca/pmix/pmix112/configure.m4 b/opal/mca/pmix/pmix112/configure.m4 index ccade7f828..b03c54ddc8 100644 --- a/opal/mca/pmix/pmix112/configure.m4 +++ b/opal/mca/pmix/pmix112/configure.m4 @@ -28,50 +28,46 @@ AC_DEFUN([MCA_opal_pmix_pmix112_CONFIG],[ AC_CONFIG_FILES([opal/mca/pmix/pmix112/Makefile]) + OPAL_VAR_SCOPE_PUSH([PMIX_VERSION opal_pmix_pmix112_save_CPPFLAGS opal_pmix_pmix112_save_LDFLAGS opal_pmix_pmix112_save_LIBS opal_pmix_pmix112_basedir opal_pmix_pmix112_save_cflags]) + AS_IF([test "$opal_external_pmix_happy" = "yes"], [AC_MSG_WARN([using an external pmix; disqualifiying this component]) opal_pmix_pmix112_happy=0], + [PMIX_VERSION= + opal_pmix_pmix112_basedir=opal/mca/pmix/pmix112 - [OPAL_VAR_SCOPE_PUSH([PMIX_VERSION opal_pmix_pmix112_save_CPPFLAGS opal_pmix_pmix112_save_LDFLAGS opal_pmix_pmix112_save_LIBS opal_pmix_pmix112_basedir opal_pmix_pmix112_save_cflags]) + opal_pmix_pmix112_save_CFLAGS=$CFLAGS + opal_pmix_pmix112_save_CPPFLAGS=$CPPFLAGS + opal_pmix_pmix112_save_LDFLAGS=$LDFLAGS + opal_pmix_pmix112_save_LIBS=$LIBS - PMIX_VERSION= - opal_pmix_pmix112_basedir=opal/mca/pmix/pmix112 + opal_pmix_pmix112_args="--enable-embedded-mode --with-pmix-symbol-prefix=opal_pmix_pmix112_ --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\" --with-hwloc-header=\\\"$opal_hwloc_base_include\\\"" + AS_IF([test "$enable_debug" = "yes"], + [opal_pmix_pmix112_args="--enable-debug $opal_pmix_pmix112_args" + CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"], + [opal_pmix_pmix112_args="--disable-debug $opal_pmix_pmix112_args" + CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS"]) + CPPFLAGS="-I$OPAL_TOP_SRCDIR -I$OPAL_TOP_BUILDDIR -I$OPAL_TOP_SRCDIR/opal/include -I$OPAL_TOP_BUILDDIR/opal/include $CPPFLAGS" - opal_pmix_pmix112_save_CFLAGS=$CFLAGS - opal_pmix_pmix112_save_CPPFLAGS=$CPPFLAGS - opal_pmix_pmix112_save_LDFLAGS=$LDFLAGS - opal_pmix_pmix112_save_LIBS=$LIBS + OPAL_CONFIG_SUBDIR([$opal_pmix_pmix112_basedir/pmix], + [$opal_pmix_pmix112_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'], + [opal_pmix_pmix112_happy=1], [opal_pmix_pmix112_happy=0]) - opal_pmix_pmix112_args="--enable-embedded-mode --with-pmix-symbol-prefix=opal_pmix_pmix112_ --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\" --with-hwloc-header=\\\"$opal_hwloc_base_include\\\"" - if test "$enable_debug" = "yes"; then - opal_pmix_pmix112_args="--enable-debug $opal_pmix_pmix112_args" - CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g" - else - opal_pmix_pmix112_args="--disable-debug $opal_pmix_pmix112_args" - CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS" - fi - CPPFLAGS="-I$OPAL_TOP_SRCDIR -I$OPAL_TOP_BUILDDIR -I$OPAL_TOP_SRCDIR/opal/include -I$OPAL_TOP_BUILDDIR/opal/include $CPPFLAGS" + AS_IF([test $opal_pmix_pmix112_happy -eq 1], + [PMIX_VERSION="internal v`$srcdir/$opal_pmix_pmix112_basedir/pmix/config/pmix_get_version.sh $srcdir/$opal_pmix_pmix112_basedir/pmix/VERSION`" + # Build flags for our Makefile.am + opal_pmix_pmix112_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_pmix_pmix112_basedir"'/pmix/libpmix.la' + opal_pmix_pmix112_CPPFLAGS='-I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix112/pmix/include/pmix -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix112/pmix/include -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix112/pmix -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix112/pmix' + AC_SUBST([opal_pmix_pmix112_LIBS]) + AC_SUBST([opal_pmix_pmix112_CPPFLAGS])]) - OPAL_CONFIG_SUBDIR([$opal_pmix_pmix112_basedir/pmix], - [$opal_pmix_pmix112_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'], - [opal_pmix_pmix112_happy=1], [opal_pmix_pmix112_happy=0]) + # Finally, add a flag to support static builds + pmix_pmix112_WRAPPER_EXTRA_LIBS=-lpmix - if test $opal_pmix_pmix112_happy -eq 1; then - PMIX_VERSION="internal v`$srcdir/$opal_pmix_pmix112_basedir/pmix/config/pmix_get_version.sh $srcdir/$opal_pmix_pmix112_basedir/pmix/VERSION`" - # Build flags for our Makefile.am - opal_pmix_pmix112_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_pmix_pmix112_basedir"'/pmix/libpmix.la' - opal_pmix_pmix112_CPPFLAGS='-I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix112/pmix/include/pmix -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix112/pmix/include -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix112/pmix -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix112/pmix' - AC_SUBST([opal_pmix_pmix112_LIBS]) - AC_SUBST([opal_pmix_pmix112_CPPFLAGS]) - fi - - # Finally, add a flag to support static builds - pmix_pmix112_WRAPPER_EXTRA_LIBS=-lpmix - - CFLAGS=$opal_pmix_pmix112_save_CFLAGS - CPPFLAGS=$opal_pmix_pmix112_save_CPPFLAGS - LDFLAGS=$opal_pmix_pmix112_save_LDFLAGS - LIBS=$opal_pmix_pmix112_save_LIBS + CFLAGS=$opal_pmix_pmix112_save_CFLAGS + CPPFLAGS=$opal_pmix_pmix112_save_CPPFLAGS + LDFLAGS=$opal_pmix_pmix112_save_LDFLAGS + LIBS=$opal_pmix_pmix112_save_LIBS ]) AS_IF([test $opal_pmix_pmix112_happy -eq 1], From c757c5c6126c1d61c746fc329edda72b8df5cff5 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 28 Dec 2015 23:10:57 +0900 Subject: [PATCH 4/9] pmix/external: Fix error handler usage --- opal/mca/pmix/external/pmix_ext_client.c | 17 ++++++++++++++++- opal/mca/pmix/external/pmix_ext_server_south.c | 17 ++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/opal/mca/pmix/external/pmix_ext_client.c b/opal/mca/pmix/external/pmix_ext_client.c index 04f5981df6..80ab1b5952 100644 --- a/opal/mca/pmix/external/pmix_ext_client.c +++ b/opal/mca/pmix/external/pmix_ext_client.c @@ -36,6 +36,18 @@ static pmix_proc_t my_proc; static char *dbgvalue=NULL; static int errhdler_ref = 0; +static void completion_handler (void * cbdata) { + int * cond = (int *)cbdata; + *cond = 0; +} + +#define PMIX_WAIT_FOR_COMPLETION(a) \ + do { \ + while ((a)) { \ + usleep(10); \ + } \ + } while (0); + static void myerr(pmix_status_t status, pmix_proc_t procs[], size_t nprocs, pmix_info_t info[], size_t ninfo) @@ -45,6 +57,7 @@ static void myerr(pmix_status_t status, opal_namelist_t *nm; opal_value_t *iptr; size_t n; + volatile int cond = 1; /* convert the incoming status */ rc = pmix1_convert_rc(status); @@ -68,7 +81,9 @@ static void myerr(pmix_status_t status, } /* call the base errhandler */ - opal_pmix_base_errhandler(rc, &plist, &ilist); + opal_pmix_base_errhandler(rc, &plist, &ilist, completion_handler, (void *)&cond); + PMIX_WAIT_FOR_COMPLETION(cond); + OPAL_LIST_DESTRUCT(&plist); OPAL_LIST_DESTRUCT(&ilist); } diff --git a/opal/mca/pmix/external/pmix_ext_server_south.c b/opal/mca/pmix/external/pmix_ext_server_south.c index 096e0b2b25..f7346ed14f 100644 --- a/opal/mca/pmix/external/pmix_ext_server_south.c +++ b/opal/mca/pmix/external/pmix_ext_server_south.c @@ -50,6 +50,18 @@ extern opal_pmix_server_module_t *host_module; static char *dbgvalue=NULL; static int errhdler_ref = 0; +static void completion_handler (void * cbdata) { + int * cond = (int *)cbdata; + *cond = 0; +} + +#define PMIX_WAIT_FOR_COMPLETION(a) \ + do { \ + while ((a)) { \ + usleep(10); \ + } \ + } while (0); + static void myerr(pmix_status_t status, pmix_proc_t procs[], size_t nprocs, pmix_info_t info[], size_t ninfo) @@ -58,6 +70,7 @@ static void myerr(pmix_status_t status, opal_list_t plist, ilist; opal_namelist_t *nm; opal_value_t *iptr; + volatile int cond = 1; size_t n; /* convert the incoming status */ @@ -82,7 +95,9 @@ static void myerr(pmix_status_t status, } /* call the base errhandler */ - opal_pmix_base_errhandler(rc, &plist, &ilist); + opal_pmix_base_errhandler(rc, &plist, &ilist, completion_handler, (void *)&cond); + PMIX_WAIT_FOR_COMPLETION(cond); + OPAL_LIST_DESTRUCT(&plist); OPAL_LIST_DESTRUCT(&ilist); } From 810f2446b7ff29a4edd8fb2a1453049d02ca2941 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Wed, 16 Dec 2015 19:06:47 -0800 Subject: [PATCH 5/9] Add pmix120 component, update the error handling functions in the PMIx API. Update the configure logic for the new pmix120 component ckpt Get the pmix120 component to work - still not really registering or handling notifications, but infrastructure now operates Cleanup some of the symbol scopes, and provide a more comprehensive rename.h file. Will pretty it up later - let's see how this works Cleanup the rename files to use the pretty macros --- .gitignore | 4 + ompi/errhandler/errhandler.c | 44 +- ompi/errhandler/errhandler.h | 35 +- ompi/mca/rte/orte/rte_orte.h | 7 +- ompi/mca/rte/rte.h | 4 +- ompi/runtime/ompi_mpi_init.c | 18 +- opal/mca/pmix/base/base.h | 12 +- opal/mca/pmix/base/pmix_base_fns.c | 26 +- opal/mca/pmix/external/pmix_ext_client.c | 2 +- .../mca/pmix/external/pmix_ext_server_south.c | 2 +- opal/mca/pmix/pmix.h | 105 +- opal/mca/pmix/pmix112/pmix/Makefile.am | 8 +- .../pmix/pmix112/pmix/include/pmix/rename.h | 623 +++-- .../pmix112/pmix/src/buffer_ops/buffer_ops.h | 2 - .../pmix112/pmix/src/buffer_ops/open_close.c | 7 - .../pmix112/pmix/src/client/pmix_client.c | 8 + opal/mca/pmix/pmix112/pmix1_client.c | 26 +- opal/mca/pmix/pmix112/pmix1_server_north.c | 56 +- opal/mca/pmix/pmix112/pmix1_server_south.c | 30 +- opal/mca/pmix/pmix120/Makefile.am | 51 + opal/mca/pmix/pmix120/autogen.subdirs | 1 + opal/mca/pmix/pmix120/configure.m4 | 82 + opal/mca/pmix/pmix120/pmix/AUTHORS | 30 + opal/mca/pmix/pmix120/pmix/INSTALL | 88 + opal/mca/pmix/pmix120/pmix/LICENSE | 93 + opal/mca/pmix/pmix120/pmix/Makefile.am | 96 + opal/mca/pmix/pmix120/pmix/NEWS | 46 + opal/mca/pmix/pmix120/pmix/README | 315 +++ opal/mca/pmix/pmix120/pmix/VERSION | 65 + opal/mca/pmix/pmix120/pmix/autogen.sh | 5 + opal/mca/pmix/pmix120/pmix/config/Makefile.am | 50 + .../pmix120/pmix/config/c_get_alignment.m4 | 72 + .../pmix/pmix120/pmix/config/distscript.sh | 56 + opal/mca/pmix/pmix120/pmix/config/pmix.m4 | 767 ++++++ .../pmix/config/pmix_check_attributes.m4 | 539 ++++ .../pmix/config/pmix_check_broken_qsort.m4 | 55 + .../config/pmix_check_compiler_version.m4 | 92 + .../pmix120/pmix/config/pmix_check_ident.m4 | 103 + .../pmix120/pmix/config/pmix_check_munge.m4 | 83 + .../pmix120/pmix/config/pmix_check_package.m4 | 176 ++ .../pmix120/pmix/config/pmix_check_sasl.m4 | 82 + .../pmix120/pmix/config/pmix_check_vendor.m4 | 252 ++ .../pmix/config/pmix_check_visibility.m4 | 90 + .../config/pmix_ensure_contains_optflags.m4 | 67 + .../pmix120/pmix/config/pmix_functions.m4 | 533 ++++ .../pmix120/pmix/config/pmix_get_version.sh | 161 ++ .../pmix120/pmix/config/pmix_load_platform.m4 | 81 + .../pmix120/pmix/config/pmix_search_libs.m4 | 34 + .../pmix/pmix120/pmix/config/pmix_setup_cc.m4 | 334 +++ .../pmix120/pmix/config/pmix_setup_hwloc.m4 | 119 + .../pmix/config/pmix_setup_libevent.m4 | 130 + opal/mca/pmix/pmix120/pmix/configure.ac | 214 ++ .../pmix120/pmix/contrib/platform/optimized | 3 + .../pmix120/pmix/contrib/pmix-valgrind.supp | 48 + opal/mca/pmix/pmix120/pmix/examples/client.c | 158 ++ opal/mca/pmix/pmix120/pmix/examples/dmodex.c | 217 ++ opal/mca/pmix/pmix120/pmix/examples/dynamic.c | 199 ++ opal/mca/pmix/pmix120/pmix/examples/fault.c | 122 + opal/mca/pmix/pmix120/pmix/examples/pub.c | 164 ++ .../mca/pmix/pmix120/pmix/include/Makefile.am | 42 + opal/mca/pmix/pmix120/pmix/include/pmi.h | 829 ++++++ opal/mca/pmix/pmix120/pmix/include/pmi2.h | 562 ++++ opal/mca/pmix/pmix120/pmix/include/pmix.h | 401 +++ .../pmix/include/pmix/autogen/config.h.in | 197 ++ .../include/pmix/autogen/pmix_config_bottom.h | 429 +++ .../include/pmix/autogen/pmix_config_top.h | 39 + .../pmix120/pmix/include/pmix/pmix_common.h | 972 +++++++ .../pmix/pmix120/pmix/include/pmix/rename.h | 423 +++ .../pmix/pmix120/pmix/include/pmix_server.h | 444 +++ .../pmix/pmix120/pmix/include/private/align.h | 29 + .../pmix/include/private/autogen/README.txt | 3 + .../pmix/include/private/hash_string.h | 69 + .../pmix/include/private/pmix_socket_errno.h | 26 + .../pmix/include/private/pmix_stdint.h | 325 +++ .../pmix120/pmix/include/private/prefetch.h | 37 + .../pmix/pmix120/pmix/include/private/types.h | 221 ++ .../pmix/pmix120/pmix/man/man3/pmix_abort.3 | 62 + .../pmix/pmix120/pmix/man/man3/pmix_commit.3 | 35 + .../pmix120/pmix/man/man3/pmix_finalize.3 | 31 + .../pmix/pmix120/pmix/man/man3/pmix_init.3 | 49 + .../pmix120/pmix/man/man3/pmix_initialized.3 | 30 + .../mca/pmix/pmix120/pmix/man/man3/pmix_put.3 | 60 + opal/mca/pmix/pmix120/pmix/man/man7/pmix.7 | 35 + .../pmix120/pmix/man/man7/pmix_constants.7 | 92 + .../pmix120/pmix/src/buffer_ops/Makefile.am | 36 + .../pmix120/pmix/src/buffer_ops/buffer_ops.h | 323 +++ .../pmix/pmix120/pmix/src/buffer_ops/copy.c | 485 ++++ .../pmix120/pmix/src/buffer_ops/internal.h | 473 ++++ .../pmix/src/buffer_ops/internal_functions.c | 121 + .../pmix120/pmix/src/buffer_ops/open_close.c | 600 +++++ .../pmix/pmix120/pmix/src/buffer_ops/pack.c | 858 ++++++ .../pmix/pmix120/pmix/src/buffer_ops/print.c | 876 ++++++ .../pmix/pmix120/pmix/src/buffer_ops/types.h | 105 + .../pmix/pmix120/pmix/src/buffer_ops/unpack.c | 1112 ++++++++ .../pmix/pmix120/pmix/src/class/Makefile.am | 35 + .../pmix120/pmix/src/class/pmix_hash_table.c | 606 +++++ .../pmix120/pmix/src/class/pmix_hash_table.h | 334 +++ .../pmix/pmix120/pmix/src/class/pmix_list.c | 260 ++ .../pmix/pmix120/pmix/src/class/pmix_list.h | 909 +++++++ .../pmix/pmix120/pmix/src/class/pmix_object.c | 199 ++ .../pmix/pmix120/pmix/src/class/pmix_object.h | 502 ++++ .../pmix/src/class/pmix_pointer_array.c | 331 +++ .../pmix/src/class/pmix_pointer_array.h | 201 ++ .../pmix/pmix120/pmix/src/client/Makefile.am | 27 + opal/mca/pmix/pmix120/pmix/src/client/pmi1.c | 794 ++++++ opal/mca/pmix/pmix120/pmix/src/client/pmi2.c | 716 +++++ .../pmix120/pmix/src/client/pmix_client.c | 1500 +++++++++++ .../pmix/src/client/pmix_client_connect.c | 333 +++ .../pmix/src/client/pmix_client_fence.c | 255 ++ .../pmix120/pmix/src/client/pmix_client_get.c | 500 ++++ .../pmix120/pmix/src/client/pmix_client_ops.h | 48 + .../pmix120/pmix/src/client/pmix_client_pub.c | 517 ++++ .../pmix/src/client/pmix_client_spawn.c | 225 ++ .../pmix/pmix120/pmix/src/common/Makefile.am | 11 + .../pmix120/pmix/src/common/pmix_common.c | 96 + .../pmix/pmix120/pmix/src/include/Makefile.am | 28 + .../pmix120/pmix/src/include/pmix_globals.c | 172 ++ .../pmix120/pmix/src/include/pmix_globals.h | 124 + .../mca/pmix/pmix120/pmix/src/sec/Makefile.am | 32 + .../pmix/pmix120/pmix/src/sec/pmix_munge.c | 145 + .../pmix/pmix120/pmix/src/sec/pmix_munge.h | 23 + .../pmix/pmix120/pmix/src/sec/pmix_native.c | 108 + .../pmix/pmix120/pmix/src/sec/pmix_native.h | 25 + .../mca/pmix/pmix120/pmix/src/sec/pmix_sasl.c | 95 + .../mca/pmix/pmix120/pmix/src/sec/pmix_sasl.h | 25 + opal/mca/pmix/pmix120/pmix/src/sec/pmix_sec.c | 170 ++ opal/mca/pmix/pmix120/pmix/src/sec/pmix_sec.h | 143 + .../pmix/pmix120/pmix/src/server/Makefile.am | 20 + .../pmix120/pmix/src/server/pmix_server.c | 2398 +++++++++++++++++ .../pmix120/pmix/src/server/pmix_server_get.c | 551 ++++ .../pmix/src/server/pmix_server_listener.c | 545 ++++ .../pmix120/pmix/src/server/pmix_server_ops.c | 1264 +++++++++ .../pmix120/pmix/src/server/pmix_server_ops.h | 281 ++ .../pmix/src/server/pmix_server_regex.c | 546 ++++ .../pmix/pmix120/pmix/src/usock/Makefile.am | 17 + opal/mca/pmix/pmix120/pmix/src/usock/usock.c | 342 +++ opal/mca/pmix/pmix120/pmix/src/usock/usock.h | 294 ++ .../pmix120/pmix/src/usock/usock_sendrecv.c | 463 ++++ .../pmix/pmix120/pmix/src/util/Makefile.am | 51 + opal/mca/pmix/pmix120/pmix/src/util/argv.c | 590 ++++ opal/mca/pmix/pmix120/pmix/src/util/argv.h | 306 +++ .../mca/pmix/pmix120/pmix/src/util/basename.c | 139 + .../mca/pmix/pmix120/pmix/src/util/basename.h | 114 + opal/mca/pmix/pmix120/pmix/src/util/crc.c | 1206 +++++++++ opal/mca/pmix/pmix120/pmix/src/util/crc.h | 186 ++ opal/mca/pmix/pmix120/pmix/src/util/error.c | 283 ++ opal/mca/pmix/pmix120/pmix/src/util/error.h | 62 + opal/mca/pmix/pmix120/pmix/src/util/fd.c | 95 + opal/mca/pmix/pmix120/pmix/src/util/fd.h | 72 + opal/mca/pmix/pmix120/pmix/src/util/hash.c | 267 ++ opal/mca/pmix/pmix120/pmix/src/util/hash.h | 47 + opal/mca/pmix/pmix120/pmix/src/util/os_path.c | 106 + opal/mca/pmix/pmix120/pmix/src/util/os_path.h | 78 + opal/mca/pmix/pmix120/pmix/src/util/output.c | 966 +++++++ opal/mca/pmix/pmix120/pmix/src/util/output.h | 561 ++++ .../pmix/pmix120/pmix/src/util/pmix_environ.c | 239 ++ .../pmix/pmix120/pmix/src/util/pmix_environ.h | 150 ++ opal/mca/pmix/pmix120/pmix/src/util/printf.c | 323 +++ opal/mca/pmix/pmix120/pmix/src/util/printf.h | 132 + .../pmix120/pmix/src/util/progress_threads.c | 129 + .../pmix120/pmix/src/util/progress_threads.h | 31 + opal/mca/pmix/pmix120/pmix/src/util/timings.c | 645 +++++ opal/mca/pmix/pmix120/pmix/src/util/timings.h | 421 +++ opal/mca/pmix/pmix120/pmix/test/Makefile.am | 61 + opal/mca/pmix/pmix120/pmix/test/README | 32 + opal/mca/pmix/pmix120/pmix/test/cli_stages.c | 273 ++ opal/mca/pmix/pmix120/pmix/test/cli_stages.h | 75 + opal/mca/pmix/pmix120/pmix/test/pmi2_client.c | 476 ++++ opal/mca/pmix/pmix120/pmix/test/pmi_client.c | 407 +++ opal/mca/pmix/pmix120/pmix/test/pmix_client.c | 205 ++ opal/mca/pmix/pmix120/pmix/test/pmix_regex.c | 90 + opal/mca/pmix/pmix120/pmix/test/pmix_test.c | 193 ++ .../pmix/pmix120/pmix/test/server_callbacks.c | 323 +++ .../pmix/pmix120/pmix/test/server_callbacks.h | 58 + .../pmix/pmix120/pmix/test/simple/Makefile.am | 62 + .../pmix120/pmix/test/simple/simpclient.c | 160 ++ .../pmix120/pmix/test/simple/simpdmodex.c | 210 ++ .../pmix/pmix120/pmix/test/simple/simpdyn.c | 196 ++ .../pmix/pmix120/pmix/test/simple/simpft.c | 128 + .../pmix/pmix120/pmix/test/simple/simppub.c | 167 ++ .../pmix/pmix120/pmix/test/simple/simptest.c | 679 +++++ opal/mca/pmix/pmix120/pmix/test/test_cd.c | 88 + opal/mca/pmix/pmix120/pmix/test/test_cd.h | 17 + opal/mca/pmix/pmix120/pmix/test/test_common.c | 543 ++++ opal/mca/pmix/pmix120/pmix/test/test_common.h | 199 ++ opal/mca/pmix/pmix120/pmix/test/test_error.c | 102 + opal/mca/pmix/pmix120/pmix/test/test_error.h | 16 + opal/mca/pmix/pmix120/pmix/test/test_fence.c | 556 ++++ opal/mca/pmix/pmix120/pmix/test/test_fence.h | 20 + .../mca/pmix/pmix120/pmix/test/test_publish.c | 196 ++ .../mca/pmix/pmix120/pmix/test/test_publish.h | 18 + .../pmix120/pmix/test/test_resolve_peers.c | 125 + .../pmix120/pmix/test/test_resolve_peers.h | 18 + opal/mca/pmix/pmix120/pmix/test/test_spawn.c | 80 + opal/mca/pmix/pmix120/pmix/test/test_spawn.h | 18 + opal/mca/pmix/pmix120/pmix/test/utils.c | 245 ++ opal/mca/pmix/pmix120/pmix/test/utils.h | 22 + opal/mca/pmix/pmix120/pmix120.h | 184 ++ opal/mca/pmix/pmix120/pmix120_client.c | 1245 +++++++++ opal/mca/pmix/pmix120/pmix120_server_north.c | 808 ++++++ opal/mca/pmix/pmix120/pmix120_server_south.c | 383 +++ opal/mca/pmix/pmix120/pmix_pmix120.c | 732 +++++ .../mca/pmix/pmix120/pmix_pmix120_component.c | 109 + opal/mca/pmix/pmix_server.h | 32 +- opal/mca/pmix/pmix_types.h | 32 +- orte/orted/pmix/pmix_server.c | 1 + orte/orted/pmix/pmix_server_gen.c | 17 +- orte/orted/pmix/pmix_server_internal.h | 3 + 208 files changed, 49940 insertions(+), 396 deletions(-) create mode 100644 opal/mca/pmix/pmix120/Makefile.am create mode 100644 opal/mca/pmix/pmix120/autogen.subdirs create mode 100644 opal/mca/pmix/pmix120/configure.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/AUTHORS create mode 100644 opal/mca/pmix/pmix120/pmix/INSTALL create mode 100644 opal/mca/pmix/pmix120/pmix/LICENSE create mode 100644 opal/mca/pmix/pmix120/pmix/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/NEWS create mode 100644 opal/mca/pmix/pmix120/pmix/README create mode 100644 opal/mca/pmix/pmix120/pmix/VERSION create mode 100755 opal/mca/pmix/pmix120/pmix/autogen.sh create mode 100644 opal/mca/pmix/pmix120/pmix/config/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/config/c_get_alignment.m4 create mode 100755 opal/mca/pmix/pmix120/pmix/config/distscript.sh create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_check_attributes.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_check_broken_qsort.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_check_compiler_version.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_check_ident.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_check_munge.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_check_package.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_check_sasl.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_check_vendor.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_check_visibility.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_ensure_contains_optflags.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_functions.m4 create mode 100755 opal/mca/pmix/pmix120/pmix/config/pmix_get_version.sh create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_load_platform.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_search_libs.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_setup_cc.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_setup_hwloc.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/config/pmix_setup_libevent.m4 create mode 100644 opal/mca/pmix/pmix120/pmix/configure.ac create mode 100644 opal/mca/pmix/pmix120/pmix/contrib/platform/optimized create mode 100644 opal/mca/pmix/pmix120/pmix/contrib/pmix-valgrind.supp create mode 100644 opal/mca/pmix/pmix120/pmix/examples/client.c create mode 100644 opal/mca/pmix/pmix120/pmix/examples/dmodex.c create mode 100644 opal/mca/pmix/pmix120/pmix/examples/dynamic.c create mode 100644 opal/mca/pmix/pmix120/pmix/examples/fault.c create mode 100644 opal/mca/pmix/pmix120/pmix/examples/pub.c create mode 100644 opal/mca/pmix/pmix120/pmix/include/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/include/pmi.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/pmi2.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/pmix.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/pmix/autogen/config.h.in create mode 100644 opal/mca/pmix/pmix120/pmix/include/pmix/autogen/pmix_config_bottom.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/pmix/autogen/pmix_config_top.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/pmix/pmix_common.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/pmix/rename.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/pmix_server.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/private/align.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/private/autogen/README.txt create mode 100644 opal/mca/pmix/pmix120/pmix/include/private/hash_string.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/private/pmix_socket_errno.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/private/pmix_stdint.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/private/prefetch.h create mode 100644 opal/mca/pmix/pmix120/pmix/include/private/types.h create mode 100644 opal/mca/pmix/pmix120/pmix/man/man3/pmix_abort.3 create mode 100644 opal/mca/pmix/pmix120/pmix/man/man3/pmix_commit.3 create mode 100644 opal/mca/pmix/pmix120/pmix/man/man3/pmix_finalize.3 create mode 100644 opal/mca/pmix/pmix120/pmix/man/man3/pmix_init.3 create mode 100644 opal/mca/pmix/pmix120/pmix/man/man3/pmix_initialized.3 create mode 100644 opal/mca/pmix/pmix120/pmix/man/man3/pmix_put.3 create mode 100644 opal/mca/pmix/pmix120/pmix/man/man7/pmix.7 create mode 100644 opal/mca/pmix/pmix120/pmix/man/man7/pmix_constants.7 create mode 100644 opal/mca/pmix/pmix120/pmix/src/buffer_ops/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/src/buffer_ops/buffer_ops.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/buffer_ops/copy.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/buffer_ops/internal.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/buffer_ops/internal_functions.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/buffer_ops/open_close.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/buffer_ops/pack.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/buffer_ops/print.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/buffer_ops/types.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/buffer_ops/unpack.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/class/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/src/class/pmix_hash_table.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/class/pmix_hash_table.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/class/pmix_list.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/class/pmix_list.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/class/pmix_object.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/class/pmix_object.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/class/pmix_pointer_array.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/class/pmix_pointer_array.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/client/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/src/client/pmi1.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/client/pmi2.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/client/pmix_client.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/client/pmix_client_connect.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/client/pmix_client_fence.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/client/pmix_client_get.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/client/pmix_client_ops.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/client/pmix_client_pub.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/client/pmix_client_spawn.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/common/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/src/common/pmix_common.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/include/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/src/include/pmix_globals.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/include/pmix_globals.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/sec/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/src/sec/pmix_munge.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/sec/pmix_munge.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/sec/pmix_native.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/sec/pmix_native.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/sec/pmix_sasl.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/sec/pmix_sasl.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/sec/pmix_sec.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/sec/pmix_sec.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/server/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/src/server/pmix_server.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/server/pmix_server_get.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/server/pmix_server_listener.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/server/pmix_server_ops.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/server/pmix_server_ops.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/server/pmix_server_regex.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/usock/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/src/usock/usock.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/usock/usock.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/usock/usock_sendrecv.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/argv.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/argv.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/basename.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/basename.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/crc.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/crc.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/error.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/error.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/fd.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/fd.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/hash.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/hash.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/os_path.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/os_path.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/output.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/output.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/pmix_environ.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/pmix_environ.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/printf.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/printf.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/progress_threads.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/progress_threads.h create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/timings.c create mode 100644 opal/mca/pmix/pmix120/pmix/src/util/timings.h create mode 100644 opal/mca/pmix/pmix120/pmix/test/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/test/README create mode 100644 opal/mca/pmix/pmix120/pmix/test/cli_stages.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/cli_stages.h create mode 100644 opal/mca/pmix/pmix120/pmix/test/pmi2_client.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/pmi_client.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/pmix_client.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/pmix_regex.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/pmix_test.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/server_callbacks.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/server_callbacks.h create mode 100644 opal/mca/pmix/pmix120/pmix/test/simple/Makefile.am create mode 100644 opal/mca/pmix/pmix120/pmix/test/simple/simpclient.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/simple/simpdmodex.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/simple/simpdyn.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/simple/simpft.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/simple/simppub.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/simple/simptest.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_cd.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_cd.h create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_common.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_common.h create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_error.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_error.h create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_fence.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_fence.h create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_publish.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_publish.h create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_resolve_peers.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_resolve_peers.h create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_spawn.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/test_spawn.h create mode 100644 opal/mca/pmix/pmix120/pmix/test/utils.c create mode 100644 opal/mca/pmix/pmix120/pmix/test/utils.h create mode 100644 opal/mca/pmix/pmix120/pmix120.h create mode 100644 opal/mca/pmix/pmix120/pmix120_client.c create mode 100644 opal/mca/pmix/pmix120/pmix120_server_north.c create mode 100644 opal/mca/pmix/pmix120/pmix120_server_south.c create mode 100644 opal/mca/pmix/pmix120/pmix_pmix120.c create mode 100644 opal/mca/pmix/pmix120/pmix_pmix120_component.c diff --git a/.gitignore b/.gitignore index ad55360cc1..c7b9c01388 100644 --- a/.gitignore +++ b/.gitignore @@ -303,6 +303,10 @@ opal/mca/installdirs/config/install_dirs.h opal/mca/pmix/pmix112/pmix/include/pmix/autogen/config.h opal/mca/pmix/pmix112/pmix/include/private/autogen/config.h opal/mca/pmix/pmix112/pmix/include/private/autogen/config.h.in +opal/mca/pmix/pmix120/pmix/include/pmix/autogen/config.h +opal/mca/pmix/pmix120/pmix/include/private/autogen/config.h +opal/mca/pmix/pmix120/pmix/include/private/autogen/config.h.in + opal/tools/opal-checkpoint/opal-checkpoint opal/tools/opal-checkpoint/opal-checkpoint.1 diff --git a/ompi/errhandler/errhandler.c b/ompi/errhandler/errhandler.c index d7fee7be54..5c832cc597 100644 --- a/ompi/errhandler/errhandler.c +++ b/ompi/errhandler/errhandler.c @@ -14,6 +14,7 @@ * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -30,6 +31,7 @@ #include "ompi/errhandler/errhandler.h" #include "ompi/errhandler/errhandler_predefined.h" #include "opal/class/opal_pointer_array.h" +#include "opal/mca/pmix/pmix.h" /* @@ -37,6 +39,10 @@ */ opal_pointer_array_t ompi_errhandler_f_to_c_table = {{0}}; +/* + * default errhandler id + */ +static int default_errhandler_id = -1; /* * Class information @@ -157,6 +163,7 @@ int ompi_errhandler_finalize(void) /* JMS Add stuff here checking for unreleased errorhandlers, similar to communicators, info handles, etc. */ + opal_pmix.deregister_errhandler(default_errhandler_id, NULL, NULL); /* Remove errhandler F2C table */ @@ -169,7 +176,7 @@ int ompi_errhandler_finalize(void) ompi_errhandler_t *ompi_errhandler_create(ompi_errhandler_type_t object_type, - ompi_errhandler_generic_handler_fn_t *func, + ompi_errhandler_generic_handler_fn_t *func, ompi_errhandler_lang_t lang) { ompi_errhandler_t *new_errhandler; @@ -213,20 +220,33 @@ ompi_errhandler_t *ompi_errhandler_create(ompi_errhandler_type_t object_type, return new_errhandler; } +/* registration callback */ +void ompi_errhandler_registration_callback(int status, + int errhandler_ref, + void *cbdata) +{ + ompi_errhandler_errtrk_t *errtrk = (ompi_errhandler_errtrk_t*)cbdata; + + default_errhandler_id = errhandler_ref; + errtrk->status = status; + errtrk->active = false; +} + /** - * Default runtime errhandler callback + * Default errhandler callback */ -int ompi_errhandler_runtime_callback(opal_pointer_array_t *errors) { - ompi_rte_error_report_t *err; - int errcode = 1; - - if (NULL != errors && - (NULL != (err = (ompi_rte_error_report_t*)opal_pointer_array_get_item(errors, 0)))) { - errcode = err->errcode; +void ompi_errhandler_callback(int status, + opal_list_t *procs, + opal_list_t *info, + opal_pmix_release_cbfunc_t cbfunc, + void *cbdata) +{ + /* allow the caller to release its data */ + if (NULL != cbfunc) { + cbfunc(cbdata); } - - ompi_mpi_abort(MPI_COMM_WORLD, errcode); - return OMPI_SUCCESS; + /* our default action is to abort */ + ompi_mpi_abort(MPI_COMM_WORLD, status); } /************************************************************************** diff --git a/ompi/errhandler/errhandler.h b/ompi/errhandler/errhandler.h index 647836cd67..0063b6541b 100644 --- a/ompi/errhandler/errhandler.h +++ b/ompi/errhandler/errhandler.h @@ -12,6 +12,7 @@ * All rights reserved. * Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -30,6 +31,7 @@ #include "opal/prefetch.h" #include "opal/class/opal_object.h" #include "opal/class/opal_pointer_array.h" +#include "opal/mca/pmix/pmix.h" #include "ompi/mca/rte/rte.h" #include "ompi/runtime/mpiruntime.h" @@ -364,29 +366,28 @@ struct ompi_request_t; ompi_errhandler_lang_t language); /** - * Callback function from runtime layer to alert the MPI layer of an error at - * the runtime layer. - * - * @param errors A pointer array containing structs of type - * ompi_rte_error_report_t that consists of at least - * { - * ompi_process_name_t proc; - * int errcode; - * } - * Each RTE is allowed to add additional information - * as required + * Callback function to alert the MPI layer of an error or notification + * from the internal RTE and/or the resource manager. * * This function is used to alert the MPI layer to a specific fault detected by the - * runtime layer. This could be a process failure, a lost connection, or the inability + * runtime layer or host RM. This could be a process failure, a lost connection, or the inability * to send an OOB message. The MPI layer has the option to perform whatever actions it * needs to stabilize itself and continue running, abort, etc. - * - * Upon completion, the error handler should return OMPI_SUCCESS if the error has - * been resolved and no further callbacks are to be executed. Return of any other - * value will cause the RTE to continue executing error callbacks. */ -OMPI_DECLSPEC int ompi_errhandler_runtime_callback(opal_pointer_array_t *errors); +typedef struct { + volatile bool active; + int status; +} ompi_errhandler_errtrk_t; +OMPI_DECLSPEC void ompi_errhandler_callback(int status, + opal_list_t *procs, + opal_list_t *info, + opal_pmix_release_cbfunc_t cbfunc, + void *cbdata); + +OMPI_DECLSPEC void ompi_errhandler_registration_callback(int status, + int errhandler_ref, + void *cbdata); /** * Check to see if an errhandler is intrinsic. * diff --git a/ompi/mca/rte/orte/rte_orte.h b/ompi/mca/rte/orte/rte_orte.h index a5796276ba..0a4efaa7c0 100644 --- a/ompi/mca/rte/orte/rte_orte.h +++ b/ompi/mca/rte/orte/rte_orte.h @@ -5,6 +5,7 @@ * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -83,12 +84,6 @@ typedef orte_local_rank_t ompi_local_rank_t; OMPI_DECLSPEC void __opal_attribute_noreturn__ ompi_rte_abort(int error_code, char *fmt, ...); #define ompi_rte_abort_peers(a, b, c) orte_errmgr.abort_peers(a, b, c) -#define OMPI_RTE_ERRHANDLER_FIRST ORTE_ERRMGR_CALLBACK_FIRST -#define OMPI_RTE_ERRHANDLER_LAST ORTE_ERRMGR_CALLBACK_LAST -#define OMPI_RTE_ERRHANDLER_PREPEND ORTE_ERRMGR_CALLBACK_PREPEND -#define OMPI_RTE_ERRHANDLER_APPEND ORTE_ERRMGR_CALLBACK_APPEND -typedef orte_error_t ompi_rte_error_report_t; -#define ompi_rte_register_errhandler(a, b) orte_errmgr.register_error_callback(a, b) #define OMPI_ERROR_LOG ORTE_ERROR_LOG /* Init and finalize objects and operations */ diff --git a/ompi/mca/rte/rte.h b/ompi/mca/rte/rte.h index bc14cbc476..6929f95734 100644 --- a/ompi/mca/rte/rte.h +++ b/ompi/mca/rte/rte.h @@ -3,7 +3,7 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights reserved. * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2014 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. * * $COPYRIGHT$ * @@ -111,8 +111,6 @@ * 2. int ompi_rte_abort_peers(ompi_process_name_t *procs, size_t nprocs) - * Abort the specified list of peers * 3. OMPI_ERROR_LOG(rc) - print error message regarding the given return code - * 4. ompi_rte_register_errhandler - register a callback function for the RTE - * to report asynchronous errors to the caller * * (e) Init and finalize objects and operations * 1. ompi_rte_init - a function to initialize the RTE. The function diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index d0eebb29df..44540d84a7 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -378,6 +378,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) size_t nprocs; char *error = NULL; char *cmd=NULL, *av=NULL; + ompi_errhandler_errtrk_t errtrk; OPAL_TIMING_DECLARE(tm); OPAL_TIMING_INIT_EXT(&tm, OPAL_TIMING_GET_TIME_OF_DAY); @@ -504,11 +505,18 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) } } - /* Register the default errhandler callback - RTE will ignore if it - * doesn't support this capability - */ - ompi_rte_register_errhandler(ompi_errhandler_runtime_callback, - OMPI_RTE_ERRHANDLER_LAST); + /* Register the default errhandler callback */ + errtrk.status = OPAL_ERROR; + errtrk.active = true; + opal_pmix.register_errhandler(NULL, ompi_errhandler_callback, + ompi_errhandler_registration_callback, + (void*)&errtrk); + OMPI_WAIT_FOR_COMPLETION(errtrk.active); + if (OPAL_SUCCESS != errtrk.status) { + error = "Error handler registration"; + ret = errtrk.status; + goto error; + } /* Figure out the final MPI thread levels. If we were not compiled for support for MPI threads, then don't allow diff --git a/opal/mca/pmix/base/base.h b/opal/mca/pmix/base/base.h index 6aaf308c4a..1551f8eb4d 100644 --- a/opal/mca/pmix/base/base.h +++ b/opal/mca/pmix/base/base.h @@ -32,11 +32,17 @@ OPAL_DECLSPEC int opal_pmix_base_select(void); OPAL_DECLSPEC extern bool opal_pmix_base_allow_delayed_server; -OPAL_DECLSPEC void opal_pmix_base_register_handler(opal_pmix_errhandler_fn_t err); -OPAL_DECLSPEC void opal_pmix_base_deregister_handler(void); +OPAL_DECLSPEC void opal_pmix_base_register_handler(opal_list_t *info, + opal_pmix_notification_fn_t errhandler, + opal_pmix_errhandler_reg_cbfunc_t cbfunc, + void *cbdata); +OPAL_DECLSPEC void opal_pmix_base_deregister_handler(int errhandler, + opal_pmix_op_cbfunc_t cbfunc, + void *cbdata); OPAL_DECLSPEC void opal_pmix_base_errhandler(int status, opal_list_t *procs, - opal_list_t *info); + opal_list_t *info, + opal_pmix_release_cbfunc_t cbfunc, void *cbdata); OPAL_DECLSPEC int opal_pmix_base_exchange(opal_value_t *info, opal_pmix_pdata_t *pdat, int timeout); diff --git a/opal/mca/pmix/base/pmix_base_fns.c b/opal/mca/pmix/base/pmix_base_fns.c index 48a366b3c7..9ffba7b33b 100644 --- a/opal/mca/pmix/base/pmix_base_fns.c +++ b/opal/mca/pmix/base/pmix_base_fns.c @@ -38,26 +38,40 @@ #define OPAL_PMI_PAD 10 -/******** ERRHANDLER SUPPORT ********/ -static opal_pmix_errhandler_fn_t errhandler = NULL; +/******** ERRHANDLER SUPPORT FOR COMPONENTS THAT + ******** DO NOT NATIVELY SUPPORT IT + ********/ +static opal_pmix_notification_fn_t errhandler = NULL; -void opal_pmix_base_register_handler(opal_pmix_errhandler_fn_t err) +void opal_pmix_base_register_handler(opal_list_t *info, + opal_pmix_notification_fn_t err, + opal_pmix_errhandler_reg_cbfunc_t cbfunc, + void *cbdata) { errhandler = err; + if (NULL != cbfunc) { + cbfunc(OPAL_SUCCESS, 0, cbdata); + } } void opal_pmix_base_errhandler(int status, opal_list_t *procs, - opal_list_t *info) + opal_list_t *info, + opal_pmix_release_cbfunc_t cbfunc, void *cbdata) { if (NULL != errhandler) { - errhandler(status); + errhandler(status, procs, info, cbfunc, cbdata); } } -void opal_pmix_base_deregister_handler(void) +void opal_pmix_base_deregister_handler(int errid, + opal_pmix_op_cbfunc_t cbfunc, + void *cbdata) { errhandler = NULL; + if (NULL != cbfunc) { + cbfunc(OPAL_SUCCESS, cbdata); + } } struct lookup_caddy_t { diff --git a/opal/mca/pmix/external/pmix_ext_client.c b/opal/mca/pmix/external/pmix_ext_client.c index 80ab1b5952..fb4fd6fcb7 100644 --- a/opal/mca/pmix/external/pmix_ext_client.c +++ b/opal/mca/pmix/external/pmix_ext_client.c @@ -77,7 +77,7 @@ static void myerr(pmix_status_t status, iptr = OBJ_NEW(opal_value_t); iptr->key = strdup(info[n].key); pmix1_value_unload(iptr, &info[n].value); - opal_list_append(&plist, &nm->super); + opal_list_append(&plist, &iptr->super); } /* call the base errhandler */ diff --git a/opal/mca/pmix/external/pmix_ext_server_south.c b/opal/mca/pmix/external/pmix_ext_server_south.c index f7346ed14f..2462ec4a23 100644 --- a/opal/mca/pmix/external/pmix_ext_server_south.c +++ b/opal/mca/pmix/external/pmix_ext_server_south.c @@ -91,7 +91,7 @@ static void myerr(pmix_status_t status, iptr = OBJ_NEW(opal_value_t); iptr->key = strdup(info[n].key); pmix1_value_unload(iptr, &info[n].value); - opal_list_append(&plist, &nm->super); + opal_list_append(&plist, &iptr->super); } /* call the base errhandler */ diff --git a/opal/mca/pmix/pmix.h b/opal/mca/pmix/pmix.h index 64c7895d59..faf65c6578 100644 --- a/opal/mca/pmix/pmix.h +++ b/opal/mca/pmix/pmix.h @@ -280,10 +280,6 @@ extern int opal_pmix_base_exchange(opal_value_t *info, } while(0); -/* callback handler for errors */ -typedef void (*opal_pmix_errhandler_fn_t)(int error); - - /************************************************************ * CLIENT APIs * ************************************************************/ @@ -690,17 +686,6 @@ typedef int (*opal_pmix_base_module_server_dmodex_request_fn_t)(const opal_proce * The info array contains any further info the RM can and/or chooses * to provide. * - * If the payload and size parameters are non-NULL, then the function - * will assume that the caller intends to send the message itself. In - * this situation, the convenience library will simply pack the message - * for transmission, and return the payload and size in the provided - * variables (external comm should have been indicated during server_init). - * The caller will be responsible for thread protection. - * - * Otherwise, the convenience library will transmit the message to - * the identified target processes, and the function call will be - * internally thread protected. - * * The callback function will be called upon completion of the * notify_error function's actions. Note that any messages will * have been queued, but may not have been transmitted by this @@ -720,11 +705,92 @@ typedef int (*opal_pmix_base_module_server_notify_error_fn_t)(int status, /* get the version of the embedded library */ typedef const char* (*opal_pmix_base_module_get_version_fn_t)(void); -/* register an errhandler to report loss of connection to the server */ -typedef void (*opal_pmix_base_module_register_fn_t)(opal_pmix_errhandler_fn_t errhandler); +/* Register an errhandler to report errors. Three types of errors + * can be reported: + * + * (a) those that occur within the client library, but are not + * reportable via the API itself (e.g., loss of connection to + * the server). These errors typically occur during behind-the-scenes + * non-blocking operations. + * + * (b) job-related errors such as the failure of another process in + * the job or in any connected job, impending failure of hardware + * within the job's usage footprint, etc. + * + * (c) system notifications that are made available by the local + * administrators + * + * By default, only errors that directly affect the process and/or + * any process to which it is connected (via the PMIx_Connect call) + * will be reported. Options to modify that behavior can be provided + * in the info array + * + * Both the client application and the resource manager can register + * err handlers for specific errors. PMIx client/server calls the registered + * err handler upon receiving error notify notification (via PMIx_Notify_error) + * from the other end (Resource Manager/Client application). + * + * Multiple err handlers can be registered for different errors. PMIX returns + * an integer reference to each register handler in the callback fn. The caller + * must retain the reference in order to deregister the errhandler. + * Modification of the notification behavior can be accomplished by + * deregistering the current errhandler, and then registering it + * using a new set of info values. + * + * See pmix_types.h for a description of the notification function */ +typedef void (*opal_pmix_base_module_register_fn_t)(opal_list_t *info, + opal_pmix_notification_fn_t errhandler, + opal_pmix_errhandler_reg_cbfunc_t cbfunc, + void *cbdata); -/* deregister the errhandler */ -typedef void (*opal_pmix_base_module_deregister_fn_t)(void); +/* deregister the errhandler + * errhandler_ref is the reference returned by PMIx for the errhandler + * to pmix_errhandler_reg_cbfunc_t */ +typedef void (*opal_pmix_base_module_deregister_fn_t)(int errhandler, + opal_pmix_op_cbfunc_t cbfunc, + void *cbdata); + +/* Report an error to a process for notification via any + * registered errhandler. The errhandler registration can be + * called by both the server and the client application. On the + * server side, the errhandler is used to report errors detected + * by PMIx to the host server for handling. On the client side, + * the errhandler is used to notify the process of errors + * reported by the server - e.g., the failure of another process. + * + * This function allows the host server to direct the server + * convenience library to notify all indicated local procs of + * an error. The error can be local, or anywhere in the cluster. + * The status indicates the error being reported. + * + * The client application can also call this function to notify the + * resource manager of an error it encountered. It can request the host + * server to notify the indicated processes about the error. + * + * The first array of procs informs the server library as to which + * processes should be alerted - e.g., the processes that are in + * a directly-affected job or are connected to one that is affected. + * Passing a NULL for this array will indicate that all local procs + * are to be notified. + * + * The second array identifies the processes that will be impacted + * by the error. This could consist of a single process, or a number + * of processes. + * + * The info array contains any further info the RM can and/or chooses + * to provide. + * + * The callback function will be called upon completion of the + * notify_error function's actions. Note that any messages will + * have been queued, but may not have been transmitted by this + * time. Note that the caller is required to maintain the input + * data until the callback function has been executed! +*/ +typedef int (*opal_pmix_base_module_notify_error_fn_t)(int status, + opal_list_t *procs, + opal_list_t *error_procs, + opal_list_t *info, + opal_pmix_op_cbfunc_t cbfunc, void *cbdata); /* store data internally, but don't push it out to be shared - this is * intended solely for storage of info on other procs that comes thru @@ -784,6 +850,7 @@ typedef struct { opal_pmix_base_module_get_version_fn_t get_version; opal_pmix_base_module_register_fn_t register_errhandler; opal_pmix_base_module_deregister_fn_t deregister_errhandler; + opal_pmix_base_module_notify_error_fn_t notify_error; opal_pmix_base_module_store_fn_t store_local; opal_pmix_base_module_get_nspace_fn_t get_nspace; opal_pmix_base_module_register_jobid_fn_t register_jobid; diff --git a/opal/mca/pmix/pmix112/pmix/Makefile.am b/opal/mca/pmix/pmix112/pmix/Makefile.am index 300990693c..bd678a59df 100644 --- a/opal/mca/pmix/pmix112/pmix/Makefile.am +++ b/opal/mca/pmix/pmix112/pmix/Makefile.am @@ -57,10 +57,16 @@ include src/server/Makefile.am include src/sec/Makefile.am include src/common/Makefile.am +if PMIX_EMBEDDED_MODE +noinst_LTLIBRARIES = libpmix.la +libpmix_la_SOURCES = $(headers) $(sources) +libpmix_la_LDFLAGS = +else lib_LTLIBRARIES = libpmix.la - libpmix_la_SOURCES = $(headers) $(sources) libpmix_la_LDFLAGS = -version-info $(libpmix_so_version) +endif + if ! PMIX_EMBEDDED_MODE SUBDIRS = . test diff --git a/opal/mca/pmix/pmix112/pmix/include/pmix/rename.h b/opal/mca/pmix/pmix112/pmix/include/pmix/rename.h index 195d143529..f5ecc8f47b 100644 --- a/opal/mca/pmix/pmix112/pmix/include/pmix/rename.h +++ b/opal/mca/pmix/pmix112/pmix/include/pmix/rename.h @@ -38,255 +38,382 @@ BEGIN_C_DECLS name under the covers. */ /* PMIx APIs */ -#define PMIx_Abort PMIX_NAME_CAPS(Abort) -#define PMIx_Commit PMIX_NAME_CAPS(Commit) -#define PMIx_Connect PMIX_NAME_CAPS(Connect) -#define PMIx_Connect_nb PMIX_NAME_CAPS(Connect_nb) -#define PMIx_Deregister_errhandler PMIX_NAME_CAPS(Deregister_errhandler) -#define PMIx_Disconnect PMIX_NAME_CAPS(Disconnect) -#define PMIx_Disconnect_nb PMIX_NAME_CAPS(Disconnect_nb) -#define PMIx_Error_string PMIX_NAME_CAPS(Error_string) -#define PMIx_Fence PMIX_NAME_CAPS(Fence) -#define PMIx_Fence_nb PMIX_NAME_CAPS(Fence_nb) -#define PMIx_Finalize PMIX_NAME_CAPS(Finalize) -#define PMIx_Get PMIX_NAME_CAPS(Get) -#define PMIx_Get_nb PMIX_NAME_CAPS(Get_nb) -#define PMIx_Get_version PMIX_NAME_CAPS(Get_version) -#define PMIx_Init PMIX_NAME_CAPS(Init) -#define PMIx_Initialized PMIX_NAME_CAPS(Initialized) -#define PMIx_Lookup PMIX_NAME_CAPS(Lookup) -#define PMIx_Lookup_nb PMIX_NAME_CAPS(Lookup_nb) -#define PMIx_Publish PMIX_NAME_CAPS(Publish) -#define PMIx_Publish_nb PMIX_NAME_CAPS(Publish_nb) -#define PMIx_Put PMIX_NAME_CAPS(Put) -#define PMIx_Register_errhandler PMIX_NAME_CAPS(Register_errhandler) -#define PMIx_Resolve_nodes PMIX_NAME_CAPS(Resolve_nodes) -#define PMIx_Resolve_peers PMIX_NAME_CAPS(Resolve_peers) -#define PMIx_Spawn PMIX_NAME_CAPS(Spawn) -#define PMIx_Spawn_nb PMIX_NAME_CAPS(Spawn_nb) -#define PMIx_Unpublish PMIX_NAME_CAPS(Unpublish) -#define PMIx_Unpublish_nb PMIX_NAME_CAPS(Unpublish_nb) +#define PMI2_Abort PMIX_NAME_CAPS(PMI2_Abort) +#define PMI2_Finalize PMIX_NAME_CAPS(PMI2_Finalize) +#define PMI2_Info_GetJobAttr PMIX_NAME_CAPS(PMI2_Info_GetJobAttr) +#define PMI2_Info_GetJobAttrIntArray PMIX_NAME_CAPS(PMI2_Info_GetJobAttrIntArray) +#define PMI2_Info_GetNodeAttr PMIX_NAME_CAPS(PMI2_Info_GetNodeAttr) +#define PMI2_Info_GetSize PMIX_NAME_CAPS(PMI2_Info_GetSize) +#define PMI2_Info_PutNodeAttr PMIX_NAME_CAPS(PMI2_Info_PutNodeAttr) +#define PMI2_Init PMIX_NAME_CAPS(PMI2_Init) +#define PMI2_Initialized PMIX_NAME_CAPS(PMI2_Initialized) +#define PMI2_Job_Connect PMIX_NAME_CAPS(PMI2_Job_Connect) +#define PMI2_Job_Disconnect PMIX_NAME_CAPS(PMI2_Job_Disconnect) +#define PMI2_Job_GetId PMIX_NAME_CAPS(PMI2_Job_GetId) +#define PMI2_Job_GetRank PMIX_NAME_CAPS(PMI2_Job_GetRank) +#define PMI2_Job_Spawn PMIX_NAME_CAPS(PMI2_Job_Spawn) +#define PMI2_KVS_Fence PMIX_NAME_CAPS(PMI2_KVS_Fence) +#define PMI2_KVS_Get PMIX_NAME_CAPS(PMI2_KVS_Get) +#define PMI2_KVS_Put PMIX_NAME_CAPS(PMI2_KVS_Put) +#define PMI2_Nameserv_lookup PMIX_NAME_CAPS(PMI2_Nameserv_lookup) +#define PMI2_Nameserv_publish PMIX_NAME_CAPS(PMI2_Nameserv_publish) +#define PMI2_Nameserv_unpublish PMIX_NAME_CAPS(PMI2_Nameserv_unpublish) +#define PMI_Abort PMIX_NAME_CAPS(PMI_Abort) +#define PMI_Args_to_keyval PMIX_NAME_CAPS(PMI_Args_to_keyval) +#define PMI_Barrier PMIX_NAME_CAPS(PMI_Barrier) +#define PMI_Finalize PMIX_NAME_CAPS(PMI_Finalize) +#define PMI_Free_keyvals PMIX_NAME_CAPS(PMI_Free_keyvals) +#define PMI_Get_appnum PMIX_NAME_CAPS(PMI_Get_appnum) +#define PMI_Get_clique_ranks PMIX_NAME_CAPS(PMI_Get_clique_ranks) +#define PMI_Get_clique_size PMIX_NAME_CAPS(PMI_Get_clique_size) +#define PMI_Get_id PMIX_NAME_CAPS(PMI_Get_id) +#define PMI_Get_id_length_max PMIX_NAME_CAPS(PMI_Get_id_length_max) +#define PMI_Get_kvs_domain_id PMIX_NAME_CAPS(PMI_Get_kvs_domain_id) +#define PMI_Get_options PMIX_NAME_CAPS(PMI_Get_options) +#define PMI_Get_rank PMIX_NAME_CAPS(PMI_Get_rank) +#define PMI_Get_size PMIX_NAME_CAPS(PMI_Get_size) +#define PMI_Get_universe_size PMIX_NAME_CAPS(PMI_Get_universe_size) +#define PMI_Init PMIX_NAME_CAPS(PMI_Init) +#define PMI_Initialized PMIX_NAME_CAPS(PMI_Initialized) +#define PMI_KVS_Commit PMIX_NAME_CAPS(PMI_KVS_Commit) +#define PMI_KVS_Create PMIX_NAME_CAPS(PMI_KVS_Create) +#define PMI_KVS_Destroy PMIX_NAME_CAPS(PMI_KVS_Destroy) +#define PMI_KVS_Get PMIX_NAME_CAPS(PMI_KVS_Get) +#define PMI_KVS_Get_key_length_max PMIX_NAME_CAPS(PMI_KVS_Get_key_length_max) +#define PMI_KVS_Get_my_name PMIX_NAME_CAPS(PMI_KVS_Get_my_name) +#define PMI_KVS_Get_name_length_max PMIX_NAME_CAPS(PMI_KVS_Get_name_length_max) +#define PMI_KVS_Get_value_length_max PMIX_NAME_CAPS(PMI_KVS_Get_value_length_max) +#define PMI_KVS_Iter_first PMIX_NAME_CAPS(PMI_KVS_Iter_first) +#define PMI_KVS_Iter_next PMIX_NAME_CAPS(PMI_KVS_Iter_next) +#define PMI_KVS_Put PMIX_NAME_CAPS(PMI_KVS_Put) +#define PMI_Lookup_name PMIX_NAME_CAPS(PMI_Lookup_name) +#define PMI_Parse_option PMIX_NAME_CAPS(PMI_Parse_option) +#define PMI_Publish_name PMIX_NAME_CAPS(PMI_Publish_name) +#define PMI_Spawn_multiple PMIX_NAME_CAPS(PMI_Spawn_multiple) +#define PMI_Unpublish_name PMIX_NAME_CAPS(PMI_Unpublish_name) +#define PMIx_Abort PMIX_NAME_CAPS(Abort) +#define PMIx_Commit PMIX_NAME_CAPS(Commit) +#define PMIx_Connect PMIX_NAME_CAPS(Connect) +#define PMIx_Connect_nb PMIX_NAME_CAPS(Connect_nb) +#define PMIx_Deregister_errhandler PMIX_NAME_CAPS(Deregister_errhandler) +#define PMIx_Disconnect PMIX_NAME_CAPS(Disconnect) +#define PMIx_Disconnect_nb PMIX_NAME_CAPS(Disconnect_nb) +#define PMIx_Error_string PMIX_NAME_CAPS(Error_string) +#define PMIx_Fence PMIX_NAME_CAPS(Fence) +#define PMIx_Fence_nb PMIX_NAME_CAPS(Fence_nb) +#define PMIx_Finalize PMIX_NAME_CAPS(Finalize) +#define PMIx_Get PMIX_NAME_CAPS(Get) +#define PMIx_Get_nb PMIX_NAME_CAPS(Get_nb) +#define PMIx_Get_version PMIX_NAME_CAPS(Get_version) +#define PMIx_Init PMIX_NAME_CAPS(Init) +#define PMIx_Initialized PMIX_NAME_CAPS(Initialized) +#define PMIx_Lookup PMIX_NAME_CAPS(Lookup) +#define PMIx_Lookup_nb PMIX_NAME_CAPS(Lookup_nb) +#define PMIx_Notify_error PMIX_NAME_CAPS(Notify_error) +#define PMIx_Publish PMIX_NAME_CAPS(Publish) +#define PMIx_Publish_nb PMIX_NAME_CAPS(Publish_nb) +#define PMIx_Put PMIX_NAME_CAPS(Put) +#define PMIx_Register_errhandler PMIX_NAME_CAPS(Register_errhandler) +#define PMIx_Resolve_nodes PMIX_NAME_CAPS(Resolve_nodes) +#define PMIx_Resolve_peers PMIX_NAME_CAPS(Resolve_peers) +#define PMIx_Spawn PMIX_NAME_CAPS(Spawn) +#define PMIx_Spawn_nb PMIX_NAME_CAPS(Spawn_nb) +#define PMIx_Store_internal PMIX_NAME_CAPS(Store_internal) +#define PMIx_Unpublish PMIX_NAME_CAPS(Unpublish) +#define PMIx_Unpublish_nb PMIX_NAME_CAPS(Unpublish_nb) +#define PMIx_generate_ppn PMIX_NAME_CAPS(generate_ppn) +#define PMIx_generate_regex PMIX_NAME_CAPS(generate_regex) +#define PMIx_server_deregister_client PMIX_NAME_CAPS(server_deregister_client) +#define PMIx_server_deregister_nspace PMIX_NAME_CAPS(server_deregister_nspace) +#define PMIx_server_dmodex_request PMIX_NAME_CAPS(server_dmodex_request) +#define PMIx_server_finalize PMIX_NAME_CAPS(server_finalize) +#define PMIx_server_init PMIX_NAME_CAPS(server_init) +#define PMIx_server_register_client PMIX_NAME_CAPS(server_register_client) +#define PMIx_server_register_nspace PMIX_NAME_CAPS(server_register_nspace) +#define PMIx_server_setup_fork PMIX_NAME_CAPS(server_setup_fork) - -/* internal client functions */ -#define pmix_client_process_nspace_blob PMIX_NAME(client_process_nspace_blob) - - -/* src/util directory */ -#define pmix_argv_append PMIX_NAME(argv_append) -#define pmix_argv_append_nosize PMIX_NAME(argv_append_nosize) -#define pmix_argv_append_unique_nosize PMIX_NAME(argv_append_unique_nosize) -#define pmix_argv_copy PMIX_NAME(argv_copy) -#define pmix_argv_count PMIX_NAME(argv_count) -#define pmix_argv_delete PMIX_NAME(argv_delete) -#define pmix_argv_free PMIX_NAME(argv_free) -#define pmix_argv_insert PMIX_NAME(argv_insert) -#define pmix_argv_insert_element PMIX_NAME(argv_insert_element) -#define pmix_argv_join PMIX_NAME(argv_join) -#define pmix_argv_join_range PMIX_NAME(argv_join_range) -#define pmix_argv_len PMIX_NAME(argv_len) -#define pmix_argv_prepend_nosize PMIX_NAME(argv_prepend_nosize) -#define pmix_argv_split PMIX_NAME(argv_split) -#define pmix_argv_split_with_empty PMIX_NAME(argv_split_with_empty) -#define pmix_asprintf PMIX_NAME(asprintf) -#define pmix_basename PMIX_NAME(basename) -#define pmix_bcopy_csum_partial PMIX_NAME(bcopy_csum_partial) -#define pmix_bcopy_uicrc_partial PMIX_NAME(bcopy_uicrc_partial) -#define pmix_bcopy_uicsum_partial PMIX_NAME(bcopy_uicsum_partial) -#define pmix_csum_partial PMIX_NAME(csum_partial) -#define pmix_dirname PMIX_NAME(dirname) -#define pmix_environ_merge PMIX_NAME(environ_merge) -#define pmix_errhandler_invoke PMIX_NAME(errhandler_invoke) -#define pmix_fd_read PMIX_NAME(fd_read) -#define pmix_fd_set_cloexec PMIX_NAME(fd_set_cloexec) -#define pmix_fd_write PMIX_NAME(fd_write) -#define pmix_home_directory PMIX_NAME(home_directory) -#define pmix_initialize_crc_table PMIX_NAME(initialize_crc_table) -#define pmix_os_path PMIX_NAME(os_path) -#define pmix_output PMIX_NAME(output) -#define pmix_output_close PMIX_NAME(output_close) -#define pmix_output_finalize PMIX_NAME(output_finalize) -#define pmix_output_get_verbosity PMIX_NAME(output_get_verbosity) -#define pmix_output_init PMIX_NAME(output_init) -#define pmix_output_open PMIX_NAME(output_open) -#define pmix_output_reopen PMIX_NAME(output_reopen) -#define pmix_output_reopen_all PMIX_NAME(output_reopen_all) -#define pmix_output_set_output_file_info PMIX_NAME(output_set_output_file_info) -#define pmix_output_set_verbosity PMIX_NAME(output_set_verbosity) -#define pmix_output_string PMIX_NAME(output_string) -#define pmix_output_switch PMIX_NAME(output_switch) -#define pmix_output_verbose PMIX_NAME(output_verbose) -#define pmix_output_vstring PMIX_NAME(output_vstring) -#define pmix_output_vverbose PMIX_NAME(output_vverbose) -#define pmix_setenv PMIX_NAME(setenv) -#define pmix_snprintf PMIX_NAME(snprintf) -#define pmix_start_progress_thread PMIX_NAME(start_progress_thread) -#define pmix_stop_progress_thread PMIX_NAME(stop_progress_thread) -#define pmix_tmp_directory PMIX_NAME(tmp_directory) -#define pmix_uicrc_partial PMIX_NAME(uicrc_partial) -#define pmix_uicsum_partial PMIX_NAME(uicsum_partial) -#define pmix_unsetenv PMIX_NAME(unsetenv) -#define pmix_vasprintf PMIX_NAME(vasprintf) -#define pmix_vsnprintf PMIX_NAME(vsnprintf) - - -/* buffer operations */ -#define pmix_bfrop_buffer_extend PMIX_NAME(bfrop_buffer_extend) -#define pmix_bfrop_close PMIX_NAME(bfrop_close) -#define pmix_bfrop_copy PMIX_NAME(bfrop_copy) -#define pmix_bfrop_copy_app PMIX_NAME(bfrop_copy_app) -#define pmix_bfrop_copy_array PMIX_NAME(bfrop_copy_array) -#define pmix_bfrop_copy_bo PMIX_NAME(bfrop_copy_bo) -#define pmix_bfrop_copy_buf PMIX_NAME(bfrop_copy_buf) -#define pmix_bfrop_copy_info PMIX_NAME(bfrop_copy_info) -#define pmix_bfrop_copy_kval PMIX_NAME(bfrop_copy_kval) -#define pmix_bfrop_copy_modex PMIX_NAME(bfrop_copy_modex) -#define pmix_bfrop_copy_payload PMIX_NAME(bfrop_copy_payload) -#define pmix_bfrop_copy_pdata PMIX_NAME(bfrop_copy_pdata) -#define pmix_bfrop_copy_persist PMIX_NAME(bfrop_copy_persist) -#define pmix_bfrop_copy_proc PMIX_NAME(bfrop_copy_proc) -#define pmix_bfrop_copy_string PMIX_NAME(bfrop_copy_string) -#define pmix_bfrop_copy_value PMIX_NAME(bfrop_copy_value) -#define pmix_bfrop_get_data_type PMIX_NAME(bfrop_get_data_type) -#define pmix_bfrop_open PMIX_NAME(bfrop_open) -#define pmix_bfrop_pack PMIX_NAME(bfrop_pack) -#define pmix_bfrop_pack_app PMIX_NAME(bfrop_pack_app) -#define pmix_bfrop_pack_array PMIX_NAME(bfrop_pack_array) -#define pmix_bfrop_pack_bo PMIX_NAME(bfrop_pack_bo) -#define pmix_bfrop_pack_buf PMIX_NAME(bfrop_pack_buf) -#define pmix_bfrop_pack_buffer PMIX_NAME(bfrop_pack_buffer) -#define pmix_bfrop_pack_byte PMIX_NAME(bfrop_pack_byte) -#define pmix_bfrop_pack_datatype PMIX_NAME(bfrop_pack_datatype) -#define pmix_bfrop_pack_double PMIX_NAME(bfrop_pack_double) -#define pmix_bfrop_pack_float PMIX_NAME(bfrop_pack_float) -#define pmix_bfrop_pack_info PMIX_NAME(bfrop_pack_info) -#define pmix_bfrop_pack_int PMIX_NAME(bfrop_pack_int) -#define pmix_bfrop_pack_int16 PMIX_NAME(bfrop_pack_int16) -#define pmix_bfrop_pack_int32 PMIX_NAME(bfrop_pack_int32) -#define pmix_bfrop_pack_int64 PMIX_NAME(bfrop_pack_int64) -#define pmix_bfrop_pack_kval PMIX_NAME(bfrop_pack_kval) -#define pmix_bfrop_pack_modex PMIX_NAME(bfrop_pack_modex) -#define pmix_bfrop_pack_pdata PMIX_NAME(bfrop_pack_pdata) -#define pmix_bfrop_pack_persist PMIX_NAME(bfrop_pack_persist) -#define pmix_bfrop_pack_pid PMIX_NAME(bfrop_pack_pid) -#define pmix_bfrop_pack_proc PMIX_NAME(bfrop_pack_proc) -#define pmix_bfrop_pack_sizet PMIX_NAME(bfrop_pack_sizet) -#define pmix_bfrop_pack_string PMIX_NAME(bfrop_pack_string) -#define pmix_bfrop_pack_time PMIX_NAME(bfrop_pack_time) -#define pmix_bfrop_pack_timeval PMIX_NAME(bfrop_pack_timeval) -#define pmix_bfrop_pack_value PMIX_NAME(bfrop_pack_value) -#define pmix_bfrop_print PMIX_NAME(bfrop_print) -#define pmix_bfrop_print_app PMIX_NAME(bfrop_print_app) -#define pmix_bfrop_print_array PMIX_NAME(bfrop_print_array) -#define pmix_bfrop_print_bo PMIX_NAME(bfrop_print_bo) -#define pmix_bfrop_print_buf PMIX_NAME(bfrop_print_buf) -#define pmix_bfrop_print_byte PMIX_NAME(bfrop_print_byte) -#define pmix_bfrop_print_double PMIX_NAME(bfrop_print_double) -#define pmix_bfrop_print_float PMIX_NAME(bfrop_print_float) -#define pmix_bfrop_print_info PMIX_NAME(bfrop_print_info) -#define pmix_bfrop_print_int PMIX_NAME(bfrop_print_int) -#define pmix_bfrop_print_int16 PMIX_NAME(bfrop_print_int16) -#define pmix_bfrop_print_int32 PMIX_NAME(bfrop_print_int32) -#define pmix_bfrop_print_int64 PMIX_NAME(bfrop_print_int64) -#define pmix_bfrop_print_int8 PMIX_NAME(bfrop_print_int8) -#define pmix_bfrop_print_kval PMIX_NAME(bfrop_print_kval) -#define pmix_bfrop_print_modex PMIX_NAME(bfrop_print_modex) -#define pmix_bfrop_print_pdata PMIX_NAME(bfrop_print_pdata) -#define pmix_bfrop_print_persist PMIX_NAME(bfrop_print_persist) -#define pmix_bfrop_print_pid PMIX_NAME(bfrop_print_pid) -#define pmix_bfrop_print_proc PMIX_NAME(bfrop_print_proc) -#define pmix_bfrop_print_size PMIX_NAME(bfrop_print_size) -#define pmix_bfrop_print_string PMIX_NAME(bfrop_print_string) -#define pmix_bfrop_print_time PMIX_NAME(bfrop_print_time) -#define pmix_bfrop_print_timeval PMIX_NAME(bfrop_print_timeval) -#define pmix_bfrop_print_uint PMIX_NAME(bfrop_print_uint) -#define pmix_bfrop_print_uint16 PMIX_NAME(bfrop_print_uint16) -#define pmix_bfrop_print_uint32 PMIX_NAME(bfrop_print_uint32) -#define pmix_bfrop_print_uint64 PMIX_NAME(bfrop_print_uint64) -#define pmix_bfrop_print_uint8 PMIX_NAME(bfrop_print_uint8) -#define pmix_bfrop_print_value PMIX_NAME(bfrop_print_value) -#define pmix_bfrop_std_copy PMIX_NAME(bfrop_std_copy) -#define pmix_bfrop_store_data_type PMIX_NAME(bfrop_store_data_type) -#define pmix_bfrop_too_small PMIX_NAME(bfrop_too_small) -#define pmix_bfrop_unpack PMIX_NAME(bfrop_unpack) -#define pmix_bfrop_unpack_app PMIX_NAME(bfrop_unpack_app) -#define pmix_bfrop_unpack_array PMIX_NAME(bfrop_unpack_array) -#define pmix_bfrop_unpack_bo PMIX_NAME(bfrop_unpack_bo) -#define pmix_bfrop_unpack_buf PMIX_NAME(bfrop_unpack_buf) -#define pmix_bfrop_unpack_buffer PMIX_NAME(bfrop_unpack_buffer) -#define pmix_bfrop_unpack_byte PMIX_NAME(bfrop_unpack_byte) -#define pmix_bfrop_unpack_datatype PMIX_NAME(bfrop_unpack_datatype) -#define pmix_bfrop_unpack_double PMIX_NAME(bfrop_unpack_double) -#define pmix_bfrop_unpack_float PMIX_NAME(bfrop_unpack_float) -#define pmix_bfrop_unpack_info PMIX_NAME(bfrop_unpack_info) -#define pmix_bfrop_unpack_int PMIX_NAME(bfrop_unpack_int) -#define pmix_bfrop_unpack_int16 PMIX_NAME(bfrop_unpack_int16) -#define pmix_bfrop_unpack_int32 PMIX_NAME(bfrop_unpack_int32) -#define pmix_bfrop_unpack_int64 PMIX_NAME(bfrop_unpack_int64) -#define pmix_bfrop_unpack_kval PMIX_NAME(bfrop_unpack_kval) -#define pmix_bfrop_unpack_modex PMIX_NAME(bfrop_unpack_modex) -#define pmix_bfrop_unpack_pdata PMIX_NAME(bfrop_unpack_pdata) -#define pmix_bfrop_unpack_persist PMIX_NAME(bfrop_unpack_persist) -#define pmix_bfrop_unpack_pid PMIX_NAME(bfrop_unpack_pid) -#define pmix_bfrop_unpack_proc PMIX_NAME(bfrop_unpack_proc) -#define pmix_bfrop_unpack_sizet PMIX_NAME(bfrop_unpack_sizet) -#define pmix_bfrop_unpack_string PMIX_NAME(bfrop_unpack_string) -#define pmix_bfrop_unpack_time PMIX_NAME(bfrop_unpack_time) -#define pmix_bfrop_unpack_timeval PMIX_NAME(bfrop_unpack_timeval) -#define pmix_bfrop_unpack_value PMIX_NAME(bfrop_unpack_value) -#define pmix_value_load PMIX_NAME(value_load) -#define pmix_value_unload PMIX_NAME(value_unload) -#define pmix_value_xfer PMIX_NAME(value_xfer) - - -/* class system */ -#define pmix_class_finalize PMIX_NAME(class_finalize) -#define pmix_class_initialize PMIX_NAME(class_initialize) -#define pmix_hash_fetch PMIX_NAME(hash_fetch) -#define pmix_hash_remove_data PMIX_NAME(hash_remove_data) -#define pmix_hash_store PMIX_NAME(hash_store) -#define pmix_hash_table_get_first_key_uint32 PMIX_NAME(hash_table_get_first_key_uint32) -#define pmix_hash_table_get_first_key_uint64 PMIX_NAME(hash_table_get_first_key_uint64) -#define pmix_hash_table_get_next_key_uint32 PMIX_NAME(hash_table_get_next_key_uint32) -#define pmix_hash_table_get_next_key_uint64 PMIX_NAME(hash_table_get_next_key_uint64) -#define pmix_hash_table_get_value_ptr PMIX_NAME(hash_table_get_value_ptr) -#define pmix_hash_table_get_value_uint32 PMIX_NAME(hash_table_get_value_uint32) -#define pmix_hash_table_get_value_uint64 PMIX_NAME(hash_table_get_value_uint64) -#define pmix_hash_table_init PMIX_NAME(hash_table_init) -#define pmix_hash_table_remove_all PMIX_NAME(hash_table_remove_all) -#define pmix_hash_table_remove_value_ptr PMIX_NAME(hash_table_remove_value_ptr) -#define pmix_hash_table_remove_value_uint32 PMIX_NAME(hash_table_remove_value_uint32) -#define pmix_hash_table_remove_value_uint64 PMIX_NAME(hash_table_remove_value_uint64) -#define pmix_hash_table_set_value_ptr PMIX_NAME(hash_table_set_value_ptr) -#define pmix_hash_table_set_value_uint32 PMIX_NAME(hash_table_set_value_uint32) -#define pmix_hash_table_set_value_uint64 PMIX_NAME(hash_table_set_value_uint64) -#define pmix_list_insert PMIX_NAME(list_insert) -#define pmix_list_join PMIX_NAME(list_join) -#define pmix_list_sort PMIX_NAME(list_sort) -#define pmix_list_splice PMIX_NAME(list_splice) -#define pmix_pointer_array_add PMIX_NAME(pointer_array_add) -#define pmix_pointer_array_init PMIX_NAME(pointer_array_init) -#define pmix_pointer_array_set_item PMIX_NAME(pointer_array_set_item) -#define pmix_pointer_array_set_size PMIX_NAME(pointer_array_set_size) -#define pmix_pointer_array_test_and_set_item PMIX_NAME(pointer_array_test_and_set_item) - - -/* security system */ -#define pmix_sec_finalize PMIX_NAME(sec_finalize) -#define pmix_sec_init PMIX_NAME(sec_init) - - -/* usock messaging system */ -#define pmix_usock_finalize PMIX_NAME(usock_finalize) -#define pmix_usock_init PMIX_NAME(usock_init) -#define pmix_usock_process_msg PMIX_NAME(usock_process_msg) -#define pmix_usock_recv_blocking PMIX_NAME(usock_recv_blocking) -#define pmix_usock_recv_handler PMIX_NAME(usock_recv_handler) -#define pmix_usock_send_blocking PMIX_NAME(usock_send_blocking) -#define pmix_usock_send_handler PMIX_NAME(usock_send_handler) -#define pmix_usock_send_recv PMIX_NAME(usock_send_recv) -#define pmix_usock_set_blocking PMIX_NAME(usock_set_blocking) -#define pmix_usock_set_nonblocking PMIX_NAME(usock_set_nonblocking) +/* internal functions */ +#define pmix_argv_append PMIX_NAME(argv_append) +#define pmix_argv_append_nosize PMIX_NAME(argv_append_nosize) +#define pmix_argv_append_unique_nosize PMIX_NAME(argv_append_unique_nosize) +#define pmix_argv_copy PMIX_NAME(argv_copy) +#define pmix_argv_count PMIX_NAME(argv_count) +#define pmix_argv_delete PMIX_NAME(argv_delete) +#define pmix_argv_free PMIX_NAME(argv_free) +#define pmix_argv_insert PMIX_NAME(argv_insert) +#define pmix_argv_insert_element PMIX_NAME(argv_insert_element) +#define pmix_argv_join PMIX_NAME(argv_join) +#define pmix_argv_join_range PMIX_NAME(argv_join_range) +#define pmix_argv_len PMIX_NAME(argv_len) +#define pmix_argv_prepend_nosize PMIX_NAME(argv_prepend_nosize) +#define pmix_argv_split PMIX_NAME(argv_split) +#define pmix_argv_split_with_empty PMIX_NAME(argv_split_with_empty) +#define pmix_asprintf PMIX_NAME(asprintf) +#define pmix_basename PMIX_NAME(basename) +#define pmix_bcopy_csum_partial PMIX_NAME(bcopy_csum_partial) +#define pmix_bcopy_uicrc_partial PMIX_NAME(bcopy_uicrc_partial) +#define pmix_bcopy_uicsum_partial PMIX_NAME(bcopy_uicsum_partial) +#define pmix_bfrop PMIX_NAME(bfrop) +#define pmix_bfrop_buffer_extend PMIX_NAME(bfrop_buffer_extend) +#define pmix_bfrop_close PMIX_NAME(bfrop_close) +#define pmix_bfrop_copy PMIX_NAME(bfrop_copy) +#define pmix_bfrop_copy_app PMIX_NAME(bfrop_copy_app) +#define pmix_bfrop_copy_array PMIX_NAME(bfrop_copy_array) +#define pmix_bfrop_copy_bo PMIX_NAME(bfrop_copy_bo) +#define pmix_bfrop_copy_buf PMIX_NAME(bfrop_copy_buf) +#define pmix_bfrop_copy_info PMIX_NAME(bfrop_copy_info) +#define pmix_bfrop_copy_kval PMIX_NAME(bfrop_copy_kval) +#define pmix_bfrop_copy_modex PMIX_NAME(bfrop_copy_modex) +#define pmix_bfrop_copy_payload PMIX_NAME(bfrop_copy_payload) +#define pmix_bfrop_copy_pdata PMIX_NAME(bfrop_copy_pdata) +#define pmix_bfrop_copy_persist PMIX_NAME(bfrop_copy_persist) +#define pmix_bfrop_copy_proc PMIX_NAME(bfrop_copy_proc) +#define pmix_bfrop_copy_string PMIX_NAME(bfrop_copy_string) +#define pmix_bfrop_copy_topo PMIX_NAME(bfrop_copy_topo) +#define pmix_bfrop_copy_value PMIX_NAME(bfrop_copy_value) +#define pmix_bfrop_get_data_type PMIX_NAME(bfrop_get_data_type) +#define pmix_bfrop_initial_size PMIX_NAME(pmix_bfrop_initial_size) +#define pmix_bfrop_initialized PMIX_NAME(bfrop_initialized) +#define pmix_bfrop_num_reg_types PMIX_NAME(pmix_bfrop_num_reg_types) +#define pmix_bfrop_open PMIX_NAME(bfrop_open) +#define pmix_bfrop_pack PMIX_NAME(bfrop_pack) +#define pmix_bfrop_pack_app PMIX_NAME(bfrop_pack_app) +#define pmix_bfrop_pack_array PMIX_NAME(bfrop_pack_array) +#define pmix_bfrop_pack_bo PMIX_NAME(bfrop_pack_bo) +#define pmix_bfrop_pack_bool PMIX_NAME(bfrop_pack_bool) +#define pmix_bfrop_pack_buf PMIX_NAME(bfrop_pack_buf) +#define pmix_bfrop_pack_buffer PMIX_NAME(bfrop_pack_buffer) +#define pmix_bfrop_pack_byte PMIX_NAME(bfrop_pack_byte) +#define pmix_bfrop_pack_datatype PMIX_NAME(bfrop_pack_datatype) +#define pmix_bfrop_pack_double PMIX_NAME(bfrop_pack_double) +#define pmix_bfrop_pack_float PMIX_NAME(bfrop_pack_float) +#define pmix_bfrop_pack_info PMIX_NAME(bfrop_pack_info) +#define pmix_bfrop_pack_int PMIX_NAME(bfrop_pack_int) +#define pmix_bfrop_pack_int16 PMIX_NAME(bfrop_pack_int16) +#define pmix_bfrop_pack_int32 PMIX_NAME(bfrop_pack_int32) +#define pmix_bfrop_pack_int64 PMIX_NAME(bfrop_pack_int64) +#define pmix_bfrop_pack_kval PMIX_NAME(bfrop_pack_kval) +#define pmix_bfrop_pack_modex PMIX_NAME(bfrop_pack_modex) +#define pmix_bfrop_pack_pdata PMIX_NAME(bfrop_pack_pdata) +#define pmix_bfrop_pack_persist PMIX_NAME(bfrop_pack_persist) +#define pmix_bfrop_pack_pid PMIX_NAME(bfrop_pack_pid) +#define pmix_bfrop_pack_proc PMIX_NAME(bfrop_pack_proc) +#define pmix_bfrop_pack_sizet PMIX_NAME(bfrop_pack_sizet) +#define pmix_bfrop_pack_string PMIX_NAME(bfrop_pack_string) +#define pmix_bfrop_pack_time PMIX_NAME(bfrop_pack_time) +#define pmix_bfrop_pack_timeval PMIX_NAME(bfrop_pack_timeval) +#define pmix_bfrop_pack_topo PMIX_NAME(bfrop_pack_topo) +#define pmix_bfrop_pack_value PMIX_NAME(bfrop_pack_value) +#define pmix_bfrop_print PMIX_NAME(bfrop_print) +#define pmix_bfrop_print_app PMIX_NAME(bfrop_print_app) +#define pmix_bfrop_print_array PMIX_NAME(bfrop_print_array) +#define pmix_bfrop_print_bo PMIX_NAME(bfrop_print_bo) +#define pmix_bfrop_print_bool PMIX_NAME(bfrop_print_bool) +#define pmix_bfrop_print_buf PMIX_NAME(bfrop_print_buf) +#define pmix_bfrop_print_byte PMIX_NAME(bfrop_print_byte) +#define pmix_bfrop_print_double PMIX_NAME(bfrop_print_double) +#define pmix_bfrop_print_float PMIX_NAME(bfrop_print_float) +#define pmix_bfrop_print_info PMIX_NAME(bfrop_print_info) +#define pmix_bfrop_print_int PMIX_NAME(bfrop_print_int) +#define pmix_bfrop_print_int16 PMIX_NAME(bfrop_print_int16) +#define pmix_bfrop_print_int32 PMIX_NAME(bfrop_print_int32) +#define pmix_bfrop_print_int64 PMIX_NAME(bfrop_print_int64) +#define pmix_bfrop_print_int8 PMIX_NAME(bfrop_print_int8) +#define pmix_bfrop_print_kval PMIX_NAME(bfrop_print_kval) +#define pmix_bfrop_print_modex PMIX_NAME(bfrop_print_modex) +#define pmix_bfrop_print_pdata PMIX_NAME(bfrop_print_pdata) +#define pmix_bfrop_print_persist PMIX_NAME(bfrop_print_persist) +#define pmix_bfrop_print_pid PMIX_NAME(bfrop_print_pid) +#define pmix_bfrop_print_proc PMIX_NAME(bfrop_print_proc) +#define pmix_bfrop_print_size PMIX_NAME(bfrop_print_size) +#define pmix_bfrop_print_string PMIX_NAME(bfrop_print_string) +#define pmix_bfrop_print_time PMIX_NAME(bfrop_print_time) +#define pmix_bfrop_print_timeval PMIX_NAME(bfrop_print_timeval) +#define pmix_bfrop_print_topo PMIX_NAME(bfrop_print_topo) +#define pmix_bfrop_print_uint PMIX_NAME(bfrop_print_uint) +#define pmix_bfrop_print_uint16 PMIX_NAME(bfrop_print_uint16) +#define pmix_bfrop_print_uint32 PMIX_NAME(bfrop_print_uint32) +#define pmix_bfrop_print_uint64 PMIX_NAME(bfrop_print_uint64) +#define pmix_bfrop_print_uint8 PMIX_NAME(bfrop_print_uint8) +#define pmix_bfrop_print_value PMIX_NAME(bfrop_print_value) +#define pmix_bfrop_std_copy PMIX_NAME(bfrop_std_copy) +#define pmix_bfrop_store_data_type PMIX_NAME(bfrop_store_data_type) +#define pmix_bfrop_threshold_size PMIX_NAME(pmix_bfrop_threshold_size) +#define pmix_bfrop_too_small PMIX_NAME(bfrop_too_small) +#define pmix_bfrop_types PMIX_NAME(bfrop_types) +#define pmix_bfrop_type_info_t_class PMIX_NAME(bfrop_type_info_t_class) +#define pmix_bfrop_unpack PMIX_NAME(bfrop_unpack) +#define pmix_bfrop_unpack_app PMIX_NAME(bfrop_unpack_app) +#define pmix_bfrop_unpack_array PMIX_NAME(bfrop_unpack_array) +#define pmix_bfrop_unpack_bo PMIX_NAME(bfrop_unpack_bo) +#define pmix_bfrop_unpack_bool PMIX_NAME(bfrop_unpack_bool) +#define pmix_bfrop_unpack_buf PMIX_NAME(bfrop_unpack_buf) +#define pmix_bfrop_unpack_buffer PMIX_NAME(bfrop_unpack_buffer) +#define pmix_bfrop_unpack_byte PMIX_NAME(bfrop_unpack_byte) +#define pmix_bfrop_unpack_datatype PMIX_NAME(bfrop_unpack_datatype) +#define pmix_bfrop_unpack_double PMIX_NAME(bfrop_unpack_double) +#define pmix_bfrop_unpack_float PMIX_NAME(bfrop_unpack_float) +#define pmix_bfrop_unpack_info PMIX_NAME(bfrop_unpack_info) +#define pmix_bfrop_unpack_int PMIX_NAME(bfrop_unpack_int) +#define pmix_bfrop_unpack_int16 PMIX_NAME(bfrop_unpack_int16) +#define pmix_bfrop_unpack_int32 PMIX_NAME(bfrop_unpack_int32) +#define pmix_bfrop_unpack_int64 PMIX_NAME(bfrop_unpack_int64) +#define pmix_bfrop_unpack_kval PMIX_NAME(bfrop_unpack_kval) +#define pmix_bfrop_unpack_modex PMIX_NAME(bfrop_unpack_modex) +#define pmix_bfrop_unpack_pdata PMIX_NAME(bfrop_unpack_pdata) +#define pmix_bfrop_unpack_persist PMIX_NAME(bfrop_unpack_persist) +#define pmix_bfrop_unpack_pid PMIX_NAME(bfrop_unpack_pid) +#define pmix_bfrop_unpack_proc PMIX_NAME(bfrop_unpack_proc) +#define pmix_bfrop_unpack_sizet PMIX_NAME(bfrop_unpack_sizet) +#define pmix_bfrop_unpack_string PMIX_NAME(bfrop_unpack_string) +#define pmix_bfrop_unpack_time PMIX_NAME(bfrop_unpack_time) +#define pmix_bfrop_unpack_timeval PMIX_NAME(bfrop_unpack_timeval) +#define pmix_bfrop_unpack_topo PMIX_NAME(bfrop_unpack_topo) +#define pmix_bfrop_unpack_value PMIX_NAME(bfrop_unpack_value) +#define pmix_buffer_t_class PMIX_NAME(buffer_t_class) +#define pmix_cb_t_class PMIX_NAME(cb_t_class) +#define pmix_class_finalize PMIX_NAME(class_finalize) +#define pmix_class_initialize PMIX_NAME(class_initialize) +#define pmix_client_globals PMIX_NAME(pmix_client_globals) +#define pmix_client_process_nspace_blob PMIX_NAME(client_process_nspace_blob) +#define pmix_csum_partial PMIX_NAME(csum_partial) +#define pmix_dirname PMIX_NAME(dirname) +#define pmix_dmdx_local_t_class PMIX_NAME(dmdx_local_t_class) +#define pmix_dmdx_remote_t_class PMIX_NAME(dmdx_remote_t_class) +#define pmix_dmdx_reply_caddy_t_class PMIX_NAME(dmdx_reply_caddy_t_class) +#define pmix_dmdx_request_t_class PMIX_NAME(dmdx_request_t_class) +#define pmix_environ_merge PMIX_NAME(environ_merge) +#define pmix_errhandler_invoke PMIX_NAME(errhandler_invoke) +#define pmix_fd_read PMIX_NAME(fd_read) +#define pmix_fd_set_cloexec PMIX_NAME(fd_set_cloexec) +#define pmix_fd_write PMIX_NAME(fd_write) +#define pmix_globals PMIX_NAME(globals) +#define pmix_globals_finalize PMIX_NAME(globals_finalize) +#define pmix_globals_init PMIX_NAME(globals_init) +#define pmix_hash_fetch PMIX_NAME(hash_fetch) +#define pmix_hash_remove_data PMIX_NAME(hash_remove_data) +#define pmix_hash_store PMIX_NAME(hash_store) +#define pmix_hash_table_get_first_key_uint32 PMIX_NAME(hash_table_get_first_key_uint32) +#define pmix_hash_table_get_first_key_uint64 PMIX_NAME(hash_table_get_first_key_uint64) +#define pmix_hash_table_get_next_key_uint32 PMIX_NAME(hash_table_get_next_key_uint32) +#define pmix_hash_table_get_next_key_uint64 PMIX_NAME(hash_table_get_next_key_uint64) +#define pmix_hash_table_get_value_ptr PMIX_NAME(hash_table_get_value_ptr) +#define pmix_hash_table_get_value_uint32 PMIX_NAME(hash_table_get_value_uint32) +#define pmix_hash_table_get_value_uint64 PMIX_NAME(hash_table_get_value_uint64) +#define pmix_hash_table_init PMIX_NAME(hash_table_init) +#define pmix_hash_table_remove_all PMIX_NAME(hash_table_remove_all) +#define pmix_hash_table_remove_value_ptr PMIX_NAME(hash_table_remove_value_ptr) +#define pmix_hash_table_remove_value_uint32 PMIX_NAME(hash_table_remove_value_uint32) +#define pmix_hash_table_remove_value_uint64 PMIX_NAME(hash_table_remove_value_uint64) +#define pmix_hash_table_set_value_ptr PMIX_NAME(hash_table_set_value_ptr) +#define pmix_hash_table_set_value_uint32 PMIX_NAME(hash_table_set_value_uint32) +#define pmix_hash_table_set_value_uint64 PMIX_NAME(hash_table_set_value_uint64) +#define pmix_hash_table_t_class PMIX_NAME(hash_table_t_class) +#define pmix_home_directory PMIX_NAME(home_directory) +#define pmix_host_server PMIX_NAME(pmix_host_server) +#define pmix_initialize_crc_table PMIX_NAME(initialize_crc_table) +#define pmix_kval_t_class PMIX_NAME(kval_t_class) +#define pmix_list_insert PMIX_NAME(list_insert) +#define pmix_list_item_t_class PMIX_NAME(list_item_t_class) +#define pmix_list_join PMIX_NAME(list_join) +#define pmix_list_sort PMIX_NAME(list_sort) +#define pmix_list_splice PMIX_NAME(list_splice) +#define pmix_list_t_class PMIX_NAME(list_t_class) +#define pmix_native_module PMIX_NAME(native_module) +#define pmix_notify_caddy_t_class PMIX_NAME(notify_caddy_t_class) +#define pmix_nrec_t_class PMIX_NAME(nrec_t_class) +#define pmix_nspace_t_class PMIX_NAME(nspace_t_class) +#define pmix_object_t_class PMIX_NAME(object_t_class) +#define pmix_os_path PMIX_NAME(os_path) +#define pmix_output PMIX_NAME(output) +#define pmix_output_close PMIX_NAME(output_close) +#define pmix_output_finalize PMIX_NAME(output_finalize) +#define pmix_output_get_verbosity PMIX_NAME(output_get_verbosity) +#define pmix_output_init PMIX_NAME(output_init) +#define pmix_output_open PMIX_NAME(output_open) +#define pmix_output_redirected_syslog_pri PMIX_NAME(pmix_output_redirected_syslog_pri) +#define pmix_output_redirected_to_syslog PMIX_NAME(output_redirected_to_syslog) +#define pmix_output_reopen PMIX_NAME(output_reopen) +#define pmix_output_reopen_all PMIX_NAME(output_reopen_all) +#define pmix_output_set_output_file_info PMIX_NAME(output_set_output_file_info) +#define pmix_output_set_verbosity PMIX_NAME(output_set_verbosity) +#define pmix_output_stream_t_class PMIX_NAME(output_stream_t_class) +#define pmix_output_string PMIX_NAME(output_string) +#define pmix_output_switch PMIX_NAME(output_switch) +#define pmix_output_verbose PMIX_NAME(output_verbose) +#define pmix_output_vstring PMIX_NAME(output_vstring) +#define pmix_output_vverbose PMIX_NAME(output_vverbose) +#define pmix_pack_proc_map PMIX_NAME(pack_proc_map) +#define pmix_peer_t_class PMIX_NAME(peer_t_class) +#define pmix_pending_connection_t_class PMIX_NAME(pending_connection_t_class) +#define pmix_pending_nspace_requests PMIX_NAME(pending_nspace_requests) +#define pmix_pending_resolve PMIX_NAME(pending_resolve) +#define pmix_pointer_array_add PMIX_NAME(pointer_array_add) +#define pmix_pointer_array_init PMIX_NAME(pointer_array_init) +#define pmix_pointer_array_set_item PMIX_NAME(pointer_array_set_item) +#define pmix_pointer_array_set_size PMIX_NAME(pointer_array_set_size) +#define pmix_pointer_array_t_class PMIX_NAME(pointer_array_t_class) +#define pmix_pointer_array_test_and_set_item PMIX_NAME(pointer_array_test_and_set_item) +#define pmix_rank_info_t_class PMIX_NAME(rank_info_t_class) +#define pmix_regex_parse_nodes PMIX_NAME(regex_parse_nodes) +#define pmix_regex_parse_procs PMIX_NAME(regex_parse_procs) +#define pmix_regex_range_t_class PMIX_NAME(regex_range_t_class) +#define pmix_regex_value_t_class PMIX_NAME(regex_value_t_class) +#define pmix_sec PMIX_NAME(pmix_sec) +#define pmix_sec_finalize PMIX_NAME(sec_finalize) +#define pmix_sec_init PMIX_NAME(sec_init) +#define pmix_server_abort PMIX_NAME(server_abort) +#define pmix_server_caddy_t_class PMIX_NAME(server_caddy_t_class) +#define pmix_server_commit PMIX_NAME(server_commit) +#define pmix_server_connect PMIX_NAME(server_connect) +#define pmix_server_deregister_errhandler PMIX_NAME(server_deregister_errhandler) +#define pmix_server_fence PMIX_NAME(server_fence) +#define pmix_server_get PMIX_NAME(server_get) +#define pmix_server_globals PMIX_NAME(pmix_server_globals) +#define pmix_server_lookup PMIX_NAME(server_lookup) +#define pmix_server_notify_error PMIX_NAME(server_notify_error) +#define pmix_server_nspace_t_class PMIX_NAME(server_nspace_t_class) +#define pmix_server_publish PMIX_NAME(server_publish) +#define pmix_server_register_errhandler PMIX_NAME(server_register_errhandler) +#define pmix_server_spawn PMIX_NAME(server_spawn) +#define pmix_server_trkr_t_class PMIX_NAME(server_trkr_t_class) +#define pmix_server_unpublish PMIX_NAME(server_unpublish) +#define pmix_setenv PMIX_NAME(setenv) +#define pmix_setup_caddy_t_class PMIX_NAME(setup_caddy_t_class) +#define pmix_shift_caddy_t_class PMIX_NAME(shift_caddy_t_class) +#define pmix_snd_caddy_t_class PMIX_NAME(snd_caddy_t_class) +#define pmix_snprintf PMIX_NAME(snprintf) +#define pmix_start_listening PMIX_NAME(start_listening) +#define pmix_start_progress_thread PMIX_NAME(start_progress_thread) +#define pmix_stop_listening PMIX_NAME(stop_listening) +#define pmix_stop_progress_thread PMIX_NAME(stop_progress_thread) +#define pmix_timer_t_class PMIX_NAME(timer_t_class) +#define pmix_tmp_directory PMIX_NAME(tmp_directory) +#define pmix_trkr_caddy_t_class PMIX_NAME(trkr_caddy_t_class) +#define pmix_uicrc_partial PMIX_NAME(uicrc_partial) +#define pmix_uicsum_partial PMIX_NAME(uicsum_partial) +#define pmix_unsetenv PMIX_NAME(unsetenv) +#define pmix_usock_finalize PMIX_NAME(usock_finalize) +#define pmix_usock_globals PMIX_NAME(pmix_usock_globals) +#define pmix_usock_init PMIX_NAME(usock_init) +#define pmix_usock_posted_recv_t_class PMIX_NAME(usock_posted_recv_t_class) +#define pmix_usock_process_msg PMIX_NAME(usock_process_msg) +#define pmix_usock_queue_t_class PMIX_NAME(usock_queue_t_class) +#define pmix_usock_recv_blocking PMIX_NAME(usock_recv_blocking) +#define pmix_usock_recv_handler PMIX_NAME(usock_recv_handler) +#define pmix_usock_recv_t_class PMIX_NAME(usock_recv_t_class) +#define pmix_usock_send_blocking PMIX_NAME(usock_send_blocking) +#define pmix_usock_send_handler PMIX_NAME(usock_send_handler) +#define pmix_usock_send_recv PMIX_NAME(usock_send_recv) +#define pmix_usock_send_t_class PMIX_NAME(usock_send_t_class) +#define pmix_usock_set_blocking PMIX_NAME(usock_set_blocking) +#define pmix_usock_set_nonblocking PMIX_NAME(usock_set_nonblocking) +#define pmix_usock_sr_t_class PMIX_NAME(usock_sr_t_class) +#define pmix_value_load PMIX_NAME(value_load) +#define pmix_value_unload PMIX_NAME(value_unload) +#define pmix_value_xfer PMIX_NAME(value_xfer) +#define pmix_vasprintf PMIX_NAME(vasprintf) +#define pmix_vsnprintf PMIX_NAME(vsnprintf) #endif /* PMIX_SYM_TRANSFORM */ diff --git a/opal/mca/pmix/pmix112/pmix/src/buffer_ops/buffer_ops.h b/opal/mca/pmix/pmix112/pmix/src/buffer_ops/buffer_ops.h index 65aded3e3e..0d05fa7241 100644 --- a/opal/mca/pmix/pmix112/pmix/src/buffer_ops/buffer_ops.h +++ b/opal/mca/pmix/pmix112/pmix/src/buffer_ops/buffer_ops.h @@ -38,8 +38,6 @@ BEGIN_C_DECLS -PMIX_DECLSPEC extern const char pmix_version_string[]; - /* internally used object for transferring data * to/from the server and for storing in the * hash tables */ diff --git a/opal/mca/pmix/pmix112/pmix/src/buffer_ops/open_close.c b/opal/mca/pmix/pmix112/pmix/src/buffer_ops/open_close.c index bd0a263032..3b408a88e9 100644 --- a/opal/mca/pmix/pmix112/pmix/src/buffer_ops/open_close.c +++ b/opal/mca/pmix/pmix112/pmix/src/buffer_ops/open_close.c @@ -34,13 +34,6 @@ #include "src/util/argv.h" #include "src/buffer_ops/internal.h" -#if PMIX_CC_USE_PRAGMA_IDENT -#pragma ident PMIX_VERSION -#elif PMIX_CC_USE_IDENT -#ident PMIX_VERSION -#endif -const char pmix_version_string[] = PMIX_VERSION; - /** * globals diff --git a/opal/mca/pmix/pmix112/pmix/src/client/pmix_client.c b/opal/mca/pmix/pmix112/pmix/src/client/pmix_client.c index 1bff2bced1..93f72a85d3 100644 --- a/opal/mca/pmix/pmix112/pmix/src/client/pmix_client.c +++ b/opal/mca/pmix/pmix112/pmix/src/client/pmix_client.c @@ -45,6 +45,14 @@ #endif #include PMIX_EVENT_HEADER +#if PMIX_CC_USE_PRAGMA_IDENT +#pragma ident PMIX_VERSION +#elif PMIX_CC_USE_IDENT +#ident PMIX_VERSION +#endif +static const char pmix_version_string[] = PMIX_VERSION; + + #include "src/class/pmix_list.h" #include "src/buffer_ops/buffer_ops.h" #include "src/util/argv.h" diff --git a/opal/mca/pmix/pmix112/pmix1_client.c b/opal/mca/pmix/pmix112/pmix1_client.c index c26dc32436..21d64fc7de 100644 --- a/opal/mca/pmix/pmix112/pmix1_client.c +++ b/opal/mca/pmix/pmix112/pmix1_client.c @@ -36,41 +36,49 @@ static pmix_proc_t my_proc; static char *dbgvalue=NULL; static int errhdler_ref = 0; +static void release_cbfunc(void *cbdata) +{ + pmix1_opalcaddy_t *cd = (pmix1_opalcaddy_t*)cbdata; + OBJ_RELEASE(cd); +} static void myerr(pmix_status_t status, pmix_proc_t procs[], size_t nprocs, pmix_info_t info[], size_t ninfo) { int rc; - opal_list_t plist, ilist; opal_namelist_t *nm; opal_value_t *iptr; size_t n; + pmix1_opalcaddy_t *cd; /* convert the incoming status */ rc = pmix1_convert_rc(status); + /* setup the caddy */ + cd = OBJ_NEW(pmix1_opalcaddy_t); + /* convert the array of procs */ - OBJ_CONSTRUCT(&plist, opal_list_t); for (n=0; n < nprocs; n++) { nm = OBJ_NEW(opal_namelist_t); - nm->name.jobid = strtoul(procs[n].nspace, NULL, 10); + if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { + OPAL_ERROR_LOG(rc); + OBJ_RELEASE(cd); + return; + } nm->name.vpid = procs[n].rank; - opal_list_append(&plist, &nm->super); + opal_list_append(&cd->procs, &nm->super); } /* convert the array of info */ - OBJ_CONSTRUCT(&ilist, opal_list_t); for (n=0; n < ninfo; n++) { iptr = OBJ_NEW(opal_value_t); iptr->key = strdup(info[n].key); pmix1_value_unload(iptr, &info[n].value); - opal_list_append(&plist, &iptr->super); + opal_list_append(&cd->info, &iptr->super); } /* call the base errhandler */ - opal_pmix_base_errhandler(rc, &plist, &ilist); - OPAL_LIST_DESTRUCT(&plist); - OPAL_LIST_DESTRUCT(&ilist); + opal_pmix_base_errhandler(rc, &cd->procs, &cd->info, release_cbfunc, cd); } static void errreg_cbfunc (pmix_status_t status, diff --git a/opal/mca/pmix/pmix112/pmix1_server_north.c b/opal/mca/pmix/pmix112/pmix1_server_north.c index 761cc2a6f5..b4a95740d3 100644 --- a/opal/mca/pmix/pmix112/pmix1_server_north.c +++ b/opal/mca/pmix/pmix112/pmix1_server_north.c @@ -80,11 +80,11 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro static pmix_status_t server_register_events(const pmix_info_t info[], size_t ninfo, pmix_op_cbfunc_t cbfunc, void *cbdata); static pmix_status_t server_deregister_events(const pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata); + pmix_op_cbfunc_t cbfunc, void *cbdata); static pmix_status_t server_listener_fn(int listening_sd, pmix_connection_cbfunc_t cbfunc); -pmix_server_module_t mymodule = { +pmix_server_module_t pmix112_module = { server_client_connected_fn, server_client_finalized_fn, server_abort_fn, @@ -101,7 +101,7 @@ pmix_server_module_t mymodule = { server_listener_fn }; -opal_pmix_server_module_t *host_module = NULL; +opal_pmix_server_module_t *pmix112_host_module = NULL; static void opal_opcbfunc(int status, void *cbdata) @@ -119,7 +119,7 @@ static pmix_status_t server_client_connected_fn(const pmix_proc_t *p, void *serv int rc; opal_process_name_t proc; - if (NULL == host_module || NULL == host_module->client_connected) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->client_connected) { return PMIX_SUCCESS; } @@ -130,7 +130,7 @@ static pmix_status_t server_client_connected_fn(const pmix_proc_t *p, void *serv proc.vpid = p->rank; /* pass it up */ - rc = host_module->client_connected(&proc, server_object); + rc = pmix112_host_module->client_connected(&proc, server_object); return pmix1_convert_opalrc(rc); } @@ -141,7 +141,7 @@ static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* serv pmix1_opalcaddy_t *opalcaddy; opal_process_name_t proc; - if (NULL == host_module || NULL == host_module->client_finalized) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->client_finalized) { return PMIX_SUCCESS; } @@ -157,7 +157,7 @@ static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* serv opalcaddy->cbdata = cbdata; /* pass it up */ - rc = host_module->client_finalized(&proc, server_object, opal_opcbfunc, opalcaddy); + rc = pmix112_host_module->client_finalized(&proc, server_object, opal_opcbfunc, opalcaddy); if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } @@ -175,7 +175,7 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, int rc; pmix1_opalcaddy_t *opalcaddy; - if (NULL == host_module || NULL == host_module->abort) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->abort) { return PMIX_ERR_NOT_SUPPORTED; } @@ -206,7 +206,7 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, } /* pass it up */ - rc = host_module->abort(&proc, server_object, status, msg, + rc = pmix112_host_module->abort(&proc, server_object, status, msg, &opalcaddy->procs, opal_opcbfunc, opalcaddy); if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); @@ -252,7 +252,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, opal_value_t *iptr; int rc; - if (NULL == host_module || NULL == host_module->fence_nb) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->fence_nb) { return PMIX_ERR_NOT_SUPPORTED; } @@ -288,7 +288,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, } /* pass it up */ - rc = host_module->fence_nb(&opalcaddy->procs, &opalcaddy->info, + rc = pmix112_host_module->fence_nb(&opalcaddy->procs, &opalcaddy->info, data, ndata, opmdx_response, opalcaddy); if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); @@ -306,7 +306,7 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, opal_value_t *iptr; size_t n; - if (NULL == host_module || NULL == host_module->direct_modex) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->direct_modex) { return PMIX_ERR_NOT_SUPPORTED; } @@ -337,7 +337,7 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, } /* pass it up */ - rc = host_module->direct_modex(&proc, &opalcaddy->info, opmdx_response, opalcaddy); + rc = pmix112_host_module->direct_modex(&proc, &opalcaddy->info, opmdx_response, opalcaddy); if (OPAL_SUCCESS != rc && OPAL_ERR_IN_PROCESS != rc) { OBJ_RELEASE(opalcaddy); } @@ -357,7 +357,7 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p, opal_process_name_t proc; opal_value_t *oinfo; - if (NULL == host_module || NULL == host_module->publish) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->publish) { return PMIX_ERR_NOT_SUPPORTED; } @@ -388,7 +388,7 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p, } /* pass it up */ - rc = host_module->publish(&proc, &opalcaddy->info, opal_opcbfunc, opalcaddy); + rc = pmix112_host_module->publish(&proc, &opalcaddy->info, opal_opcbfunc, opalcaddy); if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } @@ -436,7 +436,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys, opal_value_t *iptr; size_t n; - if (NULL == host_module || NULL == host_module->lookup) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->lookup) { return PMIX_ERR_NOT_SUPPORTED; } @@ -467,7 +467,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys, } /* pass it up */ - rc = host_module->lookup(&proc, keys, &opalcaddy->info, opal_lkupcbfunc, opalcaddy); + rc = pmix112_host_module->lookup(&proc, keys, &opalcaddy->info, opal_lkupcbfunc, opalcaddy); if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } @@ -486,7 +486,7 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys, opal_value_t *iptr; size_t n; - if (NULL == host_module || NULL == host_module->unpublish) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->unpublish) { return PMIX_SUCCESS; } @@ -517,7 +517,7 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys, } /* pass it up */ - rc = host_module->unpublish(&proc, keys, &opalcaddy->info, opal_opcbfunc, opalcaddy); + rc = pmix112_host_module->unpublish(&proc, keys, &opalcaddy->info, opal_opcbfunc, opalcaddy); if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } @@ -552,7 +552,7 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, size_t k, n; int rc; - if (NULL == host_module || NULL == host_module->spawn) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->spawn) { return PMIX_ERR_NOT_SUPPORTED; } @@ -609,7 +609,7 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, } /* pass it up */ - rc = host_module->spawn(&proc, &opalcaddy->info, &opalcaddy->apps, opal_spncbfunc, opalcaddy); + rc = pmix112_host_module->spawn(&proc, &opalcaddy->info, &opalcaddy->apps, opal_spncbfunc, opalcaddy); if (OPAL_SUCCESS != rc) { OPAL_ERROR_LOG(rc); OBJ_RELEASE(opalcaddy); @@ -629,7 +629,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, size_t n; opal_value_t *oinfo; - if (NULL == host_module || NULL == host_module->connect) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->connect) { return PMIX_ERR_NOT_SUPPORTED; } @@ -665,7 +665,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, } /* pass it up */ - rc = host_module->connect(&opalcaddy->procs, &opalcaddy->info, opal_opcbfunc, opalcaddy); + rc = pmix112_host_module->connect(&opalcaddy->procs, &opalcaddy->info, opal_opcbfunc, opalcaddy); if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } @@ -684,7 +684,7 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro size_t n; opal_value_t *oinfo; - if (NULL == host_module || NULL == host_module->disconnect) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->disconnect) { return PMIX_ERR_NOT_SUPPORTED; } @@ -720,7 +720,7 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro } /* pass it up */ - rc = host_module->disconnect(&opalcaddy->procs, &opalcaddy->info, opal_opcbfunc, opalcaddy); + rc = pmix112_host_module->disconnect(&opalcaddy->procs, &opalcaddy->info, opal_opcbfunc, opalcaddy); if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } @@ -753,7 +753,7 @@ static pmix_status_t server_register_events(const pmix_info_t info[], size_t nin } /* pass it up */ - rc = host_module->register_events(&opalcaddy->info, opal_opcbfunc, opalcaddy); + rc = pmix112_host_module->register_events(&opalcaddy->info, opal_opcbfunc, opalcaddy); if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } @@ -771,10 +771,10 @@ static pmix_status_t server_listener_fn(int listening_sd, { int rc; - if (NULL == host_module || NULL == host_module->listener) { + if (NULL == pmix112_host_module || NULL == pmix112_host_module->listener) { return PMIX_ERR_NOT_SUPPORTED; } - rc = host_module->listener(listening_sd, cbfunc); + rc = pmix112_host_module->listener(listening_sd, cbfunc); return pmix1_convert_opalrc(rc); } diff --git a/opal/mca/pmix/pmix112/pmix1_server_south.c b/opal/mca/pmix/pmix112/pmix1_server_south.c index 09f6991e3f..ba42d1defe 100644 --- a/opal/mca/pmix/pmix112/pmix1_server_south.c +++ b/opal/mca/pmix/pmix112/pmix1_server_south.c @@ -44,46 +44,50 @@ /* These are the interfaces used by the OMPI/ORTE/OPAL layer to call * down into the embedded PMIx server. */ -extern pmix_server_module_t mymodule; -extern opal_pmix_server_module_t *host_module; +extern pmix_server_module_t pmix112_module; +extern opal_pmix_server_module_t *pmix112_host_module; static char *dbgvalue=NULL; static int errhdler_ref = 0; +static void release_cbfunc(void *cbdata) +{ + pmix1_opalcaddy_t *cd = (pmix1_opalcaddy_t*)cbdata; + OBJ_RELEASE(cd); +} static void myerr(pmix_status_t status, pmix_proc_t procs[], size_t nprocs, pmix_info_t info[], size_t ninfo) { int rc; - opal_list_t plist, ilist; opal_namelist_t *nm; opal_value_t *iptr; size_t n; + pmix1_opalcaddy_t *cd; /* convert the incoming status */ rc = pmix1_convert_rc(status); + /* setup the caddy */ + cd = OBJ_NEW(pmix1_opalcaddy_t); + /* convert the array of procs */ - OBJ_CONSTRUCT(&plist, opal_list_t); for (n=0; n < nprocs; n++) { nm = OBJ_NEW(opal_namelist_t); nm->name.jobid = strtoul(procs[n].nspace, NULL, 10); nm->name.vpid = procs[n].rank; - opal_list_append(&plist, &nm->super); + opal_list_append(&cd->procs, &nm->super); } /* convert the array of info */ - OBJ_CONSTRUCT(&ilist, opal_list_t); for (n=0; n < ninfo; n++) { iptr = OBJ_NEW(opal_value_t); iptr->key = strdup(info[n].key); pmix1_value_unload(iptr, &info[n].value); - opal_list_append(&plist, &iptr->super); + opal_list_append(&cd->info, &iptr->super); } /* call the base errhandler */ - opal_pmix_base_errhandler(rc, &plist, &ilist); - OPAL_LIST_DESTRUCT(&plist); - OPAL_LIST_DESTRUCT(&ilist); + opal_pmix_base_errhandler(rc, &cd->procs, &cd->info, release_cbfunc, cd); } static void errreg_cbfunc(pmix_status_t status, @@ -125,14 +129,14 @@ int pmix1_server_init(opal_pmix_server_module_t *module, pinfo = NULL; } - if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) { + if (PMIX_SUCCESS != (rc = PMIx_server_init(&pmix112_module, pinfo, sz))) { PMIX_INFO_FREE(pinfo, sz); return pmix1_convert_rc(rc); } PMIX_INFO_FREE(pinfo, sz); /* record the host module */ - host_module = module; + pmix112_host_module = module; /* register the errhandler */ PMIx_Register_errhandler(NULL, 0, myerr, errreg_cbfunc, NULL); @@ -428,7 +432,7 @@ int pmix1_server_notify_error(int status, rc = pmix1_convert_opalrc(status); rc = PMIx_Notify_error(rc, ps, psz, eps, esz, - pinfo, sz, opcbfunc, op); + pinfo, sz, opcbfunc, op); if (PMIX_SUCCESS != rc) { OBJ_RELEASE(op); } diff --git a/opal/mca/pmix/pmix120/Makefile.am b/opal/mca/pmix/pmix120/Makefile.am new file mode 100644 index 0000000000..c48b0f143c --- /dev/null +++ b/opal/mca/pmix/pmix120/Makefile.am @@ -0,0 +1,51 @@ +# +# Copyright (c) 2014-2015 Intel, Inc. All rights reserved. +# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +EXTRA_DIST = autogen.subdirs + +SUBDIRS = pmix + +sources = \ + pmix120.h \ + pmix_pmix120_component.c \ + pmix_pmix120.c \ + pmix120_client.c \ + pmix120_server_south.c \ + pmix120_server_north.c + +# Make the output library in this directory, and name it either +# mca__.la (for DSO builds) or libmca__.la +# (for static builds). + +if MCA_BUILD_opal_pmix_pmix120_DSO +component_noinst = +component_install = mca_pmix_pmix120.la +else +component_noinst = libmca_pmix_pmix120.la +component_install = +endif + +mcacomponentdir = $(opallibdir) +mcacomponent_LTLIBRARIES = $(component_install) +mca_pmix_pmix120_la_SOURCES = $(sources) +mca_pmix_pmix120_la_CFLAGS = $(opal_pmix_pmix120_CFLAGS) +mca_pmix_pmix120_la_CPPFLAGS = \ + -I$(srcdir)/pmix/include $(opal_pmix_pmix120_CPPFLAGS) +mca_pmix_pmix120_la_LDFLAGS = -module -avoid-version $(opal_pmix_pmix120_LDFLAGS) +mca_pmix_pmix120_la_LIBADD = $(opal_pmix_pmix120_LIBS) + +noinst_LTLIBRARIES = $(component_noinst) +libmca_pmix_pmix120_la_SOURCES =$(sources) +libmca_pmix_pmix120_la_CFLAGS = $(opal_pmix_pmix120_CFLAGS) +libmca_pmix_pmix120_la_CPPFLAGS = -I$(srcdir)/pmix/include $(opal_pmix_pmix120_CPPFLAGS) +libmca_pmix_pmix120_la_LDFLAGS = -module -avoid-version $(opal_pmix_pmix120_LDFLAGS) +libmca_pmix_pmix120_la_LIBADD = $(opal_pmix_pmix120_LIBS) diff --git a/opal/mca/pmix/pmix120/autogen.subdirs b/opal/mca/pmix/pmix120/autogen.subdirs new file mode 100644 index 0000000000..f4fd6e846e --- /dev/null +++ b/opal/mca/pmix/pmix120/autogen.subdirs @@ -0,0 +1 @@ +pmix diff --git a/opal/mca/pmix/pmix120/configure.m4 b/opal/mca/pmix/pmix120/configure.m4 new file mode 100644 index 0000000000..58bc45029c --- /dev/null +++ b/opal/mca/pmix/pmix120/configure.m4 @@ -0,0 +1,82 @@ +# -*- 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-2005 The Regents of the University of California. +# All rights reserved. +# Copyright (c) 2011-2013 Los Alamos National Security, LLC. +# All rights reserved. +# Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2013-2015 Intel, Inc. All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# MCA_pmix_pmix120_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_opal_pmix_pmix120_CONFIG],[ + AC_CONFIG_FILES([opal/mca/pmix/pmix120/Makefile]) + + AS_IF([test "$opal_external_pmix_happy" = "yes"], + [AC_MSG_WARN([using an external pmix; disqualifiying this component]) + opal_pmix_pmix120_happy=0], + + [OPAL_VAR_SCOPE_PUSH([PMIX_VERSION opal_pmix_pmix120_save_CPPFLAGS opal_pmix_pmix120_save_LDFLAGS opal_pmix_pmix120_save_LIBS opal_pmix_pmix120_basedir opal_pmix_pmix120_save_cflags]) + + PMIX_VERSION= + opal_pmix_pmix120_basedir=opal/mca/pmix/pmix120 + + opal_pmix_pmix120_save_CFLAGS=$CFLAGS + opal_pmix_pmix120_save_CPPFLAGS=$CPPFLAGS + opal_pmix_pmix120_save_LDFLAGS=$LDFLAGS + opal_pmix_pmix120_save_LIBS=$LIBS + + opal_pmix_pmix120_args="--enable-embedded-mode --with-pmix-symbol-prefix=opal_pmix_pmix120_ --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\" --with-hwloc-header=\\\"$opal_hwloc_base_include\\\"" + if test "$enable_debug" = "yes"; then + opal_pmix_pmix120_args="--enable-debug $opal_pmix_pmix120_args" + CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g" + else + opal_pmix_pmix120_args="--disable-debug $opal_pmix_pmix120_args" + CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS" + fi + CPPFLAGS="-I$OPAL_TOP_SRCDIR -I$OPAL_TOP_BUILDDIR -I$OPAL_TOP_SRCDIR/opal/include -I$OPAL_TOP_BUILDDIR/opal/include $CPPFLAGS" + + OPAL_CONFIG_SUBDIR([$opal_pmix_pmix120_basedir/pmix], + [$opal_pmix_pmix120_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'], + [opal_pmix_pmix120_happy=1], [opal_pmix_pmix120_happy=0]) + + if test $opal_pmix_pmix120_happy -eq 1; then + PMIX_VERSION="internal v`$srcdir/$opal_pmix_pmix120_basedir/pmix/config/pmix_get_version.sh $srcdir/$opal_pmix_pmix120_basedir/pmix/VERSION`" + # Build flags for our Makefile.am + opal_pmix_pmix120_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_pmix_pmix120_basedir"'/pmix/libpmix.la' + opal_pmix_pmix120_CPPFLAGS='-I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix120/pmix/include/pmix -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix120/pmix/include -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix120/pmix -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix120/pmix' + AC_SUBST([opal_pmix_pmix120_LIBS]) + AC_SUBST([opal_pmix_pmix120_CPPFLAGS]) + fi + + # Finally, add a flag to support static builds + pmix_pmix120_WRAPPER_EXTRA_LIBS=-lpmix + + CFLAGS=$opal_pmix_pmix120_save_CFLAGS + CPPFLAGS=$opal_pmix_pmix120_save_CPPFLAGS + LDFLAGS=$opal_pmix_pmix120_save_LDFLAGS + LIBS=$opal_pmix_pmix120_save_LIBS + ]) + + AS_IF([test $opal_pmix_pmix120_happy -eq 1], + [$1], + [$2]) + + OPAL_VAR_SCOPE_POP +])dnl diff --git a/opal/mca/pmix/pmix120/pmix/AUTHORS b/opal/mca/pmix/pmix120/pmix/AUTHORS new file mode 100644 index 0000000000..c429d324c0 --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/AUTHORS @@ -0,0 +1,30 @@ +PMIx Authors +================ + +The following cumulative list contains the names and GitHub IDs of +all individuals who have committed code to the PMIx repository. + +Email Name Affiliation(s) +------------------------------- --------------------------- ------------------- +alinask Elena Shipunova Mellanox +annu13 Annapurna Dasari Intel +artpol84 Artem Polyakov Mellanox +dsolt Dave Solt IBM +ggouaillardet Gilles Gouaillardet RIST +hjelmn Nathan Hjelm LANL +igor-ivanov Igor Ivanov Mellanox +jladd-mlnx Joshua Ladd Mellanox +jsquyres Jeff Squyres Cisco, IU +nkogteva Nadezhda Kogteva Mellanox +rhc54 Ralph Castain LANL, Cisco, Intel +------------------------------- --------------------------- ------------------- + +Affiliation abbreviations: +-------------------------- +Cisco = Cisco Systems, Inc. +IBM = International Business Machines, Inc. +Intel = Intel, Inc. +IU = Indiana University +LANL = Los Alamos National Laboratory +Mellanox = Mellanox +RIST = Research Organization for Information Science and Technology diff --git a/opal/mca/pmix/pmix120/pmix/INSTALL b/opal/mca/pmix/pmix120/pmix/INSTALL new file mode 100644 index 0000000000..005301463f --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/INSTALL @@ -0,0 +1,88 @@ +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-2015 Cisco Systems, Inc. All rights reserved. +Copyright (c) 2013-2015 Intel, Inc. All rights reserved. +$COPYRIGHT$ + +Additional copyrights may follow + +$HEADER$ + + +For More Information +==================== + +This file is a *very* short overview of building and installing +the PMIx library. Much more information is available on the +PMIx web site (e.g., see the FAQ section): + + http://pmix.github.io/pmix/master + + +Developer Builds +================ + +If you have checked out a DEVELOPER'S COPY of PMIx (i.e., you checked +out from Git), you should read the HACKING file before attempting to +build PMIx. You must then run: + +shell$ ./autogen.sh + +You will need very recent versions of GNU Autoconf, Automake, and +Libtool. If autogen.sh fails, read the HACKING file. If anything +else fails, read the HACKING file. Finally, we suggest reading the +HACKING file. + +*** NOTE: Developer's copies of PMIx typically include a large +performance penalty at run-time because of extra debugging overhead. + + +User Builds +=========== + +Building PMIx is typically a combination of running "configure" +and "make". Execute the following commands to install the PMIx +system from within the directory at the top of the tree: + +shell$ ./configure --prefix=/where/to/install +[...lots of output...] +shell$ make all install + +If you need special access to install, then you can execute "make +all" as a user with write permissions in the build tree, and a +separate "make install" as a user with write permissions to the +install tree. + +Compiling support for specific compilers and environments may +require additional command line flags when running configure. See the +README file for more details. Note that VPATH builds are fully +supported. For example: + +shell$ gtar zxf pmix-X.Y.Z.tar.gz +shell$ cd pmix-X.Y.Z +shell$ mkdir build +shell$ cd build +shell$ ../configure ...your options... +[...lots of output...] +shell$ make all install + +Parallel builds are also supported (although some versions of "make", +such as GNU make, will only use the first target listed on the command +line when executable parallel builds). For example (assume GNU make): + +shell$ make -j 4 all +[...lots of output...] +shell$ make install + +Parallel make is generally only helpful in the build phase; the +installation process is mostly serial and does not benefit much from +parallel make. + diff --git a/opal/mca/pmix/pmix120/pmix/LICENSE b/opal/mca/pmix/pmix120/pmix/LICENSE new file mode 100644 index 0000000000..f9e6f04791 --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/LICENSE @@ -0,0 +1,93 @@ +Most files in this release are marked with the copyrights of the +organizations who have edited them. The copyrights below are in no +particular order and generally reflect members of the Open MPI core +team who have contributed code that may or may not have been ported +to PMIx. Per the terms of that LICENSE, we include the list here. +The copyrights for code used under license from other parties +are included in the corresponding files. + +Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana + University Research and Technology + Corporation. All rights reserved. +Copyright (c) 2004-2010 The University of Tennessee and The University + of Tennessee Research Foundation. All rights + reserved. +Copyright (c) 2004-2010 High Performance Computing Center Stuttgart, + University of Stuttgart. All rights reserved. +Copyright (c) 2004-2008 The Regents of the University of California. + All rights reserved. +Copyright (c) 2006-2010 Los Alamos National Security, LLC. All rights + reserved. +Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved. +Copyright (c) 2006-2010 Voltaire, Inc. All rights reserved. +Copyright (c) 2006-2011 Sandia National Laboratories. All rights reserved. +Copyright (c) 2006-2010 Sun Microsystems, Inc. All rights reserved. + Use is subject to license terms. +Copyright (c) 2006-2010 The University of Houston. All rights reserved. +Copyright (c) 2006-2009 Myricom, Inc. All rights reserved. +Copyright (c) 2007-2008 UT-Battelle, LLC. All rights reserved. +Copyright (c) 2007-2010 IBM Corporation. All rights reserved. +Copyright (c) 1998-2005 Forschungszentrum Juelich, Juelich Supercomputing + Centre, Federal Republic of Germany +Copyright (c) 2005-2008 ZIH, TU Dresden, Federal Republic of Germany +Copyright (c) 2007 Evergrid, Inc. All rights reserved. +Copyright (c) 2008 Chelsio, Inc. All rights reserved. +Copyright (c) 2008-2009 Institut National de Recherche en + Informatique. All rights reserved. +Copyright (c) 2007 Lawrence Livermore National Security, LLC. + All rights reserved. +Copyright (c) 2007-2009 Mellanox Technologies. All rights reserved. +Copyright (c) 2006-2010 QLogic Corporation. All rights reserved. +Copyright (c) 2008-2010 Oak Ridge National Labs. All rights reserved. +Copyright (c) 2006-2010 Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2009 Bull SAS. All rights reserved. +Copyright (c) 2010 ARM ltd. All rights reserved. +Copyright (c) 2010-2011 Alex Brick . All rights reserved. +Copyright (c) 2012 The University of Wisconsin-La Crosse. All rights + reserved. +Copyright (c) 2013-2014 Intel, Inc. All rights reserved. +Copyright (c) 2011-2014 NVIDIA Corporation. All rights reserved. + +$COPYRIGHT$ + +Additional copyrights may follow + +$HEADER$ + +The following LICENSE pertains to both PMIx and any code ported +from Open MPI. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +- Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer listed + in this license in the documentation and/or other materials + provided with the distribution. + +- Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +The copyright holders provide no reassurances that the source code +provided does not infringe any patent, copyright, or any other +intellectual property rights of third parties. The copyright holders +disclaim any liability to any recipient for claims brought against +recipient by any third party for infringement of that parties +intellectual property rights. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/opal/mca/pmix/pmix120/pmix/Makefile.am b/opal/mca/pmix/pmix120/pmix/Makefile.am new file mode 100644 index 0000000000..5891e9c09f --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/Makefile.am @@ -0,0 +1,96 @@ +# +# 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-2009 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) 2006-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. +# Copyright (c) 2013-2015 Intel, Inc. All rights reserved +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# Note that the -I directory must *exactly* match what was specified +# via AC_CONFIG_MACRO_DIR in configure.ac. +ACLOCAL_AMFLAGS = -I ./config + +headers = +sources = +nodist_headers = +EXTRA_DIST = + +# Only install the valgrind suppressions file if we're building in +# standalone mode +dist_pmixdata_DATA = +if ! PMIX_EMBEDDED_MODE +dist_pmixdata_DATA += contrib/pmix-valgrind.supp +endif + +man_MANS = \ + man/man3/pmix_init.3 \ + man/man3/pmix_finalize.3 \ + man/man3/pmix_initialized.3 \ + man/man3/pmix_abort.3 \ + man/man3/pmix_put.3 \ + man/man3/pmix_commit.3 \ + man/man7/pmix.7 \ + man/man7/pmix_constants.7 + +include config/Makefile.am +include include/Makefile.am +include src/class/Makefile.am +include src/include/Makefile.am +include src/buffer_ops/Makefile.am +include src/util/Makefile.am +include src/usock/Makefile.am +include src/client/Makefile.am +include src/server/Makefile.am +include src/sec/Makefile.am +include src/common/Makefile.am + +if PMIX_EMBEDDED_MODE +noinst_LTLIBRARIES = libpmix.la +libpmix_la_SOURCES = $(headers) $(sources) +libpmix_la_LDFLAGS = +else +lib_LTLIBRARIES = libpmix.la +libpmix_la_SOURCES = $(headers) $(sources) +libpmix_la_LDFLAGS = -version-info $(libpmix_so_version) +endif + + +if ! PMIX_EMBEDDED_MODE +SUBDIRS = . test +pmixdir = $(pmixincludedir)/$(subdir) +nobase_pmix_HEADERS = $(headers) +endif + +nroff: + @for file in $(man_MANS); do \ + source=`echo $$file | sed -e 's@/man[0-9]@@'`; \ + contrib/md2nroff.pl --source=$$source.md; \ + done + +EXTRA_DIST += AUTHORS README INSTALL VERSION LICENSE autogen.sh \ + config/pmix_get_version.sh $(man_MANS) \ + contrib/platform/optimized \ + test/test_common.h test/cli_stages.h \ + test/server_callbacks.h test/test_fence.h \ + test/test_publish.h test/test_resolve_peers.h \ + test/test_spawn.h test/utils.h test/test_cd.h \ + examples/client.c examples/dmodex.c examples/dynamic.c \ + examples/fault.c examples/pub.c + + +dist-hook: + env LS_COLORS= sh "$(top_srcdir)/config/distscript.sh" "$(top_srcdir)" "$(distdir)" "$(PMIX_VERSION)" "$(PMIX_REPO_REV)" + diff --git a/opal/mca/pmix/pmix120/pmix/NEWS b/opal/mca/pmix/pmix120/pmix/NEWS new file mode 100644 index 0000000000..5596e5cc4c --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/NEWS @@ -0,0 +1,46 @@ +Copyright (c) 2015 Intel, Inc. All rights reserved. +$COPYRIGHT$ + +Additional copyrights may follow + +$HEADER$ + +=========================================================================== + +This file contains the main features as well as overviews of specific +bug fixes (and other actions) for each version of PMIx since +version 1.0. + +As more fully described in the "Software Version Number" section in +the README file, PMIx typically maintains two separate version +series simultaneously - the current release and one that is locked +to only bug fixes. Since these series are semi-independent of each +other, a single NEWS-worthy item might apply to different series. For +example, a bug might be fixed in the master, and then moved to the +current release as well as the "stable" bug fix release branch. + + +Master (not on release branches yet) +------------------------------------ + + + +1.1.1 +----- +- Fix an issue where the example and test programs + were incorrectly being installed. Thanks to Orion + Poplawski for reporting it + +1.1.0 +----- +- major update of APIs to reflect comments received from 1.0.0 + non-production release +- fixed thread-safety issues +- fixed a range of pack/unpack issues +- added unit tests for all APIs + + +1.0.0 +------ +Initial public release of draft APIs for comment - not production +intended diff --git a/opal/mca/pmix/pmix120/pmix/README b/opal/mca/pmix/pmix120/pmix/README new file mode 100644 index 0000000000..55b7c61f5e --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/README @@ -0,0 +1,315 @@ +Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana + University Research and Technology + Corporation. All rights reserved. +Copyright (c) 2004-2007 The University of Tennessee and The University + of Tennessee Research Foundation. All rights + reserved. +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-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-2015 Intel, Inc. All rights reserved +$COPYRIGHT$ + +Additional copyrights may follow + +$HEADER$ + +=========================================================================== + +When submitting questions and problems, be sure to include as much +extra information as possible. This web page details all the +information that we request in order to provide assistance: + + http://pmix.github.io/master/community/help/ + +The best way to report bugs, send comments, or ask questions is to +sign up on the PMIx mailing list, which is hosted by GoogleGroups: + + 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!). You can subscribe to the list here: + + https://groups.google.com/d/forum/pmix + +Thanks for your time. + +=========================================================================== + +More information is available in the PMIx FAQ: + + http://pmix.github.io/master/faq/ + +We are in early days, so please be patient - info will grow as questions +are addressed. + +=========================================================================== + +The following abbreviated list of release notes applies to this code +base as of this writing (12 November 2015): + +General notes +------------- + +- The majority of PMIx's documentation is here in this file, the + included man pages, and on the web site FAQ + (http://pmix.github.io/master/faq). This will eventually be + supplemented with cohesive installation and user documentation files. + +- Systems that have been tested are: + - Linux (various flavors/distros), 32 bit, with gcc + - Linux (various flavors/distros), 64 bit (x86), with gcc, Intel, + and Portland (*) + - OS X (10.7 and above), 32 and 64 bit (x86_64), with gcc (*) + +(*) Compiler Notes +-------------- + +- The Portland Group compilers prior to version 7.0 require the + "-Msignextend" compiler flag to extend the sign bit when converting + from a shorter to longer integer. This is is different than other + compilers (such as GNU). When compiling PMIx with the Portland + compiler suite, the following flags should be passed to PMIx's + configure script: + + shell$ ./configure CFLAGS=-Msignextend ... + + This will compile PMIx with the proper compile flags + +- Running on nodes with different endian and/or different datatype + sizes within a single parallel job is supported in this release. + However, PMIx does not resize data when datatypes differ in size + (for example, sending a 4 byte double and receiving an 8 byte + double will fail). + + +=========================================================================== + +Building PMIx +----------------- + +PMIx uses a traditional configure script paired with "make" to +build. Typical installs can be of the pattern: + +--------------------------------------------------------------------------- +shell$ ./configure [...options...] +shell$ make all install +--------------------------------------------------------------------------- + +There are many available configure options (see "./configure --help" +for a full list); a summary of the more commonly used ones follows: + +INSTALLATION OPTIONS + +--prefix= + Install PMIx into the base directory named . Hence, + PMIx will place its executables in /bin, its header + files in /include, its libraries in /lib, etc. + +--disable-shared + By default, libpmix is built as a shared library. This switch disables + this default; it is really only useful when used with + --enable-static. Specifically, this option does *not* imply + --enable-static; enabling static libraries and disabling shared + libraries are two independent options. + +--enable-static + Build libpmix as a static library. Note that this option does *not* imply + --disable-shared; enabling static libraries and disabling shared + libraries are two independent options. + +--with-platform=FILE + Load configure options for the build from FILE. Options on the + command line that are not in FILE are also used. Options on the + command line and in FILE are replaced by what is in FILE. + +Once PMIx has been built and installed, it is safe to run "make +clean" and/or remove the entire build tree. + +VPATH and parallel builds are fully supported. + +Generally speaking, the only thing that users need to do to use PMIx +is ensure that /lib is in their LD_LIBRARY_PATH. Users may +need to ensure to set LD_LIBRARY_PATH in their shell setup files (e.g., +.bashrc, .cshrc) so that non-interactive rsh/ssh-based logins will +be able to find the PMIx library. + +=========================================================================== + +PMIx Version Numbers and Binary Compatibility +------------------------------------------------- + +PMIx has two sets of version numbers that are likely of interest +to end users / system administrator: + + * Software version number + * Shared library version numbers + +Both are described below, followed by a discussion of application +binary interface (ABI) compatibility implications. + +Software Version Number +----------------------- + +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). 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. 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. + + * Quantifier: PMIx version numbers sometimes have an arbitrary + string affixed to the end of the version number. Common strings + include: + + o aX: Indicates an alpha release. X is an integer indicating + the number of the alpha release (e.g., v1.2.3a5 indicates the + 5th alpha release of version 1.2.3). + o bX: Indicates a beta release. X is an integer indicating + the number of the beta release (e.g., v1.2.3b3 indicates the 3rd + beta release of version 1.2.3). + o rcX: Indicates a release candidate. X is an integer + indicating the number of the release candidate (e.g., v1.2.3rc4 + indicates the 4th release candidate of version 1.2.3). + +Although the major, minor, and release values (and optional +quantifiers) are reported in PMIx nightly snapshot tarballs, the +filenames of these snapshot tarballs follow a slightly different +convention. + +Specifically, the snapshot tarball filename contains three distinct +values: + + * Most recent Git tag name on the branch from which the tarball was + created. + + * An integer indicating how many Git commits have occurred since + that Git tag. + + * The Git hash of the tip of the branch. + +For example, a snapshot tarball filename of +"pmix-v1.0.2-57-gb9f1fd9.tar.bz2" indicates that this tarball was +created from the v1.0 branch, 57 Git commits after the "v1.0.2" tag, +specifically at Git hash gb9f1fd9. + +PMIx's Git master branch contains a single "dev" tag. For example, +"pmix-dev-8-gf21c349.tar.bz2" represents a snapshot tarball created +from the master branch, 8 Git commits after the "dev" tag, +specifically at Git hash gf21c349. + +The exact value of the "number of Git commits past a tag" integer is +fairly meaningless; its sole purpose is to provide an easy, +human-recognizable ordering for snapshot tarballs. + +Shared Library Version Number +----------------------------- + +PMIx uses the GNU Libtool shared library versioning scheme. + +NOTE: Only official releases of PMIx adhere to this versioning + scheme. "Beta" releases, release candidates, and nightly + tarballs, developer snapshots, and Git snapshot tarballs likely + will all have arbitrary/meaningless shared library version + numbers. + +The GNU Libtool official documentation details how the versioning +scheme works. The quick version is that the shared library versions +are a triple of integers: (current,revision,age), or "c:r:a". This +triple is not related to the PMIx software version number. There +are six simple rules for updating the values (taken almost verbatim +from the Libtool docs): + + 1. Start with version information of "0:0:0" for each shared library. + + 2. Update the version information only immediately before a public + release of your software. More frequent updates are unnecessary, + and only guarantee that the current interface number gets larger + faster. + + 3. If the library source code has changed at all since the last + update, then increment revision ("c:r:a" becomes "c:r+1:a"). + + 4. If any interfaces have been added, removed, or changed since the + last update, increment current, and set revision to 0. + + 5. If any interfaces have been added since the last public release, + then increment age. + + 6. If any interfaces have been removed since the last public release, + then set age to 0. + +Application Binary Interface (ABI) Compatibility +------------------------------------------------ + +PMIx provides forward ABI compatibility in all versions of a given +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 feature +release series. For example, the same pmix application from above +(linked against PMIx v1.3.2 shared libraries) will *not* work with +PMIx v1.5 shared libraries. + +=========================================================================== + +Common Questions +---------------- + +Many common questions about building and using PMIx are answered +on the FAQ: + + http://pmix.github.io/master/faq/ + +=========================================================================== + +Got more questions? +------------------- + +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. This web page details all the +information that we request in order to provide assistance: + + http://pmix.github.io/master/community/help/ + +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: + + https://groups.google.com/d/forum/pmix + +Make today an PMIx day! diff --git a/opal/mca/pmix/pmix120/pmix/VERSION b/opal/mca/pmix/pmix120/pmix/VERSION new file mode 100644 index 0000000000..b1c2150d58 --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/VERSION @@ -0,0 +1,65 @@ +# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. +# Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 NVIDIA Corporation. All rights reserved. +# Copyright (c) 2013 Mellanox Technologies, Inc. +# All rights reserved. +# Copyright (c) 2014-2015 Intel, Inc. 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 +# number string. + +# major, minor, and release are generally combined in the form +# ... + +major=1 +minor=2 +release=0 + +# 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 +# numeric. Common examples include a1 (alpha release 1), b1 or (beta release 1). +# The only requirement is that it must be entirely printable ASCII +# characters and have no white space. + +greek=a1 + +# 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=git843fa89 + +# If tarball_version is not empty, it is used as the version string in +# the tarball filename, regardless of all other versions listed in +# this file. For example, if tarball_version is empty, the tarball +# filename will be of the form +# openmpi-...tar.*. However, if +# tarball_version is not empty, the tarball filename will be of the +# form openmpi-.tar.*. + +tarball_version= + +# The date when this release was created + +date="Dec 08, 2015" + +# The shared library version of each of PMIx's public libraries. +# These versions are maintained in accordance with the "Library +# Interface Versions" chapter from the GNU Libtool documentation. +# All changes in these version numbers are dictated by the PMIx +# release managers (not individual developers). Notes: + +# 1. Since these version numbers are associated with *releases*, the +# version numbers maintained on the PMIx Github trunk (and developer +# branches) is always 0:0:0 for all libraries. + +# 2. The version number of libpmix refers to the public pmix interfaces. +# It does not refer to any internal interfaces. + +# Version numbers are described in the Libtool current:revision:age +# format. + +libpmix_so_version=0:0:0 diff --git a/opal/mca/pmix/pmix120/pmix/autogen.sh b/opal/mca/pmix/pmix120/pmix/autogen.sh new file mode 100755 index 0000000000..b5b509eac8 --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/autogen.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# Run all the rest of the Autotools +echo "==> Running autoreconf"; +autoreconf ${autoreconf_args:-"-ivf"} diff --git a/opal/mca/pmix/pmix120/pmix/config/Makefile.am b/opal/mca/pmix/pmix120/pmix/config/Makefile.am new file mode 100644 index 0000000000..7c81a54740 --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/Makefile.am @@ -0,0 +1,50 @@ +# PMIx copyrights: +# Copyright (c) 2013-2015 Intel, Inc. All rights reserved +# +######################### +# +# Copyright (c) 2004-2006 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) 2006-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Oracle and/or its affiliates. All rights +# reserved. +######################### +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +EXTRA_DIST += \ + config/c_get_alignment.m4 \ + config/pmix_get_version.sh \ + config/distscript.sh \ + config/pmix_check_attributes.m4 \ + config/pmix_check_broken_qsort.m4 \ + config/pmix_check_compiler_version.m4 \ + config/pmix_check_ident.m4 \ + config/pmix_check_munge.m4 \ + config/pmix_check_package.m4 \ + config/pmix_check_sasl.m4 \ + config/pmix_check_vendor.m4 \ + config/pmix_check_visibility.m4 \ + config/pmix_ensure_contains_optflags.m4 \ + config/pmix_functions.m4 \ + config/pmix.m4 \ + config/pmix_search_libs.m4 \ + config/pmix_setup_cc.m4 \ + config/pmix_setup_hwloc.m4 \ + config/pmix_setup_libevent.m4 + + +maintainer-clean-local: + rm -f config/pmix_get_version.sh diff --git a/opal/mca/pmix/pmix120/pmix/config/c_get_alignment.m4 b/opal/mca/pmix/pmix120/pmix/config/c_get_alignment.m4 new file mode 100644 index 0000000000..db37910099 --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/c_get_alignment.m4 @@ -0,0 +1,72 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +dnl University Research and Technology +dnl Corporation. All rights reserved. +dnl Copyright (c) 2004-2005 The University of Tennessee and The University +dnl of Tennessee Research Foundation. All rights +dnl reserved. +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) 2009 Sun Microsystems, Inc. All rights reserved. +dnl Copyright (c) 2014-2015 Intel, Inc. All rights reserved. +dnl Copyright (c) 2015 Research Organization for Information Science +dnl and Technology (RIST). All rights reserved. +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl + +# PMIX_C_GET_ALIGN(type, config_var) +# ---------------------------------- +# Determine datatype alignment. +# First arg is type, 2nd arg is config var to define. +# Now that we require C99 compilers, we include stdbool.h +# in the alignment test so that we can find the definition +# of "bool" when we test for its alignment. We might be able +# to avoid this if we test for alignment of _Bool, but +# since we use "bool" in the code, let's be safe and check +# what we use. Yes, they should be the same - but "should" and +# "are" frequently differ +AC_DEFUN([PMIX_C_GET_ALIGNMENT],[ + AC_CACHE_CHECK([alignment of $1], + [AS_TR_SH([pmix_cv_c_align_$1])], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT + #include ], +[[ + struct foo { char c; $1 x; }; + struct foo *p = (struct foo *) malloc(sizeof(struct foo)); + int diff; + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + diff = ((char *)&p->x) - ((char *)&p->c); + fprintf(f, "%d\n", (diff >= 0) ? diff : -diff); +]])], [AS_TR_SH([pmix_cv_c_align_$1])=`cat conftestval`], + [AC_MSG_WARN([*** Problem running configure test!]) + AC_MSG_WARN([*** See config.log for details.]) + AC_MSG_ERROR([*** Cannot continue.])], + [ # cross compile - do a non-executable test. Trick + # taken from the Autoconf 2.59c. Switch to using + # AC_CHECK_ALIGNOF when we can require Autoconf 2.60. + _AC_COMPUTE_INT([(long int) offsetof (pmix__type_alignof_, y)], + [AS_TR_SH([pmix_cv_c_align_$1])], + [AC_INCLUDES_DEFAULT +#include + +#ifndef offsetof +# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0) +#endif +typedef struct { char x; $1 y; } pmix__type_alignof_; +], + [AC_MSG_WARN([*** Problem running configure test!]) + AC_MSG_WARN([*** See config.log for details.]) + AC_MSG_ERROR([*** Cannot continue.])])])]) + +AC_DEFINE_UNQUOTED([$2], [$AS_TR_SH([pmix_cv_c_align_$1])], [Alignment of type $1]) +eval "$2=$AS_TR_SH([pmix_cv_c_align_$1])" + +rm -rf conftest* ]) dnl diff --git a/opal/mca/pmix/pmix120/pmix/config/distscript.sh b/opal/mca/pmix/pmix120/pmix/config/distscript.sh new file mode 100755 index 0000000000..fbb37a7871 --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/distscript.sh @@ -0,0 +1,56 @@ +#!/bin/sh +# +# 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) 2009-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. +# Copyright (c) 2015 Los Alamos National Security, LLC. All rights +# reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +srcdir=$1 +builddir=$PWD +distdir=$builddir/$2 +PMIX_REPO_REV=$3 + +if test x"$2" = x ; then + echo "*** ERROR: Must supply relative distdir as argv[2] -- aborting" + exit 1 +elif test ! -d "$distdir" ; then + echo "*** ERROR: dist dir does not exist" + echo "*** ERROR: $distdir" + exit 1 +fi + +# We can catch some hard (but possible) to do mistakes by looking at +# our repo's revision, but only if we are in the source tree. +# Otherwise, use what configure told us, at the cost of allowing one +# or two corner cases in (but otherwise VPATH builds won't work). +repo_rev=$PMIX_REPO_REV +if test -d .git ; then + repo_rev=$(config/pmix_get_version.sh VERSION --repo-rev) +fi + +# +# Update VERSION:repo_rev with the best value we have. +# +perl -pi -e 's/^repo_rev=.*/repo_rev='$repo_rev'/' -- "${distdir}/VERSION" +# need to reset the timestamp to not annoy AM dependencies +touch -r "${srcdir}/VERSION" "${distdir}/VERSION" + +echo "*** Updated VERSION file with repo rev: $repo_rev" +echo "*** (via dist-hook / config/distscript.sh)" diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix.m4 new file mode 100644 index 0000000000..4c2e757f4b --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix.m4 @@ -0,0 +1,767 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana +dnl University Research and Technology +dnl Corporation. All rights reserved. +dnl Copyright (c) 2004-2005 The University of Tennessee and The University +dnl of Tennessee Research Foundation. All rights +dnl reserved. +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) 2006-2015 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. +dnl Copyright (c) 2009 IBM Corporation. All rights reserved. +dnl Copyright (c) 2009 Los Alamos National Security, LLC. All rights +dnl reserved. +dnl Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved. +dnl Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved. +dnl Copyright (c) 2013-2015 Intel, Inc. All rights reserved +dnl Copyright (c) 2015 Research Organization for Information Science +dnl and Technology (RIST). All rights reserved. +dnl +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl + +AC_DEFUN([PMIX_SETUP_CORE],[ + + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([AC_CANONICAL_TARGET]) + AC_REQUIRE([AC_PROG_CC]) + + # If no prefix was defined, set a good value + m4_ifval([$1], + [m4_define([pmix_config_prefix],[$1/])], + [m4_define([pmix_config_prefix], [])]) + + # Get pmix's absolute top builddir (which may not be the same as + # the real $top_builddir) + PMIX_startdir=`pwd` + if test x"pmix_config_prefix" != "x" && test ! -d "pmix_config_prefix"; then + mkdir -p "pmix_config_prefix" + fi + if test x"pmix_config_prefix" != "x"; then + cd "pmix_config_prefix" + fi + PMIX_top_builddir=`pwd` + AC_SUBST(PMIX_top_builddir) + + # Get pmix's absolute top srcdir (which may not be the same as the + # real $top_srcdir. First, go back to the startdir incase the + # $srcdir is relative. + + cd "$PMIX_startdir" + cd "$srcdir"/pmix_config_prefix + PMIX_top_srcdir="`pwd`" + AC_SUBST(PMIX_top_srcdir) + + # Go back to where we started + cd "$PMIX_startdir" + + AC_MSG_NOTICE([pmix builddir: $PMIX_top_builddir]) + AC_MSG_NOTICE([pmix srcdir: $PMIX_top_srcdir]) + if test "$PMIX_top_builddir" != "$PMIX_top_srcdir"; then + AC_MSG_NOTICE([Detected VPATH build]) + fi + + # Get the version of pmix that we are installing + AC_MSG_CHECKING([for pmix version]) + PMIX_VERSION="`$PMIX_top_srcdir/config/pmix_get_version.sh $PMIX_top_srcdir/VERSION`" + if test "$?" != "0"; then + AC_MSG_ERROR([Cannot continue]) + fi + PMIX_RELEASE_DATE="`$PMIX_top_srcdir/config/pmix_get_version.sh $PMIX_top_srcdir/VERSION --release-date`" + AC_SUBST(PMIX_VERSION) + AC_DEFINE_UNQUOTED([PMIX_VERSION], ["$PMIX_VERSION"], + [The library version is always available, contrary to VERSION]) + AC_SUBST(PMIX_RELEASE_DATE) + AC_MSG_RESULT([$PMIX_VERSION]) + + # Debug mode? + AC_MSG_CHECKING([if want pmix maintainer support]) + pmix_debug= + AS_IF([test "$pmix_debug" = "" && test "$enable_debug" = "yes"], + [pmix_debug=1 + pmix_debug_msg="enabled"]) + AS_IF([test "$pmix_debug" = ""], + [pmix_debug=0 + pmix_debug_msg="disabled"]) + # Grr; we use #ifndef for PMIX_DEBUG! :-( + AH_TEMPLATE(PMIX_ENABLE_DEBUG, [Whether we are in debugging mode or not]) + AS_IF([test "$pmix_debug" = "1"], [AC_DEFINE([PMIX_ENABLE_DEBUG])]) + AC_MSG_RESULT([$pmix_debug_msg]) + + AC_MSG_CHECKING([for pmix directory prefix]) + AC_MSG_RESULT(m4_ifval([$1], pmix_config_prefix, [(none)])) + + # Note that private/config.h *MUST* be listed first so that it + # becomes the "main" config header file. Any AC-CONFIG-HEADERS + # after that (pmix/config.h) will only have selective #defines + # replaced, not the entire file. + AC_CONFIG_HEADERS(pmix_config_prefix[include/private/autogen/config.h]) + AC_CONFIG_HEADERS(pmix_config_prefix[include/pmix/autogen/config.h]) + + # What prefix are we using? + AC_MSG_CHECKING([for pmix symbol prefix]) + AS_IF([test "$pmix_symbol_prefix_value" = ""], + [AS_IF([test "$with_pmix_symbol_prefix" = ""], + [pmix_symbol_prefix_value=pmix_], + [pmix_symbol_prefix_value=$with_pmix_symbol_prefix])]) + AC_DEFINE_UNQUOTED(PMIX_SYM_PREFIX, [$pmix_symbol_prefix_value], + [The pmix symbol prefix]) + # Ensure to [] escape the whole next line so that we can get the + # proper tr tokens + [pmix_symbol_prefix_value_caps="`echo $pmix_symbol_prefix_value | tr '[:lower:]' '[:upper:]'`"] + AC_DEFINE_UNQUOTED(PMIX_SYM_PREFIX_CAPS, [$pmix_symbol_prefix_value_caps], + [The pmix symbol prefix in all caps]) + AC_MSG_RESULT([$pmix_symbol_prefix_value]) + + # Give an easy #define to know if we need to transform all the + # pmix names + AH_TEMPLATE([PMIX_SYM_TRANSFORM], [Whether we need to re-define all the pmix public symbols or not]) + AS_IF([test "$pmix_symbol_prefix_value" = "pmix_"], + [AC_DEFINE([PMIX_SYM_TRANSFORM], [0])], + [AC_DEFINE([PMIX_SYM_TRANSFORM], [1])]) + + # GCC specifics. + if test "x$GCC" = "xyes"; then + PMIX_GCC_CFLAGS="-Wall -Wmissing-prototypes -Wundef" + PMIX_GCC_CFLAGS="$PMIX_GCC_CFLAGS -Wpointer-arith -Wcast-align" + fi + + ############################################################################ + # Check for compilers and preprocessors + ############################################################################ + pmix_show_title "Compiler and preprocessor tests" + + # + # Check for some types + # + + AC_CHECK_TYPES(int8_t) + AC_CHECK_TYPES(uint8_t) + AC_CHECK_TYPES(int16_t) + AC_CHECK_TYPES(uint16_t) + AC_CHECK_TYPES(int32_t) + AC_CHECK_TYPES(uint32_t) + AC_CHECK_TYPES(int64_t) + AC_CHECK_TYPES(uint64_t) + AC_CHECK_TYPES(long long) + + AC_CHECK_TYPES(intptr_t) + AC_CHECK_TYPES(uintptr_t) + AC_CHECK_TYPES(ptrdiff_t) + + # + # Check for type sizes + # + + AC_CHECK_SIZEOF(_Bool) + AC_CHECK_SIZEOF(char) + AC_CHECK_SIZEOF(short) + AC_CHECK_SIZEOF(int) + AC_CHECK_SIZEOF(long) + if test "$ac_cv_type_long_long" = yes; then + AC_CHECK_SIZEOF(long long) + fi + AC_CHECK_SIZEOF(float) + AC_CHECK_SIZEOF(double) + + AC_CHECK_SIZEOF(void *) + AC_CHECK_SIZEOF(size_t) + if test "$ac_cv_type_ssize_t" = yes ; then + AC_CHECK_SIZEOF(ssize_t) + fi + if test "$ac_cv_type_ptrdiff_t" = yes; then + AC_CHECK_SIZEOF(ptrdiff_t) + fi + AC_CHECK_SIZEOF(wchar_t) + + AC_CHECK_SIZEOF(pid_t) + + # + # Check for type alignments + # + + PMIX_C_GET_ALIGNMENT(bool, PMIX_ALIGNMENT_BOOL) + PMIX_C_GET_ALIGNMENT(int8_t, PMIX_ALIGNMENT_INT8) + PMIX_C_GET_ALIGNMENT(int16_t, PMIX_ALIGNMENT_INT16) + PMIX_C_GET_ALIGNMENT(int32_t, PMIX_ALIGNMENT_INT32) + PMIX_C_GET_ALIGNMENT(int64_t, PMIX_ALIGNMENT_INT64) + PMIX_C_GET_ALIGNMENT(char, PMIX_ALIGNMENT_CHAR) + PMIX_C_GET_ALIGNMENT(short, PMIX_ALIGNMENT_SHORT) + PMIX_C_GET_ALIGNMENT(wchar_t, PMIX_ALIGNMENT_WCHAR) + PMIX_C_GET_ALIGNMENT(int, PMIX_ALIGNMENT_INT) + PMIX_C_GET_ALIGNMENT(long, PMIX_ALIGNMENT_LONG) + if test "$ac_cv_type_long_long" = yes; then + PMIX_C_GET_ALIGNMENT(long long, PMIX_ALIGNMENT_LONG_LONG) + fi + PMIX_C_GET_ALIGNMENT(float, PMIX_ALIGNMENT_FLOAT) + PMIX_C_GET_ALIGNMENT(double, PMIX_ALIGNMENT_DOUBLE) + if test "$ac_cv_type_long_double" = yes; then + PMIX_C_GET_ALIGNMENT(long double, PMIX_ALIGNMENT_LONG_DOUBLE) + fi + PMIX_C_GET_ALIGNMENT(void *, PMIX_ALIGNMENT_VOID_P) + PMIX_C_GET_ALIGNMENT(size_t, PMIX_ALIGNMENT_SIZE_T) + + + # + # Does the C compiler native support "bool"? (i.e., without + # or any other help) + # + + PMIX_VAR_SCOPE_PUSH([MSG]) + AC_MSG_CHECKING(for C bool type) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + AC_INCLUDES_DEFAULT], + [[bool bar, foo = true; bar = foo;]])], + [PMIX_NEED_C_BOOL=0 MSG=yes],[PMIX_NEED_C_BOOL=1 MSG=no]) + AC_DEFINE_UNQUOTED(PMIX_NEED_C_BOOL, $PMIX_NEED_C_BOOL, + [Whether the C compiler supports "bool" without any other help (such as )]) + AC_MSG_RESULT([$MSG]) + AC_CHECK_SIZEOF(_Bool) + PMIX_VAR_SCOPE_POP + + # + # Check for other compiler characteristics + # + + PMIX_VAR_SCOPE_PUSH([PMIX_CFLAGS_save]) + if test "$GCC" = "yes"; then + + # gcc 2.96 will emit oodles of warnings if you use "inline" with + # -pedantic (which we do in developer builds). However, + # "__inline__" is ok. So we have to force gcc to select the + # right one. If you use -pedantic, the AC_C_INLINE test will fail + # (because it names a function foo() -- without the (void)). So + # we turn off all the picky flags, turn on -ansi mode (which is + # implied by -pedantic), and set warnings to be errors. Hence, + # this does the following (for 2.96): + # + # - causes the check for "inline" to emit a warning, which then + # fails + # - checks for __inline__, which then emits no error, and works + # + # This also works nicely for gcc 3.x because "inline" will work on + # the first check, and all is fine. :-) + + PMIX_CFLAGS_save=$CFLAGS + CFLAGS="$PMIX_CFLAGS_BEFORE_PICKY -Werror -ansi" + fi + AC_C_INLINE + if test "$GCC" = "yes"; then + CFLAGS=$PMIX_CFLAGS_save + fi + PMIX_VAR_SCOPE_POP + + if test "x$CC" = "xicc"; then + PMIX_CHECK_ICC_VARARGS + fi + + + ################################## + # Only after setting up + # C do we check compiler attributes. + ################################## + + pmix_show_subtitle "Compiler characteristics" + + PMIX_CHECK_ATTRIBUTES + PMIX_CHECK_COMPILER_VERSION_ID + + ################################## + # Header files + ################################## + + pmix_show_title "Header file tests" + + AC_CHECK_HEADERS([arpa/inet.h \ + fcntl.h inttypes.h libgen.h \ + netinet/in.h \ + stdint.h stddef.h \ + stdlib.h string.h strings.h \ + sys/param.h \ + sys/select.h sys/socket.h \ + stdarg.h sys/stat.h sys/time.h \ + sys/types.h sys/un.h sys/uio.h net/uio.h \ + sys/wait.h syslog.h \ + time.h unistd.h \ + crt_externs.h signal.h \ + ioLib.h sockLib.h hostLib.h limits.h]) + + # Note that sometimes we have , but it doesn't work (e.g., + # have both Portland and GNU installed; using pgcc will find GNU's + # , which all it does -- by standard -- is define "bool" to + # "_Bool" [see + # http://www.opengroup.org/onlinepubs/009695399/basedefs/stdbool.h.html], + # and Portland has no idea what to do with _Bool). + + # So first figure out if we have (i.e., check the value of + # the macro HAVE_STDBOOL_H from the result of AC_CHECK_HEADERS, + # above). If we do have it, then check to see if it actually works. + # Define PMIX_USE_STDBOOL_H as approrpaite. + AC_CHECK_HEADERS([stdbool.h], [have_stdbool_h=1], [have_stdbool_h=0]) + AC_MSG_CHECKING([if works]) + if test "$have_stdbool_h" = "1"; then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT[ + #if HAVE_STDBOOL_H + #include + #endif + ]], + [[bool bar, foo = true; bar = foo;]])], + [PMIX_USE_STDBOOL_H=1 MSG=yes],[PMIX_USE_STDBOOL_H=0 MSG=no]) + else + PMIX_USE_STDBOOL_H=0 + MSG="no (don't have )" + fi + AC_DEFINE_UNQUOTED(PMIX_USE_STDBOOL_H, $PMIX_USE_STDBOOL_H, + [Whether to use or not]) + AC_MSG_RESULT([$MSG]) + + # checkpoint results + AC_CACHE_SAVE + + ################################## + # Types + ################################## + + pmix_show_title "Type tests" + + AC_CHECK_TYPES([socklen_t, struct sockaddr_in, struct sockaddr_un, + struct sockaddr_in6, struct sockaddr_storage], + [], [], [AC_INCLUDES_DEFAULT + #if HAVE_SYS_SOCKET_H + #include + #endif + #if HAVE_SYS_UN_H + #include + #endif + #ifdef HAVE_NETINET_IN_H + #include + #endif + ]) + + AC_CHECK_DECLS([AF_UNSPEC, PF_UNSPEC, AF_INET6, PF_INET6], + [], [], [AC_INCLUDES_DEFAULT + #if HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_NETINET_IN_H + #include + #endif + ]) + + # SA_RESTART in signal.h + PMIX_VAR_SCOPE_PUSH([MSG2]) + AC_MSG_CHECKING([if SA_RESTART defined in signal.h]) + AC_EGREP_CPP(yes, [ + #include + #ifdef SA_RESTART + yes + #endif + ], [MSG2=yes VALUE=1], [MSG2=no VALUE=0]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_SA_RESTART, $VALUE, + [Whether we have SA_RESTART in or not]) + AC_MSG_RESULT([$MSG2]) + PMIX_VAR_SCOPE_POP + + AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [ + #include + #if HAVE_SYS_SOCKET_H + #include + #endif + ]) + + AC_CHECK_MEMBERS([struct dirent.d_type], [], [], [ + #include + #include ]) + + AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#include ]) + AC_CHECK_MEMBERS([siginfo_t.si_band],,,[#include ]) + + # + # Checks for struct member names in struct statfs + # + AC_CHECK_MEMBERS([struct statfs.f_type], [], [], [ + AC_INCLUDES_DEFAULT + #ifdef HAVE_SYS_VFS_H + #include + #endif + #ifdef HAVE_SYS_STATFS_H + #include + #endif + ]) + + AC_CHECK_MEMBERS([struct statfs.f_fstypename], [], [], [ + AC_INCLUDES_DEFAULT + #ifdef HAVE_SYS_PARAM_H + #include + #endif + #ifdef HAVE_SYS_MOUNT_H + #include + #endif + #ifdef HAVE_SYS_VFS_H + #include + #endif + #ifdef HAVE_SYS_STATFS_H + #include + #endif + ]) + + # + # Checks for struct member names in struct statvfs + # + AC_CHECK_MEMBERS([struct statvfs.f_basetype], [], [], [ + AC_INCLUDES_DEFAULT + #ifdef HAVE_SYS_STATVFS_H + #include + #endif + ]) + + AC_CHECK_MEMBERS([struct statvfs.f_fstypename], [], [], [ + AC_INCLUDES_DEFAULT + #ifdef HAVE_SYS_STATVFS_H + #include + #endif + ]) + + # + # Check for ptrdiff type. Yes, there are platforms where + # sizeof(void*) != sizeof(long) (64 bit Windows, apparently). + # + AC_MSG_CHECKING([for pointer diff type]) + if test $ac_cv_type_ptrdiff_t = yes ; then + pmix_ptrdiff_t="ptrdiff_t" + pmix_ptrdiff_size=$ac_cv_sizeof_ptrdiff_t + elif test $ac_cv_sizeof_void_p -eq $ac_cv_sizeof_long ; then + pmix_ptrdiff_t="long" + pmix_ptrdiff_size=$ac_cv_sizeof_long + elif test $ac_cv_type_long_long = yes && test $ac_cv_sizeof_void_p -eq $ac_cv_sizeof_long_long ; then + pmix_ptrdiff_t="long long" + pmix_ptrdiff_size=$ac_cv_sizeof_long_long + #else + # AC_MSG_ERROR([Could not find datatype to emulate ptrdiff_t. Cannot continue]) + fi + AC_DEFINE_UNQUOTED([PMIX_PTRDIFF_TYPE], [$pmix_ptrdiff_t], + [type to use for ptrdiff_t]) + AC_MSG_RESULT([$pmix_ptrdiff_t (size: $pmix_ptrdiff_size)]) + + ################################## + # Libraries + ################################## + + pmix_show_title "Library and Function tests" + + PMIX_SEARCH_LIBS_CORE([socket], [socket]) + + # IRIX and CentOS have dirname in -lgen, usually in libc + PMIX_SEARCH_LIBS_CORE([dirname], [gen]) + + # Darwin doesn't need -lm, as it's a symlink to libSystem.dylib + PMIX_SEARCH_LIBS_CORE([ceil], [m]) + + AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strsignal socketpair strncpy_s usleep]) + + # 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 + # the magic glibc foo as not implemented. and on other systems, it's + # just not there. This covers all cases. + AC_CACHE_CHECK([for htonl define], + [ompi_cv_htonl_define], + [AC_PREPROC_IFELSE([AC_LANG_PROGRAM([ + #ifdef HAVE_SYS_TYPES_H + #include + #endif + #ifdef HAVE_NETINET_IN_H + #include + #endif + #ifdef HAVE_ARPA_INET_H + #include + #endif],[ + #ifndef ntohl + #error "ntohl not defined" + #endif + ])], [ompi_cv_htonl_define=yes], [ompi_cv_htonl_define=no])]) + AC_CHECK_FUNC([htonl], [ompi_have_htonl=yes], [ompi_have_htonl=no]) + AS_IF([test "$ompi_cv_htonl_define" = "yes" || test "$ompi_have_htonl" = "yes"], + [AC_DEFINE_UNQUOTED([HAVE_UNIX_BYTESWAP], [1], + [whether unix byteswap routines -- htonl, htons, nothl, ntohs -- are available])]) + + # + # Make sure we can copy va_lists (need check declared, not linkable) + # + + AC_CHECK_DECL(va_copy, PMIX_HAVE_VA_COPY=1, PMIX_HAVE_VA_COPY=0, + [#include ]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_VA_COPY, $PMIX_HAVE_VA_COPY, + [Whether we have va_copy or not]) + + AC_CHECK_DECL(__va_copy, PMIX_HAVE_UNDERSCORE_VA_COPY=1, + PMIX_HAVE_UNDERSCORE_VA_COPY=0, [#include ]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_UNDERSCORE_VA_COPY, $PMIX_HAVE_UNDERSCORE_VA_COPY, + [Whether we have __va_copy or not]) + + AC_CHECK_DECLS(__func__) + + # checkpoint results + AC_CACHE_SAVE + + ################################## + # System-specific tests + ################################## + + pmix_show_title "System-specific tests" + + AC_C_BIGENDIAN + PMIX_CHECK_BROKEN_QSORT + + ################################## + # Visibility + ################################## + + # Check the visibility declspec at the end to avoid problem with + # the previous tests that are not necessarily prepared for + # the visibility feature. + pmix_show_title "Symbol visibility feature" + + PMIX_CHECK_VISIBILITY + + ################################## + # Libevent + ################################## + pmix_show_title "Libevent" + + PMIX_LIBEVENT_CONFIG + + ################################## + # HWLOC + ################################## + pmix_show_title "HWLOC" + + PMIX_HWLOC_CONFIG + + ################################## + # SASL + ################################## + pmix_show_title "SASL" + + PMIX_SASL_CONFIG + + ################################## + # Munge + ################################## + pmix_show_title "Munge" + + PMIX_MUNGE_CONFIG + + ############################################################################ + # final compiler config + ############################################################################ + + pmix_show_subtitle "Set path-related compiler flags" + + # + # This is needed for VPATH builds, so that it will -I the appropriate + # include directory. We delayed doing it until now just so that + # '-I$(top_srcdir)' doesn't show up in any of the configure output -- + # purely aesthetic. + # + # Because pmix_config.h is created by AC_CONFIG_HEADERS, we + # don't need to -I the builddir for pmix/include. However, if we + # are VPATH building, we do need to include the source directories. + # + if test "$PMIX_top_builddir" != "$PMIX_top_srcdir"; then + # Note the embedded m4 directives here -- we must embed them + # rather than have successive assignments to these shell + # variables, lest the $(foo) names try to get evaluated here. + # Yuck! + CPPFLAGS='-I$(PMIX_top_srcdir) -I$(PMIX_top_builddir) -I$(PMIX_top_srcdir)/src -I$(PMIX_top_srcdir)/include -I$(PMIX_top_builddir)/include'" $CPPFLAGS" + else + CPPFLAGS='-I$(PMIX_top_srcdir) -I$(PMIX_top_srcdir)/src -I$(PMIX_top_srcdir)/include'" $CPPFLAGS" + fi + + # pmixdatadir, pmixlibdir, and pmixinclude are essentially the same as + # pkg*dir, but will always be */pmix. + pmixdatadir='${datadir}/pmix' + pmixlibdir='${libdir}/pmix' + pmixincludedir='${includedir}/pmix' + AC_SUBST(pmixdatadir) + AC_SUBST(pmixlibdir) + AC_SUBST(pmixincludedir) + + ############################################################################ + # final output + ############################################################################ + + pmix_show_subtitle "Final output" + + AC_CONFIG_FILES(pmix_config_prefix[Makefile]) + + # Success + $2 +])dnl + +AC_DEFUN([PMIX_DEFINE_ARGS],[ + # Embedded mode, or standalone? + AC_ARG_ENABLE([embedded-mode], + [AC_HELP_STRING([--enable-embedded-mode], + [Using --enable-embedded-mode causes PMIx to skip a few configure checks and install nothing. It should only be used when building PMIx within the scope of a larger package.])]) + AS_IF([test ! -z "$enable_embedded_mode" && test "$enable_embedded_mode" = "yes"], + [pmix_mode=embedded], + [pmix_mode=standalone]) + + # Change the symbol prefix? + AC_ARG_WITH([pmix-symbol-prefix], + AC_HELP_STRING([--with-pmix-symbol-prefix=STRING], + [STRING can be any valid C symbol name. It will be prefixed to all public PMIx symbols. Default: "pmix_"])) + +# +# Is this a developer copy? +# + +if test -d .git; then + PMIX_DEVEL=1 +else + PMIX_DEVEL=0 +fi + + +# +# Developer picky compiler options +# + +AC_MSG_CHECKING([if want developer-level compiler pickyness]) +AC_ARG_ENABLE(picky, + AC_HELP_STRING([--enable-picky], + [enable developer-level compiler pickyness when building PMIx (default: disabled)])) +if test "$enable_picky" = "yes"; then + AC_MSG_RESULT([yes]) + WANT_PICKY_COMPILER=1 +else + AC_MSG_RESULT([no]) + WANT_PICKY_COMPILER=0 +fi +#################### Early development override #################### +if test "$WANT_PICKY_COMPILER" = "0" && test -z "$enable_picky" && test "$PMIX_DEVEL" = "1"; then + WANT_PICKY_COMPILER=1 + echo "--> developer override: enable picky compiler by default" +fi +#################### Early development override #################### + +# +# Developer debugging +# + +AC_MSG_CHECKING([if want developer-level debugging code]) +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug], + [enable developer-level debugging code (not for general PMIx users!) (default: disabled)])) +if test "$enable_debug" = "yes"; then + AC_MSG_RESULT([yes]) + WANT_DEBUG=1 +else + AC_MSG_RESULT([no]) + WANT_DEBUG=0 +fi +#################### Early development override #################### +if test "$WANT_DEBUG" = "0" && test -z "$enable_debug" && test "$PMIX_DEVEL" = "1"; then + WANT_DEBUG=1 + echo "--> developer override: enable debugging code by default" +fi +#################### Early development override #################### +if test "$WANT_DEBUG" = "0"; then + CFLAGS="-DNDEBUG $CFLAGS" + CXXFLAGS="-DNDEBUG $CXXFLAGS" +fi +AC_DEFINE_UNQUOTED(PMIX_ENABLE_DEBUG, $WANT_DEBUG, + [Whether we want developer-level debugging code or not]) + +AC_ARG_ENABLE(debug-symbols, + AC_HELP_STRING([--disable-debug-symbols], + [Disable adding compiler flags to enable debugging symbols if --enable-debug is specified. For non-debugging builds, this flag has no effect.])) + +# +# Do we want the pretty-print stack trace feature? +# + +AC_MSG_CHECKING([if want pretty-print stacktrace]) +AC_ARG_ENABLE([pretty-print-stacktrace], + [AC_HELP_STRING([--enable-pretty-print-stacktrace], + [Pretty print stacktrace on process signal (default: enabled)])]) +if test "$enable_pretty_print_stacktrace" = "no" ; then + AC_MSG_RESULT([no]) + WANT_PRETTY_PRINT_STACKTRACE=0 +else + AC_MSG_RESULT([yes]) + WANT_PRETTY_PRINT_STACKTRACE=1 +fi +AC_DEFINE_UNQUOTED([PMIX_WANT_PRETTY_PRINT_STACKTRACE], + [$WANT_PRETTY_PRINT_STACKTRACE], + [if want pretty-print stack trace feature]) + +# +# Ident string +# +AC_MSG_CHECKING([if want ident string]) +AC_ARG_WITH([ident-string], + [AC_HELP_STRING([--with-ident-string=STRING], + [Embed an ident string into PMIx object files])]) +if test "$with_ident_string" = "" || test "$with_ident_string" = "no"; then + with_ident_string="%VERSION%" +fi +# This is complicated, because $PMIX_VERSION may have spaces in it. +# So put the whole sed expr in single quotes -- i.e., directly +# substitute %VERSION% for (not expanded) $PMIX_VERSION. +with_ident_string="`echo $with_ident_string | sed -e 's/%VERSION%/$PMIX_VERSION/'`" + +# Now eval an echo of that so that the "$PMIX_VERSION" token is +# replaced with its value. Enclose the whole thing in "" so that it +# ends up as 1 token. +with_ident_string="`eval echo $with_ident_string`" + +AC_DEFINE_UNQUOTED([PMIX_IDENT_STRING], ["$with_ident_string"], + [ident string for PMIX]) +AC_MSG_RESULT([$with_ident_string]) + +# +# Timing support +# +AC_MSG_CHECKING([if want developer-level timing support]) +AC_ARG_ENABLE(timing, + AC_HELP_STRING([--enable-timing], + [enable developer-level timing code (default: disabled)])) +if test "$enable_timing" = "yes"; then + AC_MSG_RESULT([yes]) + WANT_TIMING=1 +else + AC_MSG_RESULT([no]) + WANT_TIMING=0 +fi + +AC_DEFINE_UNQUOTED([PMIX_ENABLE_TIMING], [$WANT_TIMING], + [Whether we want developer-level timing support or not]) + +])dnl + +# Specify the symbol prefix +AC_DEFUN([PMIX_SET_SYMBOL_PREFIX],[ + pmix_symbol_prefix_value=$1 +])dnl + +# This must be a standalone routine so that it can be called both by +# PMIX_INIT and an external caller (if PMIX_INIT is not invoked). +AC_DEFUN([PMIX_DO_AM_CONDITIONALS],[ + AS_IF([test "$pmix_did_am_conditionals" != "yes"],[ + AM_CONDITIONAL([PMIX_EMBEDDED_MODE], [test "x$pmix_mode" = "xembedded"]) + AM_CONDITIONAL([PMIX_COMPILE_TIMING], [test "$WANT_TIMING" = "1"]) + AM_CONDITIONAL([PMIX_WANT_MUNGE], [test "$pmix_munge_support" = "1"]) + AM_CONDITIONAL([PMIX_WANT_SASL], [test "$pmix_sasl_support" = "1"]) + ]) + pmix_did_am_conditionals=yes +])dnl + diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_check_attributes.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix_check_attributes.m4 new file mode 100644 index 0000000000..bbafcc2b8b --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_check_attributes.m4 @@ -0,0 +1,539 @@ +# -*- shell-script -*- +# PMIx copyrights: +# Copyright (c) 2013 Intel, Inc. All rights reserved +# +######################### +# +# Copyright (c) 2004-2007 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-2010 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) 2009 Oak Ridge National Labs. All rights reserved. +# Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2013 Mellanox Technologies, Inc. +# All rights reserved. +# Copyright (c) 2015 Intel, Inc. All rights reserved. +######################### +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# +# Search the generated warnings for +# keywords regarding skipping or ignoring certain attributes +# Intel: ignore +# Sun C++: skip +# +AC_DEFUN([_PMIX_ATTRIBUTE_FAIL_SEARCH],[ + AC_REQUIRE([AC_PROG_GREP]) + if test -s conftest.err ; then + # icc uses 'invalid attribute' and 'attribute "__XXX__" ignored' + # Sun 12.1 emits 'warning: attribute parameter "__printf__" is undefined' + for i in invalid ignore skip undefined ; do + $GREP -iq $i conftest.err + if test "$?" = "0" ; then + pmix_cv___attribute__[$1]=0 + break; + fi + done + fi +]) + +# +# Check for one specific attribute by compiling with C +# +# The last argument is for specific CFLAGS, that need to be set +# for the compiler to generate a warning on the cross-check. +# This may need adaption for future compilers / CFLAG-settings. +# +AC_DEFUN([_PMIX_CHECK_SPECIFIC_ATTRIBUTE], [ + AC_MSG_CHECKING([for __attribute__([$1])]) + AC_CACHE_VAL(pmix_cv___attribute__[$1], [ + # + # Try to compile using the C compiler + # + AC_TRY_COMPILE([$2],[], + [ + # + # In case we did succeed: Fine, but was this due to the + # attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err + # and if found, reset the pmix_cv__attribute__var=0 + # + pmix_cv___attribute__[$1]=1 + _PMIX_ATTRIBUTE_FAIL_SEARCH([$1]) + ], + [pmix_cv___attribute__[$1]=0]) + ]) + + if test "$pmix_cv___attribute__[$1]" = "1" ; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi +]) + + +# +# Test the availability of __attribute__ and with the help +# of _PMIX_CHECK_SPECIFIC_ATTRIBUTE for the support of +# particular attributes. Compilers, that do not support an +# attribute most often fail with a warning (when the warning +# level is set). +# The compilers output is parsed in _PMIX_ATTRIBUTE_FAIL_SEARCH +# +# To add a new attributes __NAME__ add the +# pmix_cv___attribute__NAME +# add a new check with _PMIX_CHECK_SPECIFIC_ATTRIBUTE (possibly with a cross-check) +# _PMIX_CHECK_SPECIFIC_ATTRIBUTE([name], [int foo (int arg) __attribute__ ((__name__));], [], []) +# and define the corresponding +# AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_NAME, [$pmix_cv___attribute__NAME], +# [Whether your compiler has __attribute__ NAME or not]) +# and decide on a correct macro (in pmix/include/pmix_config_bottom.h): +# # define __pmix_attribute_NAME(x) __attribute__(__NAME__) +# +# Please use the "__"-notation of the attribute in order not to +# clash with predefined names or macros (e.g. const, which some compilers +# do not like..) +# + + +AC_DEFUN([PMIX_CHECK_ATTRIBUTES], [ + AC_LANG(C) + AC_MSG_CHECKING(for __attribute__) + + AC_CACHE_VAL(pmix_cv___attribute__, [ + AC_TRY_COMPILE( + [#include + /* Check for the longest available __attribute__ (since gcc-2.3) */ + struct foo { + char a; + int x[2] __attribute__ ((__packed__)); + }; + ], + [], + [pmix_cv___attribute__=1], + [pmix_cv___attribute__=0], + ) + + if test "$pmix_cv___attribute__" = "1" ; then + AC_TRY_COMPILE( + [#include + /* Check for the longest available __attribute__ (since gcc-2.3) */ + struct foo { + char a; + int x[2] __attribute__ ((__packed__)); + }; + ], + [], + [pmix_cv___attribute__=1], + [pmix_cv___attribute__=0], + ) + fi + ]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE, [$pmix_cv___attribute__], + [Whether your compiler has __attribute__ or not]) + +# +# Now that we know the compiler support __attribute__ let's check which kind of +# attributed are supported. +# + if test "$pmix_cv___attribute__" = "0" ; then + AC_MSG_RESULT([no]) + pmix_cv___attribute__aligned=0 + pmix_cv___attribute__always_inline=0 + pmix_cv___attribute__cold=0 + pmix_cv___attribute__const=0 + pmix_cv___attribute__deprecated=0 + pmix_cv___attribute__deprecated_argument=0 + pmix_cv___attribute__format=0 + pmix_cv___attribute__format_funcptr=0 + pmix_cv___attribute__hot=0 + pmix_cv___attribute__malloc=0 + pmix_cv___attribute__may_alias=0 + pmix_cv___attribute__no_instrument_function=0 + pmix_cv___attribute__nonnull=0 + pmix_cv___attribute__noreturn=0 + pmix_cv___attribute__noreturn_funcptr=0 + pmix_cv___attribute__packed=0 + pmix_cv___attribute__pure=0 + pmix_cv___attribute__sentinel=0 + pmix_cv___attribute__unused=0 + pmix_cv___attribute__visibility=0 + pmix_cv___attribute__warn_unused_result=0 + pmix_cv___attribute__destructor=0 + else + AC_MSG_RESULT([yes]) + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([aligned], + [struct foo { char text[4]; } __attribute__ ((__aligned__(8)));], + [], + []) + + # + # Ignored by PGI-6.2.5; -- recognized by output-parser + # + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([always_inline], + [int foo (int arg) __attribute__ ((__always_inline__));], + [], + []) + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([cold], + [ + int foo(int arg1, int arg2) __attribute__ ((__cold__)); + int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; } + ], + [], + []) + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([const], + [ + int foo(int arg1, int arg2) __attribute__ ((__const__)); + int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; } + ], + [], + []) + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([deprecated], + [ + int foo(int arg1, int arg2) __attribute__ ((__deprecated__)); + int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; } + ], + [], + []) + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([deprecated_argument], + [ + int foo(int arg1, int arg2) __attribute__ ((__deprecated__("compiler allows argument"))); + int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; } + ], + [], + []) + + ATTRIBUTE_CFLAGS= + case "$pmix_c_vendor" in + gnu) + ATTRIBUTE_CFLAGS="-Wall" + ;; + intel) + # we want specifically the warning on format string conversion + ATTRIBUTE_CFLAGS="-we181" + ;; + esac + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([format], + [ + int this_printf (void *my_object, const char *my_format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); + ], + [ + static int usage (int * argument); + extern int this_printf (int arg1, const char *my_format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); + + static int usage (int * argument) { + return this_printf (*argument, "%d", argument); /* This should produce a format warning */ + } + /* The autoconf-generated main-function is int main(), which produces a warning by itself */ + int main(void); + ], + [$ATTRIBUTE_CFLAGS]) + + ATTRIBUTE_CFLAGS= + case "$pmix_c_vendor" in + gnu) + ATTRIBUTE_CFLAGS="-Wall" + ;; + intel) + # we want specifically the warning on format string conversion + ATTRIBUTE_CFLAGS="-we181" + ;; + esac + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([format_funcptr], + [ + int (*this_printf)(void *my_object, const char *my_format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); + ], + [ + static int usage (int * argument); + extern int (*this_printf) (int arg1, const char *my_format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); + + static int usage (int * argument) { + return (*this_printf) (*argument, "%d", argument); /* This should produce a format warning */ + } + /* The autoconf-generated main-function is int main(), which produces a warning by itself */ + int main(void); + ], + [$ATTRIBUTE_CFLAGS]) + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([hot], + [ + int foo(int arg1, int arg2) __attribute__ ((__hot__)); + int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; } + ], + [], + []) + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([malloc], + [ +#ifdef HAVE_STDLIB_H +# include +#endif + int * foo(int arg1) __attribute__ ((__malloc__)); + int * foo(int arg1) { return (int*) malloc(arg1); } + ], + [], + []) + + + # + # Attribute may_alias: No suitable cross-check available, that works for non-supporting compilers + # Ignored by intel-9.1.045 -- turn off with -wd1292 + # Ignored by PGI-6.2.5; ignore not detected due to missing cross-check + # + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([may_alias], + [int * p_value __attribute__ ((__may_alias__));], + [], + []) + + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([no_instrument_function], + [int * foo(int arg1) __attribute__ ((__no_instrument_function__));], + [], + []) + + + # + # Attribute nonnull: + # Ignored by intel-compiler 9.1.045 -- recognized by cross-check + # Ignored by PGI-6.2.5 (pgCC) -- recognized by cross-check + # + ATTRIBUTE_CFLAGS= + case "$pmix_c_vendor" in + gnu) + ATTRIBUTE_CFLAGS="-Wall" + ;; + intel) + # we do not want to get ignored attributes warnings, but rather real warnings + ATTRIBUTE_CFLAGS="-wd1292" + ;; + esac + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([nonnull], + [ + int square(int *arg) __attribute__ ((__nonnull__)); + int square(int *arg) { return *arg; } + ], + [ + static int usage(int * argument); + int square(int * argument) __attribute__ ((__nonnull__)); + int square(int * argument) { return (*argument) * (*argument); } + + static int usage(int * argument) { + return square( ((void*)0) ); /* This should produce an argument must be nonnull warning */ + } + /* The autoconf-generated main-function is int main(), which produces a warning by itself */ + int main(void); + ], + [$ATTRIBUTE_CFLAGS]) + + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([noreturn], + [ +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_STDLIB_H +# include +#endif + void fatal(int arg1) __attribute__ ((__noreturn__)); + void fatal(int arg1) { exit(arg1); } + ], + [], + []) + + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([noreturn_funcptr], + [ +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_STDLIB_H +# include +#endif + extern void (*fatal_exit)(int arg1) __attribute__ ((__noreturn__)); + void fatal(int arg1) { fatal_exit (arg1); } + ], + [], + [$ATTRIBUTE_CFLAGS]) + + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([packed], + [ + struct foo { + char a; + int x[2] __attribute__ ((__packed__)); + }; + ], + [], + []) + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([pure], + [ + int square(int arg) __attribute__ ((__pure__)); + int square(int arg) { return arg * arg; } + ], + [], + []) + + # + # Attribute sentinel: + # Ignored by the intel-9.1.045 -- recognized by cross-check + # intel-10.0beta works fine + # Ignored by PGI-6.2.5 (pgCC) -- recognized by output-parser and cross-check + # Ignored by pathcc-2.2.1 -- recognized by cross-check (through grep ignore) + # + ATTRIBUTE_CFLAGS= + case "$pmix_c_vendor" in + gnu) + ATTRIBUTE_CFLAGS="-Wall" + ;; + intel) + # we do not want to get ignored attributes warnings + ATTRIBUTE_CFLAGS="-wd1292" + ;; + esac + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([sentinel], + [ + int my_execlp(const char * file, const char *arg, ...) __attribute__ ((__sentinel__)); + ], + [ + static int usage(int * argument); + int my_execlp(const char * file, const char *arg, ...) __attribute__ ((__sentinel__)); + + static int usage(int * argument) { + void * last_arg_should_be_null = argument; + return my_execlp ("lala", "/home/there", last_arg_should_be_null); /* This should produce a warning */ + } + /* The autoconf-generated main-function is int main(), which produces a warning by itself */ + int main(void); + ], + [$ATTRIBUTE_CFLAGS]) + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([unused], + [ + int square(int arg1 __attribute__ ((__unused__)), int arg2); + int square(int arg1, int arg2) { return arg2; } + ], + [], + []) + + + # + # Ignored by PGI-6.2.5 (pgCC) -- recognized by the output-parser + # + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([visibility], + [ + int square(int arg1) __attribute__ ((__visibility__("hidden"))); + ], + [], + []) + + + # + # Attribute warn_unused_result: + # Ignored by the intel-compiler 9.1.045 -- recognized by cross-check + # Ignored by pathcc-2.2.1 -- recognized by cross-check (through grep ignore) + # + ATTRIBUTE_CFLAGS= + case "$pmix_c_vendor" in + gnu) + ATTRIBUTE_CFLAGS="-Wall" + ;; + intel) + # we do not want to get ignored attributes warnings + ATTRIBUTE_CFLAGS="-wd1292" + ;; + esac + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([warn_unused_result], + [ + int foo(int arg) __attribute__ ((__warn_unused_result__)); + int foo(int arg) { return arg + 3; } + ], + [ + static int usage(int * argument); + int foo(int arg) __attribute__ ((__warn_unused_result__)); + + int foo(int arg) { return arg + 3; } + static int usage(int * argument) { + foo (*argument); /* Should produce an unused result warning */ + return 0; + } + + /* The autoconf-generated main-function is int main(), which produces a warning by itself */ + int main(void); + ], + [$ATTRIBUTE_CFLAGS]) + + + _PMIX_CHECK_SPECIFIC_ATTRIBUTE([destructor], + [ + void foo(void) __attribute__ ((__destructor__)); + void foo(void) { return ; } + ], + [], + []) + fi + + # Now that all the values are set, define them + + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_ALIGNED, [$pmix_cv___attribute__aligned], + [Whether your compiler has __attribute__ aligned or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_ALWAYS_INLINE, [$pmix_cv___attribute__always_inline], + [Whether your compiler has __attribute__ always_inline or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_COLD, [$pmix_cv___attribute__cold], + [Whether your compiler has __attribute__ cold or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_CONST, [$pmix_cv___attribute__const], + [Whether your compiler has __attribute__ const or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_DEPRECATED, [$pmix_cv___attribute__deprecated], + [Whether your compiler has __attribute__ deprecated or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_DEPRECATED_ARGUMENT, [$pmix_cv___attribute__deprecated_argument], + [Whether your compiler has __attribute__ deprecated with optional argument]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_FORMAT, [$pmix_cv___attribute__format], + [Whether your compiler has __attribute__ format or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_FORMAT_FUNCPTR, [$pmix_cv___attribute__format_funcptr], + [Whether your compiler has __attribute__ format and it works on function pointers]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_HOT, [$pmix_cv___attribute__hot], + [Whether your compiler has __attribute__ hot or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_MALLOC, [$pmix_cv___attribute__malloc], + [Whether your compiler has __attribute__ malloc or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_MAY_ALIAS, [$pmix_cv___attribute__may_alias], + [Whether your compiler has __attribute__ may_alias or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION, [$pmix_cv___attribute__no_instrument_function], + [Whether your compiler has __attribute__ no_instrument_function or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_NONNULL, [$pmix_cv___attribute__nonnull], + [Whether your compiler has __attribute__ nonnull or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_NORETURN, [$pmix_cv___attribute__noreturn], + [Whether your compiler has __attribute__ noreturn or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_NORETURN_FUNCPTR, [$pmix_cv___attribute__noreturn_funcptr], + [Whether your compiler has __attribute__ noreturn and it works on function pointers]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_PACKED, [$pmix_cv___attribute__packed], + [Whether your compiler has __attribute__ packed or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_PURE, [$pmix_cv___attribute__pure], + [Whether your compiler has __attribute__ pure or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_SENTINEL, [$pmix_cv___attribute__sentinel], + [Whether your compiler has __attribute__ sentinel or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_UNUSED, [$pmix_cv___attribute__unused], + [Whether your compiler has __attribute__ unused or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_VISIBILITY, [$pmix_cv___attribute__visibility], + [Whether your compiler has __attribute__ visibility or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT, [$pmix_cv___attribute__warn_unused_result], + [Whether your compiler has __attribute__ warn unused result or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_WEAK_ALIAS, [$pmix_cv___attribute__weak_alias], + [Whether your compiler has __attribute__ weak alias or not]) + AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_DESTRUCTOR, [$pmix_cv___attribute__destructor], + [Whether your compiler has __attribute__ destructor or not]) +]) diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_check_broken_qsort.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix_check_broken_qsort.m4 new file mode 100644 index 0000000000..da4d14047e --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_check_broken_qsort.m4 @@ -0,0 +1,55 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +dnl University Research and Technology +dnl Corporation. All rights reserved. +dnl Copyright (c) 2004-2005 The University of Tennessee and The University +dnl of Tennessee Research Foundation. All rights +dnl reserved. +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) 2007 Sun Microsystems, Inc. All rights reserved. +dnl Copyright (c) 2014-2015 Intel, Inc. All rights reserved. +dnl Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl +dnl There was some mentioning of broken qsort happened for Solaris that could +dnl cause qsort to return a bad pointer which could cause some badness. +dnl The problem should have been corrected with these patches from SunSolve. +dnl Solaris 10 should be free from this problem. +dnl +dnl 5.8_sparc #108827-27 or later +dnl 5.8_x86 #108828-28 or later +dnl 5.9_sparc #112874-20 or later +dnl 5.9_x86 #114432-07 or later +dnl +dnl For users who could not patch their systems or are convinced that their +dnl native qsort is broken, they could specify this configure flag to use +dnl the pmix_qsort instead. + +# check for broken qsort +# PMIX_CHECK_BROKEN_QSORT(prefix, [action-if-found], [action-if-not-found]) +# -------------------------------------------------------- +AC_DEFUN([PMIX_CHECK_BROKEN_QSORT],[ + AC_ARG_WITH([broken-qsort], + [AC_HELP_STRING([--with-broken-qsort], + [Build with FreeBSD qsort instead of native qsort (default: no)])]) + AC_MSG_CHECKING([for broken qsort]) + + if test "$with_broken_qsort" = "yes"; then + result="yes" + define_result=1 + else + result="no" + define_result=0 + fi + AC_MSG_RESULT([$result]) + AC_DEFINE_UNQUOTED([PMIX_HAVE_BROKEN_QSORT], [$define_result], + [whether qsort is broken or not]) +]) diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_check_compiler_version.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix_check_compiler_version.m4 new file mode 100644 index 0000000000..b0a347e27b --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_check_compiler_version.m4 @@ -0,0 +1,92 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. +dnl Copyright (c) 2013 Intel, Inc. All rights reserved +dnl +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl + + +# PMIX_CHECK_COMPILER_VERSION_ID() +# ---------------------------------------------------- +# Try to figure out the compiler's name and version to detect cases, +# where users compile PMIx with one version and compile the application +# with a different compiler. +# +AC_DEFUN([PMIX_CHECK_COMPILER_VERSION_ID], +[ + PMIX_CHECK_COMPILER(FAMILYID) + PMIX_CHECK_COMPILER_STRINGIFY(FAMILYNAME) + PMIX_CHECK_COMPILER(VERSION) + PMIX_CHECK_COMPILER_STRINGIFY(VERSION_STR) +])dnl + + +AC_DEFUN([PMIX_CHECK_COMPILER], [ + lower=m4_tolower($1) + AC_CACHE_CHECK([for compiler $lower], pmix_cv_compiler_[$1], + [ + CPPFLAGS_orig=$CPPFLAGS + CPPFLAGS="-I${top_pmix_srcdir}/src/include $CPPFLAGS" + AC_TRY_RUN([ +#include +#include +#include "pmix_portable_platform.h" + +int main (int argc, char * argv[]) +{ + FILE * f; + f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf (f, "%d", PLATFORM_COMPILER_$1); + return 0; +} + ], [ + eval pmix_cv_compiler_$1=`cat conftestval`; + ], [ + eval pmix_cv_compiler_$1=0 + ], [ + eval pmix_cv_compiler_$1=0 + ]) + CPPFLAGS=$CPPFLAGS_orig + ]) + AC_DEFINE_UNQUOTED([PMIX_BUILD_PLATFORM_COMPILER_$1], $pmix_cv_compiler_[$1], + [The compiler $lower which PMIx was built with]) +])dnl + + +AC_DEFUN([PMIX_CHECK_COMPILER_STRINGIFY], [ + lower=m4_tolower($1) + AC_CACHE_CHECK([for compiler $lower], pmix_cv_compiler_[$1], + [ + CPPFLAGS_orig=$CPPFLAGS + CPPFLAGS="-I${top_pmix_srcdir}/src/include $CPPFLAGS" + AC_TRY_RUN([ +#include +#include +#include "pmix_portable_platform.h" + +int main (int argc, char * argv[]) +{ + FILE * f; + f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf (f, "%s", _STRINGIFY(PLATFORM_COMPILER_$1)); + return 0; +} + ], [ + eval pmix_cv_compiler_$1=`cat conftestval`; + ], [ + eval pmix_cv_compiler_$1=UNKNOWN + ], [ + eval pmix_cv_compiler_$1=UNKNOWN + ]) + CPPFLAGS=$CPPFLAGS_orig + ]) + AC_DEFINE_UNQUOTED([PMIX_BUILD_PLATFORM_COMPILER_$1], $pmix_cv_compiler_[$1], + [The compiler $lower which PMIX was built with]) +])dnl diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_check_ident.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix_check_ident.m4 new file mode 100644 index 0000000000..de2fa573bc --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_check_ident.m4 @@ -0,0 +1,103 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. +dnl Copyright (c) 2015 Intel, Inc. All rights reserved +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl +dnl defines: +dnl PMIX_$1_USE_PRAGMA_IDENT +dnl PMIX_$1_USE_IDENT +dnl PMIX_$1_USE_CONST_CHAR_IDENT +dnl + +# PMIX_CHECK_IDENT(compiler-env, compiler-flags, +# file-suffix, lang) Try to compile a source file containing +# a #pragma ident, and determine whether the ident was +# inserted into the resulting object file +# ----------------------------------------------------------- +AC_DEFUN([PMIX_CHECK_IDENT], [ + AC_MSG_CHECKING([for $4 ident string support]) + + pmix_pragma_ident_happy=0 + pmix_ident_happy=0 + pmix_static_const_char_happy=0 + _PMIX_CHECK_IDENT( + [$1], [$2], [$3], + [[#]pragma ident], [], + [pmix_pragma_ident_happy=1 + pmix_message="[#]pragma ident"], + _PMIX_CHECK_IDENT( + [$1], [$2], [$3], + [[#]ident], [], + [pmix_ident_happy=1 + pmix_message="[#]ident"], + _PMIX_CHECK_IDENT( + [$1], [$2], [$3], + [[#]pragma comment(exestr, ], [)], + [pmix_pragma_comment_happy=1 + pmix_message="[#]pragma comment"], + [pmix_static_const_char_happy=1 + pmix_message="static const char[[]]"]))) + + AC_DEFINE_UNQUOTED([PMIX_$1_USE_PRAGMA_IDENT], + [$pmix_pragma_ident_happy], [Use #pragma ident strings for $4 files]) + AC_DEFINE_UNQUOTED([PMIX_$1_USE_IDENT], + [$pmix_ident_happy], [Use #ident strings for $4 files]) + AC_DEFINE_UNQUOTED([PMIX_$1_USE_PRAGMA_COMMENT], + [$pmix_pragma_comment_happy], [Use #pragma comment for $4 files]) + AC_DEFINE_UNQUOTED([PMIX_$1_USE_CONST_CHAR_IDENT], + [$pmix_static_const_char_happy], [Use static const char[] strings for $4 files]) + + AC_MSG_RESULT([$pmix_message]) + + unset pmix_pragma_ident_happy pmix_ident_happy pmix_static_const_char_happy pmix_message +]) + +# _PMIX_CHECK_IDENT(compiler-env, compiler-flags, +# file-suffix, header_prefix, header_suffix, action-if-success, action-if-fail) +# Try to compile a source file containing a #-style ident, +# and determine whether the ident was inserted into the +# resulting object file +# ----------------------------------------------------------- +AC_DEFUN([_PMIX_CHECK_IDENT], [ + eval pmix_compiler="\$$1" + eval pmix_flags="\$$2" + + pmix_ident="string_not_coincidentally_inserted_by_the_compiler" + cat > conftest.$3 <&5 + pmix_output=`$pmix_compiler $pmix_flags -c conftest.$3 -o conftest.${OBJEXT} 2>&1 1>/dev/null` + pmix_status=$? + AS_IF([test $pmix_status = 0], + [test -z "$pmix_output" + pmix_status=$?]) + PMIX_LOG_MSG([\$? = $pmix_status], 1) + AS_IF([test $pmix_status = 0 && test -f conftest.${OBJEXT}], + [pmix_output="`strings -a conftest.${OBJEXT} | grep $pmix_ident`" + grep $pmix_ident conftest.${OBJEXT} 2>&1 1>/dev/null + pmix_status=$? + AS_IF([test "$pmix_output" != "" || test "$pmix_status" = "0"], + [$6], + [$7])], + [PMIX_LOG_MSG([the failed program was:]) + PMIX_LOG_FILE([conftest.$3]) + $7]) + + unset pmix_compiler pmix_flags pmix_output pmix_status + rm -rf conftest.* conftest${EXEEXT} +])dnl diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_check_munge.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix_check_munge.m4 new file mode 100644 index 0000000000..6410749b2e --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_check_munge.m4 @@ -0,0 +1,83 @@ +# -*- shell-script -*- +# +# Copyright (c) 2015 Intel, Inc. All rights reserved +# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# MCA_munge_CONFIG([action-if-found], [action-if-not-found]) +# -------------------------------------------------------------------- +AC_DEFUN([PMIX_MUNGE_CONFIG],[ + + PMIX_VAR_SCOPE_PUSH([pmix_munge_dir pmix_munge_libdir]) + + AC_ARG_WITH([munge], + [AC_HELP_STRING([--with-munge=DIR], + [Search for munge headers and libraries in DIR ])]) + + AC_ARG_WITH([munge-libdir], + [AC_HELP_STRING([--with-munge-libdir=DIR], + [Search for munge libraries in DIR ])]) + + pmix_munge_support=0 + if test "$with_munge" != "no"; then + AC_MSG_CHECKING([for munge in]) + if test ! -z "$with_munge" && test "$with_munge" != "yes"; then + if test -d $with_munge/include/munge; then + pmix_munge_dir=$with_munge/include/munge + else + pmix_munge_dir=$with_munge + fi + if test -d $with_munge/lib; then + pmix_munge_libdir=$with_munge/lib + elif test -d $with_munge/lib64; then + pmix_munge_libdir=$with_munge/lib64 + else + AC_MSG_RESULT([Could not find $with_munge/lib or $with_munge/lib64]) + AC_MSG_ERROR([Can not continue]) + fi + AC_MSG_RESULT([$pmix_munge_dir and $pmix_munge_libdir]) + else + AC_MSG_RESULT([(default search paths)]) + pmix_munge_dir= + fi + AS_IF([test ! -z "$with_munge_libdir" && test "$with_munge_libdir" != "yes"], + [pmix_munge_libdir="$with_munge_libdir"]) + + PMIX_CHECK_PACKAGE([pmix_munge], + [munge.h], + [munge], + [munge_encode], + [-lmunge], + [$pmix_munge_dir], + [$pmix_munge_libdir], + [pmix_munge_support=1], + [pmix_munge_support=0]) + if test $pmix_munge_support == "1"; then + CPPFLAGS="$pmix_munge_CPPFLAGS $CPPFLAGS" + LIBS="$LIBS -lmunge" + LDFLAGS="$pmix_munge_LDFLAGS $LDFLAGS" + fi + fi + + if test ! -z "$with_munge" && test "$with_munge" != "no" && test "$pmix_munge_support" != "1"; then + AC_MSG_WARN([MUNGE SUPPORT REQUESTED AND NOT FOUND.]) + AC_MSG_ERROR([CANNOT CONTINUE]) + fi + + AC_MSG_CHECKING([will munge support be built]) + if test "$pmix_munge_support" != "1"; then + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([yes]) + fi + + AC_DEFINE_UNQUOTED([PMIX_HAVE_MUNGE], [$pmix_munge_support], + [Whether we have munge support or not]) + + PMIX_VAR_SCOPE_POP +])dnl diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_check_package.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix_check_package.m4 new file mode 100644 index 0000000000..f4833c3b0a --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_check_package.m4 @@ -0,0 +1,176 @@ +# -*- 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-2005 The Regents of the University of California. +# All rights reserved. +# Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014 Intel, Inc. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# _PMIX_CHECK_PACKAGE_HEADER(prefix, header, dir-prefix, +# [action-if-found], [action-if-not-found], +# includes) +# -------------------------------------------------------------------- +AC_DEFUN([_PMIX_CHECK_PACKAGE_HEADER], [ + # This is stolen from autoconf to peek under the covers to get the + # cache variable for the library check. one should not copy this + # code into other places unless you want much pain and suffering + AS_VAR_PUSHDEF([pmix_Header], [ac_cv_header_$2]) + + # so this sucks, but there's no way to get through the progression + # of header includes without killing off the cache variable and trying + # again... + unset pmix_Header + + pmix_check_package_header_happy="no" + AS_IF([test "$3" = "/usr" || test "$3" = "/usr/local"], + [ # try as is... + AC_VERBOSE([looking for header without includes]) + AC_CHECK_HEADERS([$2], [pmix_check_package_header_happy="yes"], []) + AS_IF([test "$pmix_check_package_header_happy" = "no"], + [# no go on the as is - reset the cache and try again + unset pmix_Header])]) + + AS_IF([test "$pmix_check_package_header_happy" = "no"], + [AS_IF([test "$3" != ""], + [$1_CPPFLAGS="$$1_CPPFLAGS -I$3/include" + CPPFLAGS="$CPPFLAGS -I$3/include"]) + AC_CHECK_HEADERS([$2], [pmix_check_package_header_happy="yes"], [], [$6]) + AS_IF([test "$pmix_check_package_header_happy" = "yes"], [$4], [$5])], + [$4]) + unset pmix_check_package_header_happy + + AS_VAR_POPDEF([pmix_Header])dnl +]) + + +# _PMIX_CHECK_PACKAGE_LIB(prefix, library, function, extra-libraries, +# dir-prefix, libdir, +# [action-if-found], [action-if-not-found]]) +# -------------------------------------------------------------------- +AC_DEFUN([_PMIX_CHECK_PACKAGE_LIB], [ + # This is stolen from autoconf to peek under the covers to get the + # cache variable for the library check. one should not copy this + # code into other places unless you want much pain and suffering + AS_LITERAL_IF([$2], + [AS_VAR_PUSHDEF([pmix_Lib], [ac_cv_lib_$2_$3])], + [AS_VAR_PUSHDEF([pmix_Lib], [ac_cv_lib_$2''_$3])])dnl + + # see comment above + unset pmix_Lib + pmix_check_package_lib_happy="no" + AS_IF([test "$6" != ""], + [ # libdir was specified - search only there + $1_LDFLAGS="$$1_LDFLAGS -L$6" + LDFLAGS="$LDFLAGS -L$6" + AC_CHECK_LIB([$2], [$3], + [pmix_check_package_lib_happy="yes"], + [pmix_check_package_lib_happy="no"], [$4]) + AS_IF([test "$pmix_check_package_lib_happy" = "no"], + [LDFLAGS="$pmix_check_package_$1_save_LDFLAGS" + $1_LDFLAGS="$pmix_check_package_$1_orig_LDFLAGS" + unset pmix_Lib])], + [ # libdir was not specified - go through search path + pmix_check_package_libdir="$5" + AS_IF([test "$pmix_check_package_libdir" = "" || test "$pmix_check_package_libdir" = "/usr" || test "$pmix_check_package_libdir" = "/usr/local"], + [ # try as is... + AC_VERBOSE([looking for library without search path]) + AC_CHECK_LIB([$2], [$3], + [pmix_check_package_lib_happy="yes"], + [pmix_check_package_lib_happy="no"], [$4]) + AS_IF([test "$pmix_check_package_lib_happy" = "no"], + [ # no go on the as is.. see what happens later... + LDFLAGS="$pmix_check_package_$1_save_LDFLAGS" + $1_LDFLAGS="$pmix_check_package_$1_orig_LDFLAGS" + unset pmix_Lib])]) + + AS_IF([test "$pmix_check_package_lib_happy" = "no"], + [AS_IF([test "$pmix_check_package_libdir" != ""], + [$1_LDFLAGS="$$1_LDFLAGS -L$pmix_check_package_libdir/lib" + LDFLAGS="$LDFLAGS -L$pmix_check_package_libdir/lib" + AC_VERBOSE([looking for library in lib]) + AC_CHECK_LIB([$2], [$3], + [pmix_check_package_lib_happy="yes"], + [pmix_check_package_lib_happy="no"], [$4]) + AS_IF([test "$pmix_check_package_lib_happy" = "no"], + [ # no go on the as is.. see what happens later... + LDFLAGS="$pmix_check_package_$1_save_LDFLAGS" + $1_LDFLAGS="$pmix_check_package_$1_orig_LDFLAGS" + unset pmix_Lib])])]) + + AS_IF([test "$pmix_check_package_lib_happy" = "no"], + [AS_IF([test "$pmix_check_package_libdir" != ""], + [$1_LDFLAGS="$$1_LDFLAGS -L$pmix_check_package_libdir/lib64" + LDFLAGS="$LDFLAGS -L$pmix_check_package_libdir/lib64" + AC_VERBOSE([looking for library in lib64]) + AC_CHECK_LIB([$2], [$3], + [pmix_check_package_lib_happy="yes"], + [pmix_check_package_lib_happy="no"], [$4]) + AS_IF([test "$pmix_check_package_lib_happy" = "no"], + [ # no go on the as is.. see what happens later... + LDFLAGS="$pmix_check_package_$1_save_LDFLAGS" + $1_LDFLAGS="$pmix_check_package_$1_orig_LDFLAGS" + unset pmix_Lib])])])]) + + AS_IF([test "$pmix_check_package_lib_happy" = "yes"], + [$1_LIBS="-l$2 $4" + $7], [$8]) + + AS_VAR_POPDEF([pmix_Lib])dnl +]) + + +# PMIX_CHECK_PACKAGE(prefix, +# header, +# library, +# function, +# extra-libraries, +# dir-prefix, +# libdir-prefix, +# [action-if-found], [action-if-not-found], +# includes) +# ----------------------------------------------------------- +# check for package defined by header and libs, and probably +# located in dir-prefix, possibly with libs in libdir-prefix. +# Both dir-prefix and libdir-prefix can be empty. Will set +# prefix_{CPPFLAGS, LDFLAGS, LIBS} as needed +AC_DEFUN([PMIX_CHECK_PACKAGE],[ + pmix_check_package_$1_save_CPPFLAGS="$CPPFLAGS" + pmix_check_package_$1_save_LDFLAGS="$LDFLAGS" + pmix_check_package_$1_save_LIBS="$LIBS" + + pmix_check_package_$1_orig_CPPFLAGS="$$1_CPPFLAGS" + pmix_check_package_$1_orig_LDFLAGS="$$1_LDFLAGS" + pmix_check_package_$1_orig_LIBS="$$1_LIBS" + + _PMIX_CHECK_PACKAGE_HEADER([$1], [$2], [$6], + [_PMIX_CHECK_PACKAGE_LIB([$1], [$3], [$4], [$5], [$6], [$7], + [pmix_check_package_happy="yes"], + [pmix_check_package_happy="no"])], + [pmix_check_package_happy="no"], + [$10]) + + AS_IF([test "$pmix_check_package_happy" = "yes"], + [$8], + [$1_CPPFLAGS="$pmix_check_package_$1_orig_CPPFLAGS" + $1_LDFLAGS="$pmix_check_package_$1_orig_LDFLAGS" + $1_LIBS="$pmix_check_package_$1_orig_LIBS" + $9]) + + CPPFLAGS="$pmix_check_package_$1_save_CPPFLAGS" + LDFLAGS="$pmix_check_package_$1_save_LDFLAGS" + LIBS="$pmix_check_package_$1_save_LIBS" +]) diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_check_sasl.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix_check_sasl.m4 new file mode 100644 index 0000000000..7dafb477a0 --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_check_sasl.m4 @@ -0,0 +1,82 @@ +# -*- shell-script -*- +# +# Copyright (c) 2015 Intel, Inc. All rights reserved +# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# MCA_sasl_CONFIG([action-if-found], [action-if-not-found]) +# -------------------------------------------------------------------- +AC_DEFUN([PMIX_SASL_CONFIG],[ + + PMIX_VAR_SCOPE_PUSH([pmix_sasl_dir pmix_sasl_libdir]) + + AC_ARG_WITH([sasl], + [AC_HELP_STRING([--with-sasl=DIR], + [Search for sasl headers and libraries in DIR ])], + [], [with_sasl=no]) + + AC_ARG_WITH([sasl-libdir], + [AC_HELP_STRING([--with-sasl-libdir=DIR], + [Search for sasl libraries in DIR ])]) + + pmix_sasl_support=0 + if test "$with_sasl" != "no"; then + AC_MSG_CHECKING([for sasl in]) + if test ! -z "$with_sasl" && test "$with_sasl" != "yes"; then + pmix_sasl_dir=$with_sasl/include/sasl + if test -d $with_sasl/lib; then + pmix_sasl_libdir=$with_sasl/lib + elif test -d $with_sasl/lib64; then + pmix_sasl_libdir=$with_sasl/lib64 + else + AC_MSG_RESULT([Could not find $with_sasl/lib or $with_sasl/lib64]) + AC_MSG_ERROR([Can not continue]) + fi + AC_MSG_RESULT([$pmix_sasl_dir and $pmix_sasl_libdir]) + else + AC_MSG_RESULT([(default search paths)]) + pmix_sasl_dir= + fi + AS_IF([test ! -z "$with_sasl_libdir" && test "$with_sasl_libdir" != "yes"], + [pmix_sasl_libdir="$with_sasl_libdir"]) + + PMIX_CHECK_PACKAGE([pmix_sasl], + [sasl/sasl.h], + [sasl2], + [sasl_server_init], + [-lsasl2], + [$pmix_sasl_dir], + [$pmix_sasl_libdir], + [pmix_sasl_support=1], + [pmix_sasl_support=0]) + if test $pmix_sasl_support == "1"; then + CPPFLAGS="$pmix_sasl_CPPFLAGS $CPPFLAGS" + LIBS="$LIBS -lsasl2" + LDFLAGS="$pmix_sasl_LDFLAGS $LDFLAGS" + fi + fi + + if test ! -z "$with_sasl" && test "$with_sasl" != "no" && test "$pmix_sasl_support" != "1"; then + AC_MSG_WARN([SASL SUPPORT REQUESTED AND NOT FOUND.]) + AC_MSG_ERROR([CANNOT CONTINUE]) + fi + + AC_MSG_CHECKING([will sasl support be built]) + if test "$pmix_sasl_support" != "1"; then + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([yes]) + fi + + AC_DEFINE_UNQUOTED(PMIX_HAVE_SASL, [$pmix_sasl_support], + [Whether we have sasl support or not]) + + PMIX_VAR_SCOPE_POP +])dnl diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_check_vendor.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix_check_vendor.m4 new file mode 100644 index 0000000000..ba3f1a5a8d --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_check_vendor.m4 @@ -0,0 +1,252 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +dnl University Research and Technology +dnl Corporation. All rights reserved. +dnl Copyright (c) 2004-2005 The University of Tennessee and The University +dnl of Tennessee Research Foundation. All rights +dnl reserved. +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) 2012 Oracle and/or its affiliates. All rights reserved. +dnl Copyright (c) 2013 Intel, Inc. All rights reserved +dnl Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2015 Research Organization for Information Science +dnl and Technology (RIST). All rights reserved. +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl + + +# PMIX_C_COMPILER_VENDOR(VENDOR_VARIABLE) +# --------------------------------------- +# Set shell variable VENDOR_VARIABLE to the name of the compiler +# vendor for the current C compiler. +# +# See comment for _PMIX_CHECK_COMPILER_VENDOR for a complete +# list of currently detected compilers. +AC_DEFUN([PMIX_C_COMPILER_VENDOR], [ + AC_REQUIRE([AC_PROG_CC]) + + AC_CACHE_CHECK([for the C compiler vendor], + [pmix_cv_c_compiler_vendor], + [AC_LANG_PUSH(C) + _PMIX_CHECK_COMPILER_VENDOR([pmix_cv_c_compiler_vendor]) + AC_LANG_POP(C)]) + + $1="$pmix_cv_c_compiler_vendor" +]) + + +# workaround to avoid syntax error with Autoconf < 2.68: +m4_ifndef([AC_LANG_DEFINES_PROVIDED], + [m4_define([AC_LANG_DEFINES_PROVIDED])]) + +# PMIX_IFDEF_IFELSE(symbol, [action-if-defined], +# [action-if-not-defined]) +# ---------------------------------------------- +# Run compiler to determine if preprocessor symbol "symbol" is +# defined by the compiler. +AC_DEFUN([PMIX_IFDEF_IFELSE], [ + AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED +#ifndef $1 +#error "symbol $1 not defined" +choke me +#endif], [$2], [$3])]) + + +# PMIX_IF_IFELSE(symbol, [action-if-defined], +# [action-if-not-defined]) +# ---------------------------------------------- +# Run compiler to determine if preprocessor symbol "symbol" is +# defined by the compiler. +AC_DEFUN([PMIX_IF_IFELSE], [ + AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED +#if !( $1 ) +#error "condition $1 not met" +choke me +#endif], [$2], [$3])]) + + +# _PMIX_CHECK_COMPILER_VENDOR(VENDOR_VARIABLE) +# -------------------------------------------- +# Set shell variable VENDOR_VARIABLE to the name of the compiler +# vendor for the compiler for the current language. Language must be +# one of C, OBJC, or C++. +# +# thanks to http://predef.sourceforge.net/precomp.html for the list +# of defines to check. +AC_DEFUN([_PMIX_CHECK_COMPILER_VENDOR], [ + pmix_check_compiler_vendor_result="unknown" + + # GNU is probably the most common, so check that one as soon as + # possible. Intel pretends to be GNU, so need to check Intel + # before checking for GNU. + + # Intel + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IF_IFELSE([defined(__INTEL_COMPILER) || defined(__ICC)], + [pmix_check_compiler_vendor_result="intel"])]) + + # Fujitsu + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IF_IFELSE([defined(__FUJITSU)], + [pmix_check_compiler_vendor_result="fujitsu"])]) + + # GNU + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__GNUC__], + [pmix_check_compiler_vendor_result="gnu" + + # We do not support gccfss as a compiler so die if + # someone tries to use said compiler. gccfss (gcc + # for SPARC Systems) is a compiler that is no longer + # supported by Oracle and it has some major flaws + # that prevents it from actually compiling PMIX code. + # So if we detect it we automatically bail. + + if ($CC --version | grep gccfss) >/dev/null 2>&1; then + AC_MSG_RESULT([gccfss]) + AC_MSG_WARN([Detected gccfss being used to compile PMIx.]) + AC_MSG_WARN([Because of several issues PMIx does not support]) + AC_MSG_WARN([the gccfss compiler. Please use a different compiler.]) + AC_MSG_WARN([If you didn't think you used gccfss you may want to]) + AC_MSG_WARN([check to see if the compiler you think you used is]) + AC_MSG_WARN([actually a link to gccfss.]) + AC_MSG_ERROR([Cannot continue]) + fi])]) + + # Borland Turbo C + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__TURBOC__], + [pmix_check_compiler_vendor_result="borland"])]) + + # Borland C++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__BORLANDC__], + [pmix_check_compiler_vendor_result="borland"])]) + + # Comeau C++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__COMO__], + [pmix_check_compiler_vendor_result="comeau"])]) + + # Compaq C/C++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IF_IFELSE([defined(__DECC) || defined(VAXC) || defined(__VAXC)], + [pmix_check_compiler_vendor_result="compaq"], + [PMIX_IF_IFELSE([defined(__osf__) && defined(__LANGUAGE_C__)], + [pmix_check_compiler_vendor_result="compaq"], + [PMIX_IFDEF_IFELSE([__DECCXX], + [pmix_check_compiler_vendor_result="compaq"])])])]) + + # Cray C/C++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([_CRAYC], + [pmix_check_compiler_vendor_result="cray"])]) + + # Diab C/C++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__DCC__], + [pmix_check_compiler_vendor_result="diab"])]) + + # Digital Mars + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IF_IFELSE([defined(__DMC__) || defined(__SC__) || defined(__ZTC__)], + [pmix_check_compiler_vendor_result="digital mars"])]) + + # HP ANSI C / aC++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IF_IFELSE([defined(__HP_cc) || defined(__HP_aCC)], + [pmix_check_compiler_vendor_result="hp"])]) + + # IBM XL C/C++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IF_IFELSE([defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__)], + [pmix_check_compiler_vendor_result="ibm"], + [PMIX_IF_IFELSE([defined(_AIX) && !defined(__GNUC__)], + [pmix_check_compiler_vendor_result="ibm"])])]) + + # KAI C++ (rest in peace) + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__KCC], + [pmix_check_compiler_vendor_result="kai"])]) + + # LCC + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__LCC__], + [pmix_check_compiler_vendor_result="lcc"])]) + + # MetaWare High C/C++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__HIGHC__], + [pmix_check_compiler_vendor_result="metaware high"])]) + + # Metrowerks Codewarrior + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__MWERKS__], + [pmix_check_compiler_vendor_result="metrowerks"])]) + + # MIPSpro (SGI) + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IF_IFELSE([defined(sgi) || defined(__sgi)], + [pmix_check_compiler_vendor_result="sgi"])]) + + # MPW C++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IF_IFELSE([defined(__MRC__) || defined(MPW_C) || defined(MPW_CPLUS)], + [pmix_check_compiler_vendor_result="mpw"])]) + + # Norcroft C + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__CC_NORCROFT], + [pmix_check_compiler_vendor_result="norcroft"])]) + + # Pelles C + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__POCC__], + [pmix_check_compiler_vendor_result="pelles"])]) + + # Portland Group + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__PGI], + [pmix_check_compiler_vendor_result="portland group"])]) + + # SAS/C + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IF_IFELSE([defined(SASC) || defined(__SASC) || defined(__SASC__)], + [pmix_check_compiler_vendor_result="sas"])]) + + # Sun Workshop C/C++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IF_IFELSE([defined(__SUNPRO_C) || defined(__SUNPRO_CC)], + [pmix_check_compiler_vendor_result="sun"])]) + + # TenDRA C/C++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__TenDRA__], + [pmix_check_compiler_vendor_result="tendra"])]) + + # Tiny C + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__TINYC__], + [pmix_check_compiler_vendor_result="tiny"])]) + + # USL C + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__USLC__], + [pmix_check_compiler_vendor_result="usl"])]) + + # Watcom C++ + AS_IF([test "$pmix_check_compiler_vendor_result" = "unknown"], + [PMIX_IFDEF_IFELSE([__WATCOMC__], + [pmix_check_compiler_vendor_result="watcom"])]) + + $1="$pmix_check_compiler_vendor_result" + unset pmix_check_compiler_vendor_result +]) diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_check_visibility.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix_check_visibility.m4 new file mode 100644 index 0000000000..5368ead9bf --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_check_visibility.m4 @@ -0,0 +1,90 @@ +# -*- 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-2007 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) 2006-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# PMIX_CHECK_VISIBILITY +# -------------------------------------------------------- +AC_DEFUN([PMIX_CHECK_VISIBILITY],[ + AC_REQUIRE([AC_PROG_GREP]) + + # Check if the compiler has support for visibility, like some + # versions of gcc, icc Sun Studio cc. + AC_ARG_ENABLE(visibility, + AC_HELP_STRING([--enable-visibility], + [enable visibility feature of certain compilers/linkers (default: enabled)])) + + pmix_visibility_define=0 + pmix_msg="whether to enable symbol visibility" + + if test "$enable_visibility" = "no"; then + AC_MSG_CHECKING([$pmix_msg]) + AC_MSG_RESULT([no (disabled)]) + else + CFLAGS_orig=$CFLAGS + + pmix_add= + case "$pmix_c_vendor" in + sun) + # Check using Sun Studio -xldscope=hidden flag + pmix_add=-xldscope=hidden + CFLAGS="$PMIX_CFLAGS_BEFORE_PICKY $pmix_add -errwarn=%all" + ;; + + *) + # Check using -fvisibility=hidden + pmix_add=-fvisibility=hidden + CFLAGS="$PMIX_CFLAGS_BEFORE_PICKY $pmix_add -Werror" + ;; + esac + + AC_MSG_CHECKING([if $CC supports $pmix_add]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include + __attribute__((visibility("default"))) int foo; + ]],[[fprintf(stderr, "Hello, world\n");]])], + [AS_IF([test -s conftest.err], + [$GREP -iq visibility conftest.err + # If we find "visibility" in the stderr, then + # assume it doesn't work + AS_IF([test "$?" = "0"], [pmix_add=])]) + ], [pmix_add=]) + AS_IF([test "$pmix_add" = ""], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes])]) + + CFLAGS=$CFLAGS_orig + PMIX_VISIBILITY_CFLAGS=$pmix_add + + if test "$pmix_add" != "" ; then + pmix_visibility_define=1 + AC_MSG_CHECKING([$pmix_msg]) + AC_MSG_RESULT([yes (via $pmix_add)]) + elif test "$enable_visibility" = "yes"; then + AC_MSG_ERROR([Symbol visibility support requested but compiler does not seem to support it. Aborting]) + else + AC_MSG_CHECKING([$pmix_msg]) + AC_MSG_RESULT([no (unsupported)]) + fi + unset pmix_add + fi + + AC_DEFINE_UNQUOTED([PMIX_C_HAVE_VISIBILITY], [$pmix_visibility_define], + [Whether C compiler supports symbol visibility or not]) +]) diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_ensure_contains_optflags.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix_ensure_contains_optflags.m4 new file mode 100644 index 0000000000..68bf36090b --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_ensure_contains_optflags.m4 @@ -0,0 +1,67 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +dnl University Research and Technology +dnl Corporation. All rights reserved. +dnl Copyright (c) 2004-2005 The University of Tennessee and The University +dnl of Tennessee Research Foundation. All rights +dnl reserved. +dnl Copyright (c) 2004-2007 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) 2007-2009 Sun Microsystems, Inc. All rights reserved. +dnl Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2013 Intel, Inc. All rights reserved +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl + +AC_DEFUN([PMIX_ENSURE_CONTAINS_OPTFLAGS],[ + +# Modularize this setup so that sub-configure.in scripts can use this +# same setup code. + +################################## +# Optimization flags +################################## + +# If the user did not specify optimization flags, add some (the value +# from $OPTFLAGS) + +co_arg="$1" +co_found=0 +for co_word in $co_arg; do + # See http://www.gnu.org/software/autoconf/manual/html_node/Quadrigraphs.html#Quadrigraphs + # for an explanation of @<:@ and @:>@ -- they m4 expand to [ and ] + case $co_word in + -g) co_found=1 ;; + -g@<:@1-3@:>@) co_found=1 ;; + +K@<:@0-5@:>@) co_found=1 ;; + -O) co_found=1 ;; + -O@<:@0-9@:>@) co_found=1 ;; + -xO) co_found=1 ;; + -xO@<:@0-9@:>@) co_found=1 ;; + -fast) co_found=1 ;; + + # The below Sun Studio flags require or + # trigger -xO optimization + -xvector*) co_found=1 ;; + -xdepend=yes) co_found=1 ;; + + esac +done + +if test "$co_found" = "0"; then + co_result="$OPTFLAGS $co_arg" +else + co_result="$co_arg" +fi + +# Clean up + +unset co_found co_word co_arg +]) diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_functions.m4 b/opal/mca/pmix/pmix120/pmix/config/pmix_functions.m4 new file mode 100644 index 0000000000..5fb6d7a58c --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_functions.m4 @@ -0,0 +1,533 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +dnl University Research and Technology +dnl Corporation. All rights reserved. +dnl Copyright (c) 2004-2005 The University of Tennessee and The University +dnl of Tennessee Research Foundation. All rights +dnl reserved. +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) 2007 Sun Microsystems, Inc. All rights reserved. +dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. +dnl Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2013 Intel, Inc. All rights reserved +dnl +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl +dnl Portions of this file derived from GASNet v1.12 (see "GASNet" +dnl comments, below) +dnl Copyright 2004, Dan Bonachea +dnl +dnl IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR +dnl DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT +dnl OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF +dnl CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl +dnl THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, +dnl INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +dnl AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS +dnl ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO +dnl PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +dnl + +AC_DEFUN([PMIX_CONFIGURE_SETUP],[ + +# Some helper script functions. Unfortunately, we cannot use $1 kinds +# of arugments here because of the m4 substitution. So we have to set +# special variable names before invoking the function. :-\ + +pmix_show_title() { + cat <@:*) + echo installing to directory \"$prefix\" + ;; + *) + AC_MSG_ERROR(prefix "$prefix" must be an absolute directory path) + ;; +esac + +# BEGIN: Derived from GASNet + +# Suggestion from Paul Hargrove to disable --program-prefix and +# friends. Heavily influenced by GASNet 1.12 acinclude.m4 +# functionality to do the same thing (copyright listed at top of this +# file). + +# echo program_prefix=$program_prefix program_suffix=$program_suffix program_transform_name=$program_transform_name +# undo prefix autoconf automatically adds during cross-compilation +if test "$cross_compiling" = yes && test "$program_prefix" = "${target_alias}-" ; then + program_prefix=NONE +fi +# normalize empty prefix/suffix +if test -z "$program_prefix" ; then + program_prefix=NONE +fi +if test -z "$program_suffix" ; then + program_suffix=NONE +fi +# undo transforms caused by empty prefix/suffix +if expr "$program_transform_name" : 's.^..$' >/dev/null || \ + expr "$program_transform_name" : 's.$$..$' >/dev/null || \ + expr "$program_transform_name" : 's.$$..;s.^..$' >/dev/null ; then + program_transform_name="s,x,x," +fi +if test "$program_prefix$program_suffix$program_transform_name" != "NONENONEs,x,x," ; then + AC_MSG_WARN([*** The PMIx configure script does not support --program-prefix, --program-suffix or --program-transform-name. Users are recommended to instead use --prefix with a unique directory and make symbolic links as desired for renaming.]) + AC_MSG_ERROR([*** Cannot continue]) +fi + +# END: Derived from GASNet +])dnl + +dnl ####################################################################### +dnl ####################################################################### +dnl ####################################################################### + +AC_DEFUN([PMIX_LOG_MSG],[ +# 1 is the message +# 2 is whether to put a prefix or not +if test -n "$2"; then + echo "configure:__oline__: $1" >&5 +else + echo $1 >&5 +fi])dnl + +dnl ####################################################################### +dnl ####################################################################### +dnl ####################################################################### + +AC_DEFUN([PMIX_LOG_FILE],[ +# 1 is the filename +if test -n "$1" && test -f "$1"; then + cat $1 >&5 +fi])dnl + +dnl ####################################################################### +dnl ####################################################################### +dnl ####################################################################### + +AC_DEFUN([PMIX_LOG_COMMAND],[ +# 1 is the command +# 2 is actions to do if success +# 3 is actions to do if fail +echo "configure:__oline__: $1" >&5 +$1 1>&5 2>&1 +pmix_status=$? +PMIX_LOG_MSG([\$? = $pmix_status], 1) +if test "$pmix_status" = "0"; then + unset pmix_status + $2 +else + unset pmix_status + $3 +fi])dnl + +dnl ####################################################################### +dnl ####################################################################### +dnl ####################################################################### + +AC_DEFUN([PMIX_UNIQ],[ +# 1 is the variable name to be uniq-ized +pmix_name=$1 + +# Go through each item in the variable and only keep the unique ones + +pmix_count=0 +for val in ${$1}; do + pmix_done=0 + pmix_i=1 + pmix_found=0 + + # Loop over every token we've seen so far + + pmix_done="`expr $pmix_i \> $pmix_count`" + while test "$pmix_found" = "0" && test "$pmix_done" = "0"; do + + # Have we seen this token already? Prefix the comparison with + # "x" so that "-Lfoo" values won't be cause an error. + + pmix_eval="expr x$val = x\$pmix_array_$pmix_i" + pmix_found=`eval $pmix_eval` + + # Check the ending condition + + pmix_done="`expr $pmix_i \>= $pmix_count`" + + # Increment the counter + + pmix_i="`expr $pmix_i + 1`" + done + + # 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). + + case $val in + -Xclang) + pmix_found=0 + pmix_i=`expr $pmix_count + 1` + ;; + esac + + # If we didn't find the token, add it to the "array" + + if test "$pmix_found" = "0"; then + pmix_eval="pmix_array_$pmix_i=$val" + eval $pmix_eval + pmix_count="`expr $pmix_count + 1`" + else + pmix_i="`expr $pmix_i - 1`" + fi +done + +# Take all the items in the "array" and assemble them back into a +# single variable + +pmix_i=1 +pmix_done="`expr $pmix_i \> $pmix_count`" +pmix_newval= +while test "$pmix_done" = "0"; do + pmix_eval="pmix_newval=\"$pmix_newval \$pmix_array_$pmix_i\"" + eval $pmix_eval + + pmix_eval="unset pmix_array_$pmix_i" + eval $pmix_eval + + pmix_done="`expr $pmix_i \>= $pmix_count`" + pmix_i="`expr $pmix_i + 1`" +done + +# Done; do the assignment + +pmix_newval="`echo $pmix_newval`" +pmix_eval="$pmix_name=\"$pmix_newval\"" +eval $pmix_eval + +# Clean up + +unset pmix_name pmix_i pmix_done pmix_newval pmix_eval pmix_count])dnl + +dnl ####################################################################### +dnl ####################################################################### +dnl ####################################################################### + +# PMIX_APPEND_UNIQ(variable, new_argument) +# ---------------------------------------- +# Append new_argument to variable if not already in variable. This assumes a +# space seperated list. +# +# This could probably be made more efficient :(. +AC_DEFUN([PMIX_APPEND_UNIQ], [ +for arg in $2; do + pmix_found=0; + for val in ${$1}; do + if test "x$val" = "x$arg" ; then + pmix_found=1 + break + fi + done + if test "$pmix_found" = "0" ; then + if test -z "$$1"; then + $1="$arg" + else + $1="$$1 $arg" + fi + fi +done +unset pmix_found +]) + +dnl ####################################################################### +dnl ####################################################################### +dnl ####################################################################### + +# Macro that serves as an alternative to using `which `. It is +# preferable to simply using `which ` because backticks (`) (aka +# backquotes) invoke a sub-shell which may source a "noisy" +# ~/.whatever file (and we do not want the error messages to be part +# of the assignment in foo=`which `). This macro ensures that we +# get a sane executable value. +AC_DEFUN([PMIX_WHICH],[ +# 1 is the variable name to do "which" on +# 2 is the variable name to assign the return value to + +PMIX_VAR_SCOPE_PUSH([pmix_prog pmix_file pmix_dir pmix_sentinel]) + +pmix_prog=$1 + +IFS_SAVE=$IFS +IFS="$PATH_SEPARATOR" +for pmix_dir in $PATH; do + if test -x "$pmix_dir/$pmix_prog"; then + $2="$pmix_dir/$pmix_prog" + break + fi +done +IFS=$IFS_SAVE + +PMIX_VAR_SCOPE_POP +])dnl + +dnl ####################################################################### +dnl ####################################################################### +dnl ####################################################################### + +# Declare some variables; use PMIX_VAR_SCOPE_END to ensure that they +# are cleaned up / undefined. +AC_DEFUN([PMIX_VAR_SCOPE_PUSH],[ + + # Is the private index set? If not, set it. + if test "x$pmix_scope_index" = "x"; then + pmix_scope_index=1 + fi + + # First, check to see if any of these variables are already set. + # This is a simple sanity check to ensure we're not already + # overwriting pre-existing variables (that have a non-empty + # value). It's not a perfect check, but at least it's something. + for pmix_var in $1; do + pmix_str="pmix_str=\"\$$pmix_var\"" + eval $pmix_str + + if test "x$pmix_str" != "x"; then + AC_MSG_WARN([Found configure shell variable clash!]) + AC_MSG_WARN([[PMIX_VAR_SCOPE_PUSH] called on "$pmix_var",]) + AC_MSG_WARN([but it is already defined with value "$pmix_str"]) + AC_MSG_WARN([This usually indicates an error in configure.]) + AC_MSG_ERROR([Cannot continue]) + fi + done + + # Ok, we passed the simple sanity check. Save all these names so + # that we can unset them at the end of the scope. + pmix_str="pmix_scope_$pmix_scope_index=\"$1\"" + eval $pmix_str + unset pmix_str + + env | grep pmix_scope + pmix_scope_index=`expr $pmix_scope_index + 1` +])dnl + +# Unset a bunch of variables that were previously set +AC_DEFUN([PMIX_VAR_SCOPE_POP],[ + # Unwind the index + pmix_scope_index=`expr $pmix_scope_index - 1` + pmix_scope_test=`expr $pmix_scope_index \> 0` + if test "$pmix_scope_test" = "0"; then + AC_MSG_WARN([[PMIX_VAR_SCOPE_POP] popped too many PMIX configure scopes.]) + AC_MSG_WARN([This usually indicates an error in configure.]) + AC_MSG_ERROR([Cannot continue]) + fi + + # Get the variable names from that index + pmix_str="pmix_str=\"\$pmix_scope_$pmix_scope_index\"" + eval $pmix_str + + # Iterate over all the variables and unset them all + for pmix_var in $pmix_str; do + unset $pmix_var + done +])dnl + + +dnl ####################################################################### +dnl ####################################################################### +dnl ####################################################################### + +# +# PMIX_WITH_OPTION_MIN_MAX_VALUE(NAME,DEFAULT_VALUE,LOWER_BOUND,UPPER_BOUND) +# Defines a variable PMIX_MAX_xxx, with "xxx" being specified as parameter $1 as "variable_name". +# If not set at configure-time using --with-max-xxx, the default-value ($2) is assumed. +# If set, value is checked against lower (value >= $3) and upper bound (value <= $4) +# +AC_DEFUN([PMIX_WITH_OPTION_MIN_MAX_VALUE], [ + max_value=[$2] + AC_MSG_CHECKING([maximum length of ]m4_translit($1, [_], [ ])) + AC_ARG_WITH([max-]m4_translit($1, [_], [-]), + AC_HELP_STRING([--with-max-]m4_translit($1, [_], [-])[=VALUE], + [maximum length of ]m4_translit($1, [_], [ ])[s. VALUE argument has to be specified (default: [$2]).])) + if test ! -z "$with_max_[$1]" && test "$with_max_[$1]" != "no" ; then + # Ensure it's a number (hopefully an integer!), and >0 + expr $with_max_[$1] + 1 > /dev/null 2> /dev/null + AS_IF([test "$?" != "0"], [happy=0], + [AS_IF([test $with_max_[$1] -ge $3 && test $with_max_[$1] -le $4], + [happy=1], [happy=0])]) + + # If badness in the above tests, bail + AS_IF([test "$happy" = "0"], + [AC_MSG_RESULT([bad value ($with_max_[$1])]) + AC_MSG_WARN([--with-max-]m4_translit($1, [_], [-])[s value must be >= $3 and <= $4]) + AC_MSG_ERROR([Cannot continue])]) + max_value=$with_max_[$1] + fi + AC_MSG_RESULT([$max_value]) + AC_DEFINE_UNQUOTED([PMIX_MAX_]m4_toupper($1), $max_value, + [Maximum length of ]m4_translit($1, [_], [ ])[s (default is $2)]) + [PMIX_MAX_]m4_toupper($1)=$max_value + AC_SUBST([PMIX_MAX_]m4_toupper($1)) +])dnl + +dnl ####################################################################### +dnl ####################################################################### +dnl ####################################################################### + +# Usage: PMIX_COMPUTE_MAX_VALUE(number_bytes, variable_to_set, action if overflow) +# Compute maximum value of datatype of +# number_bytes, setting the result in the second argument. Assumes a +# signed datatype. +AC_DEFUN([PMIX_COMPUTE_MAX_VALUE], [ + # This is more complicated than it really should be. But some + # expr implementations (OpenBSD) have an expr with a max value of + # 2^31 - 1, and we sometimes want to compute the max value of a + # type as big or bigger than that... + pmix_num_bits=`expr $1 \* 8 - 1` + newval=1 + value=1 + overflow=0 + + while test $pmix_num_bits -ne 0 ; do + newval=`expr $value \* 2` + if test 0 -eq `expr $newval \< 0` ; then + # if the new value is not negative, next iteration... + value=$newval + pmix_num_bits=`expr $pmix_num_bits - 1` + # if this was the last iteration, subtract 1 (as signed + # max positive is 2^num_bits - 1). Do this here instead + # of outside of the while loop because we might have + # already subtracted 1 by then if we're trying to find the + # max value of the same datatype expr uses as it's + # internal representation (ie, if we hit the else + # below...) + if test 0 -eq $pmix_num_bits ; then + value=`expr $value - 1` + fi + else + # if the new value is negative, we've over flowed. First, + # try adding value - 1 instead of value (see if we can get + # to positive max of expr) + newval=`expr $value - 1 + $value` + if test 0 -eq `expr $newval \< 0` ; then + value=$newval + # Still positive, this is as high as we can go. If + # pmix_num_bits is 1, we didn't actually overflow. + # Otherwise, we overflowed. + if test 1 -ne $pmix_num_bits ; then + overflow=1 + fi + else + # stil negative. Time to give up. + overflow=1 + fi + pmix_num_bits=0 + fi + done + + AS_VAR_SET([$2], [$value]) + AS_IF([test $overflow -ne 0], [$3]) +])dnl diff --git a/opal/mca/pmix/pmix120/pmix/config/pmix_get_version.sh b/opal/mca/pmix/pmix120/pmix/config/pmix_get_version.sh new file mode 100755 index 0000000000..6106af60c3 --- /dev/null +++ b/opal/mca/pmix/pmix120/pmix/config/pmix_get_version.sh @@ -0,0 +1,161 @@ +#!/bin/sh +# +# Copyright (c) 2004-2006 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-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Intel, Inc. All rights reserved +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + + + +# PMIX_GET_VERSION(version_file, variable_prefix) +# ----------------------------------------------- +# parse version_file for version information, setting +# the following shell variables: +# +# prefix_VERSION +# prefix_BASE_VERSION +# prefix_MAJOR_VERSION +# prefix_MINOR_VERSION +# prefix_RELEASE_VERSION +# prefix_GREEK_VERSION +# prefix_REPO_REV +# prefix_TARBALL_VERSION +# prefix_RELEASE_DATE + + + +srcfile="$1" +option="$2" + +if test -z "$srcfile"; then + option="--help" +else + + if test -f "$srcfile"; then + srcdir=`dirname $srcfile` + pmix_vers=`sed -n " + t clear + : clear + s/^major/PMIX_MAJOR_VERSION/ + s/^minor/PMIX_MINOR_VERSION/ + s/^release/PMIX_RELEASE_VERSION/ + s/^greek/PMIX_GREEK_VERSION/ + s/^repo_rev/PMIX_REPO_REV/ + s/^tarball_version/PMIX_TARBALL_VERSION/ + s/^date/PMIX_RELEASE_DATE/ + t print + b + : print + p" < "$srcfile"` + eval "$pmix_vers" + + PMIX_VERSION="$PMIX_MAJOR_VERSION.$PMIX_MINOR_VERSION.$PMIX_RELEASE_VERSION" + PMIX_VERSION="${PMIX_VERSION}${PMIX_GREEK_VERSION}" + + if test "$PMIX_TARBALL_VERSION" = ""; then + PMIX_TARBALL_VERSION=$PMIX_VERSION + fi + + # If repo_rev was not set in the VERSION file, then get it now + if test "$PMIX_REPO_REV" = ""; then + # See if we can find the "git" command. + git_happy=0 + git --version > /dev/null 2>&1 + if test $? -eq 0; then + git_happy=1 + fi + + # If we're in a git repo and we found the git command, use + # git describe to get the repo rev + if test -d "$srcdir/.git" && test $git_happy -eq 1; then + if test "$srcdir" != "`pwd`"; then + git_save_dir=`pwd` + cd $srcdir + PMIX_REPO_REV=`git describe --tags --always` + cd $git_save_dir + unset git_save_dir + else + PMIX_REPO_REV=`git describe --tags --always` + fi + else + PMIX_REPO_REV="date`date '+%Y-%m-%d'`" + fi + fi + + + fi + + + if test "$option" = ""; then + option="--full" + fi +fi + +case "$option" in + --full|-v|--version) + echo $PMIX_VERSION + ;; + --major) + echo $PMIX_MAJOR_VERSION + ;; + --minor) + echo $PMIX_MINOR_VERSION + ;; + --release) + echo $PMIX_RELEASE_VERSION + ;; + --greek) + echo $PMIX_GREEK_VERSION + ;; + --repo-rev) + echo $PMIX_REPO_REV + ;; + --tarball) + echo $PMIX_TARBALL_VERSION + ;; + --release-date) + echo $PMIX_RELEASE_DATE + ;; + --all) + echo ${PMIX_VERSION} : ${PMIX_MAJOR_VERSION} : ${PMIX_MINOR_VERSION} : ${PMIX_RELEASE_VERSION} : ${PMIX_GREEK_VERSION} : ${PMIX_REPO_REV} : ${PMIX_TARBALL_VERSION} + ;; + -h|--help) + cat <