1
1

Merge pull request #4406 from rhc54/topic/update

Sync to PMIx master (now v3.0)
Этот коммит содержится в:
Ralph Castain 2017-10-27 12:22:44 -05:00 коммит произвёл GitHub
родитель df48ddd2a1 5c61a4e3a5
Коммит ae4f310c0b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
55 изменённых файлов: 7515 добавлений и 365 удалений

15
opal/mca/event/external/configure.m4 поставляемый
Просмотреть файл

@ -2,9 +2,10 @@
#
# Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science
# Copyright (c) 2015-2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
#
# Copyright (c) 2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -95,9 +96,17 @@ AC_DEFUN([MCA_opal_event_external_CONFIG],[
AS_IF([test "$with_libevent" != "external" && test "$with_libevent" != "yes"],
[opal_event_dir=$with_libevent
AC_MSG_RESULT([$opal_event_dir])
OPAL_CHECK_WITHDIR([libevent], [$with_libdir],
OPAL_CHECK_WITHDIR([libevent], [$opal_event_dir],
[include/event.h])
],
AS_IF([test -z "$with_libevent_libdir" || test "$with_libevent_libdir" = "yes"],
[AS_IF([test -d "$with_libevent/lib64"],
[opal_event_libdir="$with_libevent/lib64"],
[AS_IF([test -d "$with_libevent/lib"],
[opal_event_libdir="$with_libevent/lib"],
[AC_MSG_WARN([libevent library were neither found under:])
AC_MSG_WARN([ $with_libevent/lib64])
AC_MSG_WARN([ $with_libevent/lib])
AC_MSG_ERROR([Cannot continue])])])])],
[AC_MSG_RESULT([(default search paths)])])
AS_IF([test ! -z "$with_libevent_libdir" && test "$with_libevent_libdir" != "yes"],
[opal_event_libdir="$with_libevent_libdir"])

Просмотреть файл

@ -53,13 +53,19 @@ AC_DEFUN([MCA_opal_pmix_pmix3x_CONFIG],[
opal_pmix_pmix3x_timing_flag=--disable-pmix-timing
fi
opal_pmix_pmix3x_args="$opal_pmix_pmix3x_timing_flag --without-tests-examples --disable-pmix-backward-compatibility --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\""
opal_pmix_pmix3x_args="$opal_pmix_pmix3x_timing_flag --without-tests-examples --disable-pmix-binaries --disable-pmix-backward-compatibility --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\""
AS_IF([test "$enable_debug" = "yes"],
[opal_pmix_pmix3x_args="--enable-debug $opal_pmix_pmix3x_args"
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"],
[opal_pmix_pmix3x_args="--disable-debug $opal_pmix_pmix3x_args"
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS"])
AS_IF([test "$enable_install_libpmix" != "yes"],
AS_IF([test "$enable_install_libpmix" == "yes"],
[AS_IF([test "$opal_event_external_want" != "yes"],
[AC_MSG_WARN([Installing the embedded PMIx library as a separate])
AC_MSG_WARN([standalone library requires that OMPI be configured])
AC_MSG_WARN([against an external version of libevent.])
AC_MSG_ERROR([Cannot continue])])
opal_pmix_pmix3x_args="--with-pmix-extra-lib=\"$opal_event_libdir/libevent.la $opal_event_libdir/libevent_pthreads.la\" $opal_pmix_pmix3x_args"],
[opal_pmix_pmix3x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX2X_ --enable-embedded-mode $opal_pmix_pmix3x_args"])
AS_IF([test "$with_devel_headers" = "yes"],
[opal_pmix_pmix3x_args="--with-devel-headers $opal_pmix_pmix3x_args"])

Просмотреть файл

@ -25,8 +25,44 @@ Master (not on release branches yet)
------------------------------------
2.0.0
------
2.1.0 -- 26 Oct 2017
----------------------
**** NOTE: This release contains the first implementation of cross-version
**** support. Servers using v2.1.0 are capable of supporting clients using
**** PMIx versions v1.2 and above. Clients using v2.1.0 are able to interact
**** with servers based on v1.2 and above.
- Added cross-version communication support
- Enable reporting of contact URI to stdout, stderr, or file (PR #538)
- Enable support for remote tool connections (PR #540, #542)
- Cleanup libevent configure logi to support default install paths (PR #541)
- Debounce "unreachable" notifications for tools when they disconnect (PR #544)
2.0.2 -- 19 Oct 2017
----------------------
- Update RPM spec file (rpmbuild -ta, and --rebuild fixes) (PR #523)
- Support singletons in PMI-1/PMI-2 (PR #537)
- Provide missing implementation support for arrays of pmix_value_t's (PR #531)
- Remove unsupported assembly code for MIPS and ARM processors
prior to v6 (PR #547)
- Fix path separator for PMIx configuration files (PR #547)
- Add configure option to enable/disable the default value for the
show-load-errors MCA param (PR #547)
2.0.1 -- 24 Aug. 2017
----------------------
- Protect PMIX_INFO_FREE macro from NULL data arrays
- Added attributes to support HWLOC shared memory regions
- Fixed several syntax errors in configure code
- Fixed several visibility errors
- Correctly return status from PMIx_Fence operation
- Restore tool connection support and implement search
operations to discover rendezvous files
2.0.0 -- 22 Jun 2017
----------------------
**** NOTE: This release implements the complete PMIX v2.0 Standard
**** and therefore includes a number of new APIs and features. These
**** can be tracked by their RFC's in the RFC repository at:

Просмотреть файл

@ -30,7 +30,7 @@ greek=
# command, or with the date (if "git describe" fails) in the form of
# "date<date>".
repo_rev=gitd74c321
repo_rev=gitffa464b
# If tarball_version is not empty, it is used as the version string in
# the tarball filename, regardless of all other versions listed in
@ -44,7 +44,7 @@ tarball_version=
# The date when this release was created
date="Oct 14, 2017"
date="Oct 26, 2017"
# The shared library version of each of PMIx's public libraries.
# These versions are maintained in accordance with the "Library

Просмотреть файл

@ -254,7 +254,7 @@ sub mca_generate_framework_header(\$\@) {
foreach my $framework (@frameworks) {
# There is no common framework object
if ($framework ne "common") {
if ($framework ne "common" and $framework ne "src") {
my $framework_name = "pmix_${framework}_base_framework";
$framework_array_output .= " &$framework_name,\n";
$framework_decl_output .= "extern pmix_mca_base_framework_t $framework_name;\n";
@ -269,7 +269,7 @@ sub mca_generate_framework_header(\$\@) {
#ifndef $ifdef_string
#define $ifdef_string
#include <pmix/mca/base/mca_base_framework.h>
#include <src/mca/base/pmix_mca_base_framework.h>
$framework_decl_output
static pmix_mca_base_framework_t *pmix_frameworks[] = {

Просмотреть файл

@ -123,6 +123,24 @@ AC_DEFUN([PMIX_SETUP_CORE],[
AC_DEFINE_UNQUOTED([PMIX_RELEASE_VERSION], [$PMIX_RELEASE_VERSION],
[The library release version is always available, contrary to VERSION])
PMIX_GREEK_VERSION="`$PMIX_top_srcdir/config/pmix_get_version.sh $PMIX_top_srcdir/VERSION --greek`"
if test "$?" != "0"; then
AC_MSG_ERROR([Cannot continue])
fi
AC_SUBST(PMIX_GREEK_VERSION)
PMIX_REPO_REV="`$PMIX_top_srcdir/config/pmix_get_version.sh $PMIX_top_srcdir/VERSION --repo-rev`"
if test "$?" != "0"; then
AC_MSG_ERROR([Cannot continue])
fi
AC_SUBST(PMIX_REPO_REV)
PMIX_RELEASE_DATE="`$PMIX_top_srcdir/config/pmix_get_version.sh $PMIX_top_srcdir/VERSION --release-date`"
if test "$?" != "0"; then
AC_MSG_ERROR([Cannot continue])
fi
AC_SUBST(PMIX_RELEASE_DATE)
# Debug mode?
AC_MSG_CHECKING([if want pmix maintainer support])
pmix_debug=
@ -175,6 +193,21 @@ AC_DEFUN([PMIX_SETUP_CORE],[
PMIX_EXTRA_LIB=])
AC_SUBST(PMIX_EXTRA_LIB)
#
# Package/brand string
#
AC_MSG_CHECKING([if want package/brand string])
AC_ARG_WITH([pmix-package-string],
[AC_HELP_STRING([--with-pmix-package-string=STRING],
[Use a branding string throughout PMIx])])
if test "$with_pmix_package_string" = "" || test "$with_pmix_package_string" = "no"; then
with_package_string="PMIx $PMIX_CONFIGURE_USER@$PMIX_CONFIGURE_HOST Distribution"
fi
AC_DEFINE_UNQUOTED([PMIX_PACKAGE_STRING], ["$with_package_string"],
[package/branding string for PMIx])
AC_MSG_RESULT([$with_package_string])
# GCC specifics.
if test "x$GCC" = "xyes"; then
PMIX_GCC_CFLAGS="-Wall -Wmissing-prototypes -Wundef"
@ -794,6 +827,10 @@ AC_DEFUN([PMIX_SETUP_CORE],[
pmix_config_prefix[src/Makefile]
pmix_config_prefix[src/util/keyval/Makefile]
pmix_config_prefix[src/mca/base/Makefile]
pmix_config_prefix[src/tools/pevent/Makefile]
pmix_config_prefix[src/tools/pinfo/Makefile]
pmix_config_prefix[src/tools/plookup/Makefile]
pmix_config_prefix[src/tools/pps/Makefile]
)
# publish any embedded flags so external wrappers can use them
@ -1059,6 +1096,25 @@ else
fi
AM_CONDITIONAL([WANT_INSTALL_HEADERS], [test $WANT_INSTALL_HEADERS -eq 1])
#
# Do we want to install binaries?
#
AC_MSG_CHECKING([if want to disable binaries])
AC_ARG_ENABLE(pmix-binaries,
AC_HELP_STRING([--enable-pmix-binaries],
[enable PMIx tools]))
if test "$enable_pmix_binaries" = "no"; then
AC_MSG_RESULT([no])
WANT_PMIX_BINARIES=0
else
AC_MSG_RESULT([yes])
WANT_PMIX_BINARIES=1
fi
AM_CONDITIONAL([PMIX_INSTALL_BINARIES], [test $WANT_PMIX_BINARIES -eq 1])
])dnl
# This must be a standalone routine so that it can be called both by

Просмотреть файл

@ -22,7 +22,7 @@ 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)
PMIX_CHECK_COMPILER_STRING(VERSION_STR)
])dnl
@ -31,10 +31,11 @@ AC_DEFUN([PMIX_CHECK_COMPILER], [
AC_CACHE_CHECK([for compiler $lower], pmix_cv_compiler_[$1],
[
CPPFLAGS_orig=$CPPFLAGS
CPPFLAGS="-I${top_pmix_srcdir}/src/include $CPPFLAGS"
CPPFLAGS="-I${top_srcdir}/src/include $CPPFLAGS"
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include "pmix_portable_platform.h"
int main (int argc, char * argv[])
{
@ -57,16 +58,51 @@ int main (int argc, char * argv[])
[The compiler $lower which PMIx was built with])
])dnl
AC_DEFUN([PMIX_CHECK_COMPILER_STRING], [
lower=m4_tolower($1)
AC_CACHE_CHECK([for compiler $lower], pmix_cv_compiler_[$1],
[
CPPFLAGS_orig=$CPPFLAGS
CPPFLAGS="-I${top_srcdir}/src/include $CPPFLAGS"
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include "pmix_portable_platform.h"
int main (int argc, char * argv[])
{
FILE * f;
f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf (f, "%s", 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
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"
CPPFLAGS="-I${top_srcdir}/src/include $CPPFLAGS"
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include "pmix_portable_platform.h"
int main (int argc, char * argv[])
{

Просмотреть файл

@ -13,7 +13,7 @@ dnl All rights reserved.
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
dnl Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
dnl Copyright (c) 2017 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl
@ -102,21 +102,21 @@ PMIX_CONFIGURE_DATE="`date`"
# Save these details so that they can be used in pmix_info later
#
AC_SUBST(PMIX_CONFIGURE_USER)
AC_DEFINE_UNQUOTED([PMIX_CONFIGURE_USER], "$PMIX_CONFIGURE_USER",
[User who built PMIx])
AC_SUBST(PMIX_CONFIGURE_HOST)
AC_SUBST(PMIX_CONFIGURE_DATE)])dnl
AC_DEFINE_UNQUOTED([PMIX_CONFIGURE_HOST], "$PMIX_CONFIGURE_HOST",
[Hostname where PMIx was built])
AC_SUBST(PMIX_CONFIGURE_DATE)
AC_DEFINE_UNQUOTED([PMIX_CONFIGURE_DATE], "$PMIX_CONFIGURE_DATE",
[Date when PMIx was built])
])dnl
dnl #######################################################################
dnl #######################################################################
dnl #######################################################################
AC_DEFUN([PMIX_BASIC_SETUP],[
#
# Save some stats about this build
#
PMIX_CONFIGURE_USER="`whoami`"
PMIX_CONFIGURE_HOST="`(hostname || uname -n) 2> /dev/null | sed 1q`"
PMIX_CONFIGURE_DATE="`date`"
#
# Make automake clean emacs ~ files for "make clean"

Просмотреть файл

@ -0,0 +1,41 @@
# -*- shell-script -*-
#
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# PMIX_SET_MCA_PREFIX([mca_prefix]
#
# This macro sets a prefix for the MCA parameter system. Specifically,
# OMPI_MCA_<foo> becomes <mca_prefix>_<foo>
#
# --------------------------------------------------------
AC_DEFUN([PMIX_SET_MCA_PREFIX],[
AS_IF([test "$pmix_mca_prefix_set" = "yes"],
[AC_MSG_WARN([PMIX mca prefix was already set!])
AC_MSG_WARN([This is a configury programming error])
AC_MSG_ERROR([Cannot continue])])
MCA_PREFIX=$1
pmix_mca_prefix_set=yes
AC_DEFINE_UNQUOTED([PMIX_MCA_PREFIX], ["$MCA_PREFIX"], [MCA prefix string for envars])
])dnl
#
# Set the MCA cmd line identifier - i.e., change "-mca" to "-<foo>"
#
AC_DEFUN([PMIX_SET_MCA_CMD_LINE_ID],[
AS_IF([test "$pmix_mca_cmd_id_set" = "yes"],
[AC_MSG_WARN([PMIX mca cmd line id was already set!])
AC_MSG_WARN([This is a configury programming error])
AC_MSG_ERROR([Cannot continue])])
MCA_CMD_LINE_ID=$1
pmix_mca_cmd_id_set=yes
AC_DEFINE_UNQUOTED([PMIX_MCA_CMD_LINE_ID], ["$MCA_CMD_LINE_ID"], [MCA cmd line identifier])
])dnl

Просмотреть файл

@ -0,0 +1,38 @@
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2016 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl Copyright (c) 2017 Intel, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
dnl PMIX_CAPTURE_CONFIGURE_CLI
dnl
dnl Capture configure command line and do the AC substitution
dnl
dnl Arguments: the variable in which command line will be captured
dnl
dnl Dependencies: None
dnl
AC_DEFUN([PMIX_CAPTURE_CONFIGURE_CLI],[
# Capture configure command line do the AC substitution
PMIX_VAR_SCOPE_PUSH([sed_quote_subst arg quoted_arg])
$1=
for arg in "$[]@"; do
sed_quote_subst='s/\(@<:@`"$\\@:>@\)/\\\1/g'
case "$arg" in
*@<:@\\\`\"\$[]@:>@*)
quoted_arg=\'`echo "$arg" | sed $sed_quote_subst`\' ;;
*)
quoted_arg="\'$arg\'" ;;
esac
eval "$1=\$$1\\ \$quoted_arg"
done
PMIX_VAR_SCOPE_POP
AC_SUBST($1)
])

Просмотреть файл

@ -51,16 +51,20 @@ AC_CONFIG_AUX_DIR(./config)
# -I in ACLOCAL_AMFLAGS in the top-level Makefile.am.
AC_CONFIG_MACRO_DIR(./config)
PMIX_CAPTURE_CONFIGURE_CLI([PMIX_CONFIGURE_CLI])
# Get our platform support file. This has to be done very, very early
# because it twiddles random bits of autoconf
PMIX_LOAD_PLATFORM
PMIX_TOP_BUILDDIR="`pwd`"
AC_SUBST(PMIX_TOP_BUILDDIR)
top_buildir=`pwd`
cd "$srcdir"
PMIX_TOP_SRCDIR="`pwd`"
AC_SUBST(PMIX_TOP_SRCDIR)
cd "$PMIX_TOP_BUILDDIR"
top_srcdir=`pwd`
AC_MSG_NOTICE([builddir: $PMIX_TOP_BUILDDIR])
AC_MSG_NOTICE([srcdir: $PMIX_TOP_SRCDIR])
@ -165,6 +169,10 @@ AM_PROG_LEX
# Configuration options
############################################################################
# Set the MCA prefix
PMIX_SET_MCA_PREFIX([PMIX_MCA_])
PMIX_SET_MCA_CMD_LINE_ID([pmca])
# Define PMIx configure arguments
PMIX_DEFINE_ARGS
# Define some basic useful values

7
opal/mca/pmix/pmix3x/pmix/contrib/pmix.spec Обычный файл → Исполняемый файл
Просмотреть файл

@ -461,7 +461,7 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root, -)
%if %(test "%{_prefix}" = "/usr" && echo 1 || echo 0)
#%{_bindir}/*
%{_bindir}/*
%{_includedir}/*
%{_libdir}/*
%{_datadir}
@ -472,7 +472,7 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%if !%{sysconfdir_in_prefix}
%{_sysconfdir}/*
%endif
# If %{install_in_opt}, then we're instaling PMIx to
# If %{install_in_opt}, then we're installing PMIx to
# /opt/pmix<version>. But be sure to also explicitly mention
# /opt/pmix so that it can be removed by RPM when everything under
# there is also removed.
@ -497,6 +497,9 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
#
#############################################################################
%changelog
* Tue Oct 17 2017 Ralph Castain <rhc@open-mpi.org>
- Add PMIx bin directory
* Thu Sep 21 2017 Ralph Castain <rhc@open-mpi.org>
- Add PMIx etc directory

Просмотреть файл

@ -23,24 +23,63 @@
*
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <pthread.h>
#include <pmix_tool.h>
typedef struct {
pthread_mutex_t mutex;
pthread_cond_t cond;
volatile bool active;
pmix_status_t status;
} mylock_t;
#define DEBUG_CONSTRUCT_LOCK(l) \
do { \
pthread_mutex_init(&(l)->mutex, NULL); \
pthread_cond_init(&(l)->cond, NULL); \
(l)->active = true; \
(l)->status = PMIX_SUCCESS; \
} while(0)
#define DEBUG_DESTRUCT_LOCK(l) \
do { \
pthread_mutex_destroy(&(l)->mutex); \
pthread_cond_destroy(&(l)->cond); \
} while(0)
#define DEBUG_WAIT_THREAD(lck) \
do { \
pthread_mutex_lock(&(lck)->mutex); \
while ((lck)->active) { \
pthread_cond_wait(&(lck)->cond, &(lck)->mutex); \
} \
pthread_mutex_unlock(&(lck)->mutex); \
} while(0)
#define DEBUG_WAKEUP_THREAD(lck) \
do { \
pthread_mutex_lock(&(lck)->mutex); \
(lck)->active = false; \
pthread_cond_broadcast(&(lck)->cond); \
pthread_mutex_unlock(&(lck)->mutex); \
} while(0)
/* define a structure for collecting returned
* info from a query */
typedef struct {
volatile bool active;
mylock_t lock;
pmix_info_t *info;
size_t ninfo;
} myquery_data_t;
static int attach_to_running_job(char *nspace);
static bool waiting_for_debugger = true;
static mylock_t waiting_for_debugger;
static pmix_proc_t myproc;
/* this is a callback function for the PMIx_Query
@ -83,7 +122,7 @@ static void cbfunc(pmix_status_t status,
}
/* release the block */
mq->active = false;
DEBUG_WAKEUP_THREAD(&mq->lock);
}
/* this is the event notification function we pass down below
@ -124,7 +163,7 @@ static void release_fn(size_t evhdlr_registration_id,
cbfunc(PMIX_EVENT_ACTION_COMPLETE, NULL, 0, NULL, NULL, cbdata);
}
/* flag that the debugger is complete so we can exit */
waiting_for_debugger = false;
DEBUG_WAKEUP_THREAD(&waiting_for_debugger);
}
/* event handler registration is done asynchronously because it
@ -138,31 +177,72 @@ static void evhandler_reg_callbk(pmix_status_t status,
size_t evhandler_ref,
void *cbdata)
{
volatile int *active = (volatile int*)cbdata;
mylock_t *lock = (mylock_t*)cbdata;
if (PMIX_SUCCESS != status) {
fprintf(stderr, "Client %s:%d EVENT HANDLER REGISTRATION FAILED WITH STATUS %d, ref=%lu\n",
myproc.nspace, myproc.rank, status, (unsigned long)evhandler_ref);
}
*active = status;
lock->status = status;
DEBUG_WAKEUP_THREAD(lock);
}
static pmix_status_t spawn_debugger(char *appspace)
{
pmix_status_t rc;
pmix_info_t *dinfo;
pmix_app_t *debugger;
size_t dninfo;
char cwd[1024];
char dspace[PMIX_MAX_NSLEN+1];
/* setup the debugger */
PMIX_APP_CREATE(debugger, 1);
debugger[0].cmd = strdup("./debuggerd");
PMIX_ARGV_APPEND(rc, debugger[0].argv, "./debuggerd");
getcwd(cwd, 1024); // point us to our current directory
debugger[0].cwd = strdup(cwd);
/* provide directives so the daemons go where we want, and
* let the RM know these are debugger daemons */
dninfo = 5;
PMIX_INFO_CREATE(dinfo, dninfo);
PMIX_INFO_LOAD(&dinfo[0], PMIX_MAPBY, "ppr:1:node", PMIX_STRING); // instruct the RM to launch one copy of the executable on each node
PMIX_INFO_LOAD(&dinfo[1], PMIX_DEBUGGER_DAEMONS, NULL, PMIX_BOOL); // these are debugger daemons
PMIX_INFO_LOAD(&dinfo[2], PMIX_DEBUG_JOB, appspace, PMIX_STRING); // the nspace being debugged
PMIX_INFO_LOAD(&dinfo[3], PMIX_NOTIFY_COMPLETION, NULL, PMIX_BOOL); // notify us when the debugger job completes
PMIX_INFO_LOAD(&dinfo[4], PMIX_DEBUG_WAITING_FOR_NOTIFY, NULL, PMIX_BOOL); // tell the daemon that the proc is waiting to be released
/* spawn the daemons */
fprintf(stderr, "Debugger: spawning %s\n", debugger[0].cmd);
if (PMIX_SUCCESS != (rc = PMIx_Spawn(dinfo, dninfo, debugger, 1, dspace))) {
fprintf(stderr, "Debugger daemons failed to launch with error: %s\n", PMIx_Error_string(rc));
}
fprintf(stderr, "SPAWNED DEBUGGERD\n");
/* cleanup */
PMIX_INFO_FREE(dinfo, dninfo);
PMIX_APP_FREE(debugger, 1);
return rc;
}
#define DBGR_LOOP_LIMIT 10
int main(int argc, char **argv)
{
pmix_status_t rc;
pmix_info_t *info, *dinfo;
pmix_app_t *app, *debugger;
size_t ninfo, napps, dninfo;
char *tdir, *nspace = NULL;
char appspace[PMIX_MAX_NSLEN+1], dspace[PMIX_MAX_NSLEN+1];
pmix_info_t *info;
pmix_app_t *app;
size_t ninfo, napps;
char *tdir, *filename, *sdir, *str, *nspace = NULL;
char appspace[PMIX_MAX_NSLEN+1];
int i;
pmix_query_t *query;
size_t nq, n;
myquery_data_t myquery_data;
bool cospawn = false, stop_on_exec = false;
char cwd[1024];
volatile int active;
pmix_status_t code = PMIX_ERR_JOB_TERMINATED;
char hostname[1024];
mylock_t mylock;
/* Process any arguments we were given */
for (i=1; i < argc; i++) {
@ -191,33 +271,15 @@ int main(int argc, char **argv)
exit(1);
}
}
info = NULL;
ninfo = 0;
/* we need to provide some info to the PMIx tool library so
* it can find the server's contact info. The simplest way
* of doing this here is to look for an environmental variable
* that tells us where to look. The PMIx reference server only
* allows one instantiation of the server per user, so setting
* this up is something a user could do in their login script.
* The reference server is based on OpenMPI, and so the contact
* info will always be found at:
*
* $TMPDIR/ompi.<nodename>.<numerical-userid>/dvm
*
* NOTE: we will eliminate this requirement in a future version
*/
if (NULL == (tdir = getenv("PMIX_SERVER_TMPDIR"))) {
fprintf(stderr, "Tool usage requires that the PMIX_SERVER_TMPDIR envar\n");
fprintf(stderr, "be set to point at the directory where the PMIx Reference\n");
fprintf(stderr, "Server leaves its contact info file.\n");
exit(1);
}
/* init us - pass along the location of the contact file */
ninfo = 1;
PMIX_INFO_CREATE(info, ninfo);
PMIX_INFO_LOAD(&info[0], PMIX_SERVER_TMPDIR, tdir, PMIX_STRING);
DEBUG_CONSTRUCT_LOCK(&waiting_for_debugger);
/* use the system connection first, if available */
PMIX_INFO_CREATE(info, 1);
PMIX_INFO_LOAD(&info[0], PMIX_CONNECT_SYSTEM_FIRST, NULL, PMIX_BOOL);
/* init as a tool */
if (PMIX_SUCCESS != (rc = PMIx_tool_init(&myproc, info, ninfo))) {
fprintf(stderr, "PMIx_tool_init failed: %d\n", rc);
exit(rc);
@ -227,27 +289,19 @@ int main(int argc, char **argv)
fprintf(stderr, "Tool ns %s rank %d: Running\n", myproc.nspace, myproc.rank);
/* register a default event handler */
active = -1;
DEBUG_CONSTRUCT_LOCK(&mylock);
PMIx_Register_event_handler(NULL, 0, NULL, 0,
notification_fn, evhandler_reg_callbk, (void*)&active);
while (-1 == active) {
usleep(10);
}
if (0 != active) {
exit(active);
}
notification_fn, evhandler_reg_callbk, (void*)&mylock);
DEBUG_WAIT_THREAD(&mylock);
DEBUG_DESTRUCT_LOCK(&mylock);
/* register another handler specifically for when the debugger
* job completes */
active = -1;
DEBUG_CONSTRUCT_LOCK(&mylock);
PMIx_Register_event_handler(&code, 1, NULL, 0,
release_fn, evhandler_reg_callbk, (void*)&active);
while (-1 == active) {
usleep(10);
}
if (0 != active) {
exit(active);
}
release_fn, evhandler_reg_callbk, (void*)&mylock);
DEBUG_WAIT_THREAD(&mylock);
DEBUG_DESTRUCT_LOCK(&mylock);
/* if we are attaching to a running job, then attach to it */
if (NULL != nspace) {
@ -270,18 +324,17 @@ int main(int argc, char **argv)
PMIX_ARGV_APPEND(rc, query[0].keys, PMIX_QUERY_SPAWN_SUPPORT);
PMIX_ARGV_APPEND(rc, query[0].keys, PMIX_QUERY_DEBUG_SUPPORT);
/* setup the caddy to retrieve the data */
DEBUG_CONSTRUCT_LOCK(&myquery_data.lock);
myquery_data.info = NULL;
myquery_data.ninfo = 0;
myquery_data.active = true;
/* execute the query */
fprintf(stderr, "Debugger: querying capabilities\n");
if (PMIX_SUCCESS != (rc = PMIx_Query_info_nb(query, nq, cbfunc, (void*)&myquery_data))) {
fprintf(stderr, "PMIx_Query_info failed: %d\n", rc);
goto done;
}
while (myquery_data.active) {
usleep(10);
}
DEBUG_WAIT_THREAD(&myquery_data.lock);
DEBUG_DESTRUCT_LOCK(&myquery_data.lock);
/* we should have received back two info structs, one containing
* a comma-delimited list of PMIx spawn attributes the RM supports,
@ -334,13 +387,11 @@ int main(int argc, char **argv)
/* setup the executable */
app[0].cmd = strdup("client");
PMIX_ARGV_APPEND(rc, app[0].argv, "./client");
if (NULL == getcwd(cwd, 1024)) { // point us to our current directory
goto done;
}
getcwd(cwd, 1024); // point us to our current directory
app[0].cwd = strdup(cwd);
app[0].maxprocs = 2;
/* provide job-level directives so the apps do what the user requested */
ninfo = 2;
ninfo = 4;
PMIX_INFO_CREATE(info, ninfo);
PMIX_INFO_LOAD(&info[0], PMIX_MAPBY, "slot", PMIX_STRING); // map by slot
if (stop_on_exec) {
@ -348,113 +399,59 @@ int main(int argc, char **argv)
} else {
PMIX_INFO_LOAD(&info[1], PMIX_DEBUG_STOP_IN_INIT, NULL, PMIX_BOOL); // procs are to pause in PMIx_Init for debugger attach
}
PMIX_INFO_LOAD(&info[2], PMIX_FWD_STDOUT, NULL, PMIX_BOOL); // forward stdout to me
PMIX_INFO_LOAD(&info[3], PMIX_FWD_STDERR, NULL, PMIX_BOOL); // forward stderr to me
/* spawn the job - the function will return when the app
* has been launched */
fprintf(stderr, "Debugger: spawning %s\n", app[0].cmd);
if (PMIX_SUCCESS != (rc = PMIx_Spawn(info, ninfo, app, napps, appspace))) {
fprintf(stderr, "Application failed to launch with error: %s\n", PMIx_Error_string(rc));
fprintf(stderr, "Application failed to launch with error: %s(%d)\n", PMIx_Error_string(rc), rc);
goto done;
}
PMIX_INFO_FREE(info, ninfo);
PMIX_APP_FREE(app, napps);
/* setup the debugger */
PMIX_APP_CREATE(debugger, 1);
debugger[0].cmd = strdup("./debuggerd");
PMIX_ARGV_APPEND(rc, debugger[0].argv, "./debuggerd");
debugger[0].cwd = strdup(cwd);
/* provide directives so the daemons go where we want, and
* let the RM know these are debugger daemons */
dninfo = 5;
PMIX_INFO_CREATE(dinfo, dninfo);
PMIX_INFO_LOAD(&dinfo[0], PMIX_MAPBY, "ppr:1:node", PMIX_STRING); // instruct the RM to launch one copy of the executable on each node
PMIX_INFO_LOAD(&dinfo[1], PMIX_DEBUGGER_DAEMONS, NULL, PMIX_BOOL); // these are debugger daemons
PMIX_INFO_LOAD(&dinfo[2], PMIX_DEBUG_JOB, appspace, PMIX_STRING); // the nspace being debugged
PMIX_INFO_LOAD(&dinfo[3], PMIX_NOTIFY_COMPLETION, NULL, PMIX_BOOL); // notify us when the debugger job completes
PMIX_INFO_LOAD(&dinfo[4], PMIX_DEBUG_WAITING_FOR_NOTIFY, NULL, PMIX_BOOL); // tell the daemon that the proc is waiting to be released
/* spawn the daemons */
fprintf(stderr, "Debugger: spawning %s\n", debugger[0].cmd);
if (PMIX_SUCCESS != (rc = PMIx_Spawn(dinfo, dninfo, debugger, 1, dspace))) {
fprintf(stderr, "Debugger daemons failed to launch with error: %s\n", PMIx_Error_string(rc));
/* now launch the debugger daemons */
if (PMIX_SUCCESS != (rc = spawn_debugger(appspace))) {
goto done;
}
/* cleanup */
PMIX_INFO_FREE(dinfo, dninfo);
PMIX_APP_FREE(debugger, 1);
}
/* this is where a debugger tool would wait until the debug operation is complete */
while (waiting_for_debugger) {
sleep(1);
}
DEBUG_WAIT_THREAD(&waiting_for_debugger);
}
done:
DEBUG_DESTRUCT_LOCK(&waiting_for_debugger);
PMIx_tool_finalize();
return(rc);
}
typedef struct {
volatile bool active;
pmix_status_t status;
pmix_info_t *info;
size_t ninfo;
} mydbug_query_t;
static void infocbfunc(pmix_status_t status,
pmix_info_t *info, size_t ninfo,
void *cbdata,
pmix_release_cbfunc_t release_fn,
void *release_cbdata)
{
mydbug_query_t *q = (mydbug_query_t*)cbdata;
size_t n;
q->status = status;
q->info = NULL;
q->ninfo = ninfo;
if (0 < ninfo) {
PMIX_INFO_CREATE(q->info, q->ninfo);
for (n=0; n < ninfo; n++) {
PMIX_INFO_XFER(&q->info[n], &info[n]);
}
}
if (NULL != release_fn) {
release_fn(release_cbdata);
}
q->active = false;
}
static int attach_to_running_job(char *nspace)
{
pmix_status_t rc;
pmix_proc_t myproc;
pmix_query_t *query;
size_t nq;
mydbug_query_t *q;
myquery_data_t *q;
/* query the active nspaces so we can verify that the
* specified one exists */
nq = 1;
PMIX_QUERY_CREATE(query, nq);
query[0].keys = (char**)malloc(2 * sizeof(char*));
query[0].keys[0] = strdup(PMIX_QUERY_NAMESPACES);
query[0].keys[1] = NULL;
PMIX_ARGV_APPEND(rc, query[0].keys, PMIX_QUERY_NAMESPACES);
q = (mydbug_query_t*)malloc(sizeof(mydbug_query_t));
q->active = true;
if (PMIX_SUCCESS != (rc = PMIx_Query_info_nb(query, nq, infocbfunc, (void*)q))) {
q = (myquery_data_t*)malloc(sizeof(myquery_data_t));
DEBUG_CONSTRUCT_LOCK(&q->lock);
if (PMIX_SUCCESS != (rc = PMIx_Query_info_nb(query, nq, cbfunc, (void*)q))) {
fprintf(stderr, "Client ns %s rank %d: PMIx_Query_info failed: %d\n", myproc.nspace, myproc.rank, rc);
return -1;
}
/* wait for a response */
while (q->active) {
sleep(1);
}
DEBUG_WAIT_THREAD(&q->lock);
DEBUG_DESTRUCT_LOCK(&q->lock);
if (NULL == q->info) {
fprintf(stderr, "Query returned no info\n");

Просмотреть файл

@ -190,6 +190,7 @@ typedef uint32_t pmix_rank_t;
#define PMIX_TDIR_RMCLEAN "pmix.tdir.rmclean" // (bool) Resource Manager will clean session directories
/* information about relative ranks as assigned by the RM */
#define PMIX_CLUSTER_ID "pmix.clid" // (char*) a string name for the cluster this proc is executing on
#define PMIX_PROCID "pmix.procid" // (pmix_proc_t) process identifier
#define PMIX_NSPACE "pmix.nspace" // (char*) nspace of a job
#define PMIX_JOBID "pmix.jobid" // (char*) jobid assigned by scheduler
@ -370,6 +371,7 @@ typedef uint32_t pmix_rank_t;
// terminate without having connected
#define PMIX_CONNECT_XCHG_ONLY "pmix.cnt.xchg" // (bool) provide participants with job-level info for all participating
// nspaces, but do not assign a new nspace or rank
#define PMIX_CONNECT_ID "pmix.cnt.id" // (char*) an application-provided string identifier for a PMIx_Connect operation.
/* query attributes */
@ -851,6 +853,39 @@ typedef struct pmix_proc {
} \
} while (0)
#define PMIX_PROC_LOAD(m, n, r) \
do { \
PMIX_PROC_CONSTRUCT((m)); \
(void)strncpy((m)->nspace, (n), PMIX_MAX_NSLEN); \
(m)->rank = (r); \
} while(0)
#define PMIX_MULTICLUSTER_NSPACE_CONSTRUCT(t, c, n) \
do { \
size_t _len; \
memset((t), 0, PMIX_MAX_NSLEN+1); \
_len = strlen((c)); \
if ((_len + strlen((n))) < PMIX_MAX_NSLEN) { \
(void)strncpy((t), (c), PMIX_MAX_NSLEN); \
(t)[_len] = ':'; \
(void)strncpy(&(t)[_len+1], (n), PMIX_MAX_NSLEN - _len - 1); \
} \
} while(0)
#define PMIX_MULTICLUSTER_NSPACE_PARSE(t, c, n) \
do { \
size_t _n, _j; \
for (_n=0; '\0' != (t)[_n] && ':' != (t)[_n] && \
_n <= PMIX_MAX_NSLEN; _n++) { \
(c)[_n] = (t)[_n]; \
} \
_n++; \
for (_j=0; _n <= PMIX_MAX_NSLEN && \
'\0' != (t)[_n]; _n++, _j++) { \
(n)[_j] = (t)[_n]; \
} \
} while(0)
/**** PMIX PROC INFO STRUCT ****/
typedef struct pmix_proc_info {

Просмотреть файл

@ -1,74 +1,618 @@
/*
* Copyright (c) 2016 Intel, Inc. All rights reserved
* Copyright (c) 2016 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef PMIX_RENAME_H
#define PMIX_RENAME_H
#define PMIx_Init @PMIX_RENAME@PMIx_Init
#define PMIx_Initialized @PMIX_RENAME@PMIx_Initialized
#define PMIx_Finalize @PMIX_RENAME@PMIx_Finalize
#define PMIx_Abort @PMIX_RENAME@PMIx_Abort
#define PMIx_Put @PMIX_RENAME@PMIx_Put
#define PMIx_Commit @PMIX_RENAME@PMIx_Commit
#define PMIx_Fence @PMIX_RENAME@PMIx_Fence
#define PMIx_Fence_nb @PMIX_RENAME@PMIx_Fence_nb
#define PMIx_Get @PMIX_RENAME@PMIx_Get
#define PMIx_Get_nb @PMIX_RENAME@PMIx_Get_nb
#define PMIx_Publish @PMIX_RENAME@PMIx_Publish
#define PMIx_Publish_nb @PMIX_RENAME@PMIx_Publish_nb
#define PMIx_Lookup @PMIX_RENAME@PMIx_Lookup
#define PMIx_Lookup_nb @PMIX_RENAME@PMIx_Lookup_nb
#define PMIx_Unpublish @PMIX_RENAME@PMIx_Unpublish
#define PMIx_Unpublish_nb @PMIX_RENAME@PMIx_Unpublish_nb
#define PMIx_Spawn @PMIX_RENAME@PMIx_Spawn
#define PMIx_Spawn_nb @PMIX_RENAME@PMIx_Spawn_nb
#define PMIx_Connect @PMIX_RENAME@PMIx_Connect
#define PMIx_Connect_nb @PMIX_RENAME@PMIx_Connect_nb
#define PMIx_Disconnect @PMIX_RENAME@PMIx_Disconnect
#define PMIx_Disconnect_nb @PMIX_RENAME@PMIx_Disconnect_nb
#define PMIx_Resolve_peers @PMIX_RENAME@PMIx_Resolve_peers
#define PMIx_Resolve_nodes @PMIX_RENAME@PMIx_Resolve_nodes
#define PMIx_Query_info_nb @PMIX_RENAME@PMIx_Query_info_nb
#define PMIx_Log_nb @PMIX_RENAME@PMIx_Log_nb
#define PMIx_server_init @PMIX_RENAME@PMIx_server_init
#define PMIx_server_finalize @PMIX_RENAME@PMIx_server_finalize
#define PMIx_generate_regex @PMIX_RENAME@PMIx_generate_regex
#define PMIx_generate_ppn @PMIX_RENAME@PMIx_generate_ppn
#define PMIx_server_register_nspace @PMIX_RENAME@PMIx_server_register_nspace
#define PMIx_server_deregister_nspace @PMIX_RENAME@PMIx_server_deregister_nspace
#define PMIx_server_register_client @PMIX_RENAME@PMIx_server_register_client
#define PMIx_server_deregister_client @PMIX_RENAME@PMIx_server_deregister_client
#define PMIx_server_setup_fork @PMIX_RENAME@PMIx_server_setup_fork
#define PMIx_server_dmodex_request @PMIX_RENAME@PMIx_server_dmodex_request
#define PMIx_tool_init @PMIX_RENAME@PMIx_tool_init
#define PMIx_tool_finalize @PMIX_RENAME@PMIx_tool_finalize
#define PMIx_Register_event_handler @PMIX_RENAME@PMIx_Register_event_handler
#define PMIx_Deregister_event_handler @PMIX_RENAME@PMIx_Deregister_event_handler
#define PMIx_Notify_event @PMIX_RENAME@PMIx_Notify_event
#define PMIx_Error_string @PMIX_RENAME@PMIx_Error_string
#define PMIx_Proc_state_string @PMIX_RENAME@PMIx_Proc_state_string
#define PMIx_Persistence_string @PMIX_RENAME@PMIx_Persistence_string
#define PMIx_Data_range_string @PMIX_RENAME@PMIx_Data_range_string
#define PMIx_Info_directives_string @PMIX_RENAME@PMIx_Info_directives_string
#define PMIx_Data_type_string @PMIX_RENAME@PMIx_Data_type_string
#define PMIx_Get_version @PMIX_RENAME@PMIx_Get_version
#define PMIx_Store_internal @PMIX_RENAME@PMIx_Store_internal
#define pmix_value_load @PMIX_RENAME@pmix_value_load
#define pmix_value_xfer @PMIX_RENAME@pmix_value_xfer
#define pmix_globals @PMIX_RENAME@pmix_globals
#define pmix_output @PMIX_RENAME@pmix_output
#define pmix_output_verbose @PMIX_RENAME@pmix_output_verbose
#endif
#define PMI2_Abort @PMIX_RENAME@PMI2_Abort
#define PMI2_Finalize @PMIX_RENAME@PMI2_Finalize
#define PMI2_Info_GetJobAttr @PMIX_RENAME@PMI2_Info_GetJobAttr
#define PMI2_Info_GetJobAttrIntArray @PMIX_RENAME@PMI2_Info_GetJobAttrIntArray
#define PMI2_Info_GetNodeAttr @PMIX_RENAME@PMI2_Info_GetNodeAttr
#define PMI2_Info_GetNodeAttrIntArray @PMIX_RENAME@PMI2_Info_GetNodeAttrIntArray
#define PMI2_Info_GetSize @PMIX_RENAME@PMI2_Info_GetSize
#define PMI2_Info_PutNodeAttr @PMIX_RENAME@PMI2_Info_PutNodeAttr
#define PMI2_Init @PMIX_RENAME@PMI2_Init
#define PMI2_Initialized @PMIX_RENAME@PMI2_Initialized
#define PMI2_Job_Connect @PMIX_RENAME@PMI2_Job_Connect
#define PMI2_Job_Disconnect @PMIX_RENAME@PMI2_Job_Disconnect
#define PMI2_Job_GetId @PMIX_RENAME@PMI2_Job_GetId
#define PMI2_Job_GetRank @PMIX_RENAME@PMI2_Job_GetRank
#define PMI2_Job_Spawn @PMIX_RENAME@PMI2_Job_Spawn
#define PMI2_KVS_Fence @PMIX_RENAME@PMI2_KVS_Fence
#define PMI2_KVS_Get @PMIX_RENAME@PMI2_KVS_Get
#define PMI2_KVS_Put @PMIX_RENAME@PMI2_KVS_Put
#define PMI2_Nameserv_lookup @PMIX_RENAME@PMI2_Nameserv_lookup
#define PMI2_Nameserv_publish @PMIX_RENAME@PMI2_Nameserv_publish
#define PMI2_Nameserv_unpublish @PMIX_RENAME@PMI2_Nameserv_unpublish
#define PMI_Abort @PMIX_RENAME@PMI_Abort
#define PMI_Args_to_keyval @PMIX_RENAME@PMI_Args_to_keyval
#define PMI_Barrier @PMIX_RENAME@PMI_Barrier
#define PMI_Finalize @PMIX_RENAME@PMI_Finalize
#define PMI_Free_keyvals @PMIX_RENAME@PMI_Free_keyvals
#define PMI_Get_appnum @PMIX_RENAME@PMI_Get_appnum
#define PMI_Get_clique_ranks @PMIX_RENAME@PMI_Get_clique_ranks
#define PMI_Get_clique_size @PMIX_RENAME@PMI_Get_clique_size
#define PMI_Get_id @PMIX_RENAME@PMI_Get_id
#define PMI_Get_id_length_max @PMIX_RENAME@PMI_Get_id_length_max
#define PMI_Get_kvs_domain_id @PMIX_RENAME@PMI_Get_kvs_domain_id
#define PMI_Get_options @PMIX_RENAME@PMI_Get_options
#define PMI_Get_rank @PMIX_RENAME@PMI_Get_rank
#define PMI_Get_size @PMIX_RENAME@PMI_Get_size
#define PMI_Get_universe_size @PMIX_RENAME@PMI_Get_universe_size
#define PMI_Init @PMIX_RENAME@PMI_Init
#define PMI_Initialized @PMIX_RENAME@PMI_Initialized
#define PMI_KVS_Commit @PMIX_RENAME@PMI_KVS_Commit
#define PMI_KVS_Create @PMIX_RENAME@PMI_KVS_Create
#define PMI_KVS_Destroy @PMIX_RENAME@PMI_KVS_Destroy
#define PMI_KVS_Get @PMIX_RENAME@PMI_KVS_Get
#define PMI_KVS_Get_key_length_max @PMIX_RENAME@PMI_KVS_Get_key_length_max
#define PMI_KVS_Get_my_name @PMIX_RENAME@PMI_KVS_Get_my_name
#define PMI_KVS_Get_name_length_max @PMIX_RENAME@PMI_KVS_Get_name_length_max
#define PMI_KVS_Get_value_length_max @PMIX_RENAME@PMI_KVS_Get_value_length_max
#define PMI_KVS_Iter_first @PMIX_RENAME@PMI_KVS_Iter_first
#define PMI_KVS_Iter_next @PMIX_RENAME@PMI_KVS_Iter_next
#define PMI_KVS_Put @PMIX_RENAME@PMI_KVS_Put
#define PMI_Lookup_name @PMIX_RENAME@PMI_Lookup_name
#define PMI_Parse_option @PMIX_RENAME@PMI_Parse_option
#define PMI_Publish_name @PMIX_RENAME@PMI_Publish_name
#define PMI_Spawn_multiple @PMIX_RENAME@PMI_Spawn_multiple
#define PMI_Unpublish_name @PMIX_RENAME@PMI_Unpublish_name
#define PMIx_Abort @PMIX_RENAME@PMIx_Abort
#define PMIx_Allocation_request_nb @PMIX_RENAME@PMIx_Allocation_request_nb
#define PMIx_Alloc_directive_string @PMIX_RENAME@PMIx_Alloc_directive_string
#define pmix_argv_append @PMIX_RENAME@pmix_argv_append
#define pmix_argv_append_nosize @PMIX_RENAME@pmix_argv_append_nosize
#define pmix_argv_append_unique_nosize @PMIX_RENAME@pmix_argv_append_unique_nosize
#define pmix_argv_copy @PMIX_RENAME@pmix_argv_copy
#define pmix_argv_count @PMIX_RENAME@pmix_argv_count
#define pmix_argv_delete @PMIX_RENAME@pmix_argv_delete
#define pmix_argv_free @PMIX_RENAME@pmix_argv_free
#define pmix_argv_insert @PMIX_RENAME@pmix_argv_insert
#define pmix_argv_insert_element @PMIX_RENAME@pmix_argv_insert_element
#define pmix_argv_join @PMIX_RENAME@pmix_argv_join
#define pmix_argv_join_range @PMIX_RENAME@pmix_argv_join_range
#define pmix_argv_len @PMIX_RENAME@pmix_argv_len
#define pmix_argv_prepend_nosize @PMIX_RENAME@pmix_argv_prepend_nosize
#define pmix_argv_split @PMIX_RENAME@pmix_argv_split
#define pmix_argv_split_with_empty @PMIX_RENAME@pmix_argv_split_with_empty
#define pmix_asprintf @PMIX_RENAME@pmix_asprintf
#define pmix_basename @PMIX_RENAME@pmix_basename
#define pmix_bfrop_base_copy_persist @PMIX_RENAME@pmix_bfrop_base_copy_persist
#define pmix_bfrop_base_select @PMIX_RENAME@pmix_bfrop_base_select
#define pmix_bfrop_buffer_extend @PMIX_RENAME@pmix_bfrop_buffer_extend
#define pmix_bfrop_get_data_type @PMIX_RENAME@pmix_bfrop_get_data_type
#define pmix_bfrops_base_assign_module @PMIX_RENAME@pmix_bfrops_base_assign_module
#define pmix_bfrops_base_copy @PMIX_RENAME@pmix_bfrops_base_copy
#define pmix_bfrops_base_copy_app @PMIX_RENAME@pmix_bfrops_base_copy_app
#define pmix_bfrops_base_copy_array @PMIX_RENAME@pmix_bfrops_base_copy_array
#define pmix_bfrops_base_copy_bo @PMIX_RENAME@pmix_bfrops_base_copy_bo
#define pmix_bfrops_base_copy_buf @PMIX_RENAME@pmix_bfrops_base_copy_buf
#define pmix_bfrops_base_copy_darray @PMIX_RENAME@pmix_bfrops_base_copy_darray
#define pmix_bfrops_base_copy_info @PMIX_RENAME@pmix_bfrops_base_copy_info
#define pmix_bfrops_base_copy_kval @PMIX_RENAME@pmix_bfrops_base_copy_kval
#define pmix_bfrops_base_copy_modex @PMIX_RENAME@pmix_bfrops_base_copy_modex
#define pmix_bfrops_base_copy_payload @PMIX_RENAME@pmix_bfrops_base_copy_payload
#define pmix_bfrops_base_copy_pdata @PMIX_RENAME@pmix_bfrops_base_copy_pdata
#define pmix_bfrops_base_copy_pinfo @PMIX_RENAME@pmix_bfrops_base_copy_pinfo
#define pmix_bfrops_base_copy_proc @PMIX_RENAME@pmix_bfrops_base_copy_proc
#define pmix_bfrops_base_copy_query @PMIX_RENAME@pmix_bfrops_base_copy_query
#define pmix_bfrops_base_copy_string @PMIX_RENAME@pmix_bfrops_base_copy_string
#define pmix_bfrops_base_copy_value @PMIX_RENAME@pmix_bfrops_base_copy_value
#define pmix_bfrops_base_data_type_string @PMIX_RENAME@pmix_bfrops_base_data_type_string
#define pmix_bfrops_base_framework @PMIX_RENAME@pmix_bfrops_base_framework
#define pmix_bfrops_base_get_available_modules @PMIX_RENAME@pmix_bfrops_base_get_available_modules
#define pmix_bfrops_base_output @PMIX_RENAME@pmix_bfrops_base_output
#define pmix_bfrops_base_pack @PMIX_RENAME@pmix_bfrops_base_pack
#define pmix_bfrops_base_pack_alloc_directive @PMIX_RENAME@pmix_bfrops_base_pack_alloc_directive
#define pmix_bfrops_base_pack_app @PMIX_RENAME@pmix_bfrops_base_pack_app
#define pmix_bfrops_base_pack_array @PMIX_RENAME@pmix_bfrops_base_pack_array
#define pmix_bfrops_base_pack_bo @PMIX_RENAME@pmix_bfrops_base_pack_bo
#define pmix_bfrops_base_pack_bool @PMIX_RENAME@pmix_bfrops_base_pack_bool
#define pmix_bfrops_base_pack_buf @PMIX_RENAME@pmix_bfrops_base_pack_buf
#define pmix_bfrops_base_pack_buffer @PMIX_RENAME@pmix_bfrops_base_pack_buffer
#define pmix_bfrops_base_pack_byte @PMIX_RENAME@pmix_bfrops_base_pack_byte
#define pmix_bfrops_base_pack_cmd @PMIX_RENAME@pmix_bfrops_base_pack_cmd
#define pmix_bfrops_base_pack_darray @PMIX_RENAME@pmix_bfrops_base_pack_darray
#define pmix_bfrops_base_pack_datatype @PMIX_RENAME@pmix_bfrops_base_pack_datatype
#define pmix_bfrops_base_pack_double @PMIX_RENAME@pmix_bfrops_base_pack_double
#define pmix_bfrops_base_pack_float @PMIX_RENAME@pmix_bfrops_base_pack_float
#define pmix_bfrops_base_pack_info @PMIX_RENAME@pmix_bfrops_base_pack_info
#define pmix_bfrops_base_pack_info_directives @PMIX_RENAME@pmix_bfrops_base_pack_info_directives
#define pmix_bfrops_base_pack_int @PMIX_RENAME@pmix_bfrops_base_pack_int
#define pmix_bfrops_base_pack_int16 @PMIX_RENAME@pmix_bfrops_base_pack_int16
#define pmix_bfrops_base_pack_int32 @PMIX_RENAME@pmix_bfrops_base_pack_int32
#define pmix_bfrops_base_pack_int64 @PMIX_RENAME@pmix_bfrops_base_pack_int64
#define pmix_bfrops_base_pack_kval @PMIX_RENAME@pmix_bfrops_base_pack_kval
#define pmix_bfrops_base_pack_modex @PMIX_RENAME@pmix_bfrops_base_pack_modex
#define pmix_bfrops_base_pack_pdata @PMIX_RENAME@pmix_bfrops_base_pack_pdata
#define pmix_bfrops_base_pack_persist @PMIX_RENAME@pmix_bfrops_base_pack_persist
#define pmix_bfrops_base_pack_pid @PMIX_RENAME@pmix_bfrops_base_pack_pid
#define pmix_bfrops_base_pack_pinfo @PMIX_RENAME@pmix_bfrops_base_pack_pinfo
#define pmix_bfrops_base_pack_proc @PMIX_RENAME@pmix_bfrops_base_pack_proc
#define pmix_bfrops_base_pack_pstate @PMIX_RENAME@pmix_bfrops_base_pack_pstate
#define pmix_bfrops_base_pack_ptr @PMIX_RENAME@pmix_bfrops_base_pack_ptr
#define pmix_bfrops_base_pack_query @PMIX_RENAME@pmix_bfrops_base_pack_query
#define pmix_bfrops_base_pack_range @PMIX_RENAME@pmix_bfrops_base_pack_range
#define pmix_bfrops_base_pack_rank @PMIX_RENAME@pmix_bfrops_base_pack_rank
#define pmix_bfrops_base_pack_scope @PMIX_RENAME@pmix_bfrops_base_pack_scope
#define pmix_bfrops_base_pack_sizet @PMIX_RENAME@pmix_bfrops_base_pack_sizet
#define pmix_bfrops_base_pack_status @PMIX_RENAME@pmix_bfrops_base_pack_status
#define pmix_bfrops_base_pack_string @PMIX_RENAME@pmix_bfrops_base_pack_string
#define pmix_bfrops_base_pack_time @PMIX_RENAME@pmix_bfrops_base_pack_time
#define pmix_bfrops_base_pack_timeval @PMIX_RENAME@pmix_bfrops_base_pack_timeval
#define pmix_bfrops_base_pack_val @PMIX_RENAME@pmix_bfrops_base_pack_val
#define pmix_bfrops_base_pack_value @PMIX_RENAME@pmix_bfrops_base_pack_value
#define pmix_bfrops_base_print @PMIX_RENAME@pmix_bfrops_base_print
#define pmix_bfrops_base_print_alloc_directive @PMIX_RENAME@pmix_bfrops_base_print_alloc_directive
#define pmix_bfrops_base_print_app @PMIX_RENAME@pmix_bfrops_base_print_app
#define pmix_bfrops_base_print_array @PMIX_RENAME@pmix_bfrops_base_print_array
#define pmix_bfrops_base_print_bo @PMIX_RENAME@pmix_bfrops_base_print_bo
#define pmix_bfrops_base_print_bool @PMIX_RENAME@pmix_bfrops_base_print_bool
#define pmix_bfrops_base_print_buf @PMIX_RENAME@pmix_bfrops_base_print_buf
#define pmix_bfrops_base_print_byte @PMIX_RENAME@pmix_bfrops_base_print_byte
#define pmix_bfrops_base_print_cmd @PMIX_RENAME@pmix_bfrops_base_print_cmd
#define pmix_bfrops_base_print_darray @PMIX_RENAME@pmix_bfrops_base_print_darray
#define pmix_bfrops_base_print_datatype @PMIX_RENAME@pmix_bfrops_base_print_datatype
#define pmix_bfrops_base_print_double @PMIX_RENAME@pmix_bfrops_base_print_double
#define pmix_bfrops_base_print_float @PMIX_RENAME@pmix_bfrops_base_print_float
#define pmix_bfrops_base_print_info @PMIX_RENAME@pmix_bfrops_base_print_info
#define pmix_bfrops_base_print_info_directives @PMIX_RENAME@pmix_bfrops_base_print_info_directives
#define pmix_bfrops_base_print_int @PMIX_RENAME@pmix_bfrops_base_print_int
#define pmix_bfrops_base_print_int16 @PMIX_RENAME@pmix_bfrops_base_print_int16
#define pmix_bfrops_base_print_int32 @PMIX_RENAME@pmix_bfrops_base_print_int32
#define pmix_bfrops_base_print_int64 @PMIX_RENAME@pmix_bfrops_base_print_int64
#define pmix_bfrops_base_print_int8 @PMIX_RENAME@pmix_bfrops_base_print_int8
#define pmix_bfrops_base_print_kval @PMIX_RENAME@pmix_bfrops_base_print_kval
#define pmix_bfrops_base_print_modex @PMIX_RENAME@pmix_bfrops_base_print_modex
#define pmix_bfrops_base_print_pdata @PMIX_RENAME@pmix_bfrops_base_print_pdata
#define pmix_bfrops_base_print_persist @PMIX_RENAME@pmix_bfrops_base_print_persist
#define pmix_bfrops_base_print_pid @PMIX_RENAME@pmix_bfrops_base_print_pid
#define pmix_bfrops_base_print_pinfo @PMIX_RENAME@pmix_bfrops_base_print_pinfo
#define pmix_bfrops_base_print_proc @PMIX_RENAME@pmix_bfrops_base_print_proc
#define pmix_bfrops_base_print_pstate @PMIX_RENAME@pmix_bfrops_base_print_pstate
#define pmix_bfrops_base_print_ptr @PMIX_RENAME@pmix_bfrops_base_print_ptr
#define pmix_bfrops_base_print_query @PMIX_RENAME@pmix_bfrops_base_print_query
#define pmix_bfrops_base_print_range @PMIX_RENAME@pmix_bfrops_base_print_range
#define pmix_bfrops_base_print_rank @PMIX_RENAME@pmix_bfrops_base_print_rank
#define pmix_bfrops_base_print_scope @PMIX_RENAME@pmix_bfrops_base_print_scope
#define pmix_bfrops_base_print_size @PMIX_RENAME@pmix_bfrops_base_print_size
#define pmix_bfrops_base_print_status @PMIX_RENAME@pmix_bfrops_base_print_status
#define pmix_bfrops_base_print_string @PMIX_RENAME@pmix_bfrops_base_print_string
#define pmix_bfrops_base_print_time @PMIX_RENAME@pmix_bfrops_base_print_time
#define pmix_bfrops_base_print_timeval @PMIX_RENAME@pmix_bfrops_base_print_timeval
#define pmix_bfrops_base_print_uint @PMIX_RENAME@pmix_bfrops_base_print_uint
#define pmix_bfrops_base_print_uint16 @PMIX_RENAME@pmix_bfrops_base_print_uint16
#define pmix_bfrops_base_print_uint32 @PMIX_RENAME@pmix_bfrops_base_print_uint32
#define pmix_bfrops_base_print_uint64 @PMIX_RENAME@pmix_bfrops_base_print_uint64
#define pmix_bfrops_base_print_uint8 @PMIX_RENAME@pmix_bfrops_base_print_uint8
#define pmix_bfrops_base_print_value @PMIX_RENAME@pmix_bfrops_base_print_value
#define pmix_bfrops_base_std_copy @PMIX_RENAME@pmix_bfrops_base_std_copy
#define pmix_bfrops_base_unpack @PMIX_RENAME@pmix_bfrops_base_unpack
#define pmix_bfrops_base_unpack_alloc_directive @PMIX_RENAME@pmix_bfrops_base_unpack_alloc_directive
#define pmix_bfrops_base_unpack_app @PMIX_RENAME@pmix_bfrops_base_unpack_app
#define pmix_bfrops_base_unpack_array @PMIX_RENAME@pmix_bfrops_base_unpack_array
#define pmix_bfrops_base_unpack_bo @PMIX_RENAME@pmix_bfrops_base_unpack_bo
#define pmix_bfrops_base_unpack_bool @PMIX_RENAME@pmix_bfrops_base_unpack_bool
#define pmix_bfrops_base_unpack_buf @PMIX_RENAME@pmix_bfrops_base_unpack_buf
#define pmix_bfrops_base_unpack_byte @PMIX_RENAME@pmix_bfrops_base_unpack_byte
#define pmix_bfrops_base_unpack_cmd @PMIX_RENAME@pmix_bfrops_base_unpack_cmd
#define pmix_bfrops_base_unpack_darray @PMIX_RENAME@pmix_bfrops_base_unpack_darray
#define pmix_bfrops_base_unpack_datatype @PMIX_RENAME@pmix_bfrops_base_unpack_datatype
#define pmix_bfrops_base_unpack_double @PMIX_RENAME@pmix_bfrops_base_unpack_double
#define pmix_bfrops_base_unpack_float @PMIX_RENAME@pmix_bfrops_base_unpack_float
#define pmix_bfrops_base_unpack_info @PMIX_RENAME@pmix_bfrops_base_unpack_info
#define pmix_bfrops_base_unpack_info_directives @PMIX_RENAME@pmix_bfrops_base_unpack_info_directives
#define pmix_bfrops_base_unpack_int @PMIX_RENAME@pmix_bfrops_base_unpack_int
#define pmix_bfrops_base_unpack_int16 @PMIX_RENAME@pmix_bfrops_base_unpack_int16
#define pmix_bfrops_base_unpack_int32 @PMIX_RENAME@pmix_bfrops_base_unpack_int32
#define pmix_bfrops_base_unpack_int64 @PMIX_RENAME@pmix_bfrops_base_unpack_int64
#define pmix_bfrops_base_unpack_kval @PMIX_RENAME@pmix_bfrops_base_unpack_kval
#define pmix_bfrops_base_unpack_modex @PMIX_RENAME@pmix_bfrops_base_unpack_modex
#define pmix_bfrops_base_unpack_pdata @PMIX_RENAME@pmix_bfrops_base_unpack_pdata
#define pmix_bfrops_base_unpack_persist @PMIX_RENAME@pmix_bfrops_base_unpack_persist
#define pmix_bfrops_base_unpack_pid @PMIX_RENAME@pmix_bfrops_base_unpack_pid
#define pmix_bfrops_base_unpack_pinfo @PMIX_RENAME@pmix_bfrops_base_unpack_pinfo
#define pmix_bfrops_base_unpack_proc @PMIX_RENAME@pmix_bfrops_base_unpack_proc
#define pmix_bfrops_base_unpack_pstate @PMIX_RENAME@pmix_bfrops_base_unpack_pstate
#define pmix_bfrops_base_unpack_ptr @PMIX_RENAME@pmix_bfrops_base_unpack_ptr
#define pmix_bfrops_base_unpack_query @PMIX_RENAME@pmix_bfrops_base_unpack_query
#define pmix_bfrops_base_unpack_range @PMIX_RENAME@pmix_bfrops_base_unpack_range
#define pmix_bfrops_base_unpack_rank @PMIX_RENAME@pmix_bfrops_base_unpack_rank
#define pmix_bfrops_base_unpack_scope @PMIX_RENAME@pmix_bfrops_base_unpack_scope
#define pmix_bfrops_base_unpack_sizet @PMIX_RENAME@pmix_bfrops_base_unpack_sizet
#define pmix_bfrops_base_unpack_status @PMIX_RENAME@pmix_bfrops_base_unpack_status
#define pmix_bfrops_base_unpack_string @PMIX_RENAME@pmix_bfrops_base_unpack_string
#define pmix_bfrops_base_unpack_time @PMIX_RENAME@pmix_bfrops_base_unpack_time
#define pmix_bfrops_base_unpack_timeval @PMIX_RENAME@pmix_bfrops_base_unpack_timeval
#define pmix_bfrops_base_unpack_val @PMIX_RENAME@pmix_bfrops_base_unpack_val
#define pmix_bfrops_base_unpack_value @PMIX_RENAME@pmix_bfrops_base_unpack_value
#define pmix_bfrops_base_value_cmp @PMIX_RENAME@pmix_bfrops_base_value_cmp
#define pmix_bfrops_base_value_load @PMIX_RENAME@pmix_bfrops_base_value_load
#define pmix_bfrops_base_value_unload @PMIX_RENAME@pmix_bfrops_base_value_unload
#define pmix_bfrops_base_value_xfer @PMIX_RENAME@pmix_bfrops_base_value_xfer
#define pmix_bfrops_globals @PMIX_RENAME@pmix_bfrops_globals
#define pmix_bfrop_store_data_type @PMIX_RENAME@pmix_bfrop_store_data_type
#define pmix_bfrop_too_small @PMIX_RENAME@pmix_bfrop_too_small
#define pmix_bfrop_type_info_t_class @PMIX_RENAME@pmix_bfrop_type_info_t_class
#define pmix_buffer_t_class @PMIX_RENAME@pmix_buffer_t_class
#define pmix_cb_t_class @PMIX_RENAME@pmix_cb_t_class
#define pmix_class_finalize @PMIX_RENAME@pmix_class_finalize
#define pmix_class_init_epoch @PMIX_RENAME@pmix_class_init_epoch
#define pmix_class_initialize @PMIX_RENAME@pmix_class_initialize
#define pmix_client_globals @PMIX_RENAME@pmix_client_globals
#define pmix_cmd_line_add @PMIX_RENAME@pmix_cmd_line_add
#define pmix_cmd_line_create @PMIX_RENAME@pmix_cmd_line_create
#define pmix_cmd_line_get_argc @PMIX_RENAME@pmix_cmd_line_get_argc
#define pmix_cmd_line_get_argv @PMIX_RENAME@pmix_cmd_line_get_argv
#define pmix_cmd_line_get_ninsts @PMIX_RENAME@pmix_cmd_line_get_ninsts
#define pmix_cmd_line_get_param @PMIX_RENAME@pmix_cmd_line_get_param
#define pmix_cmd_line_get_tail @PMIX_RENAME@pmix_cmd_line_get_tail
#define pmix_cmd_line_get_usage_msg @PMIX_RENAME@pmix_cmd_line_get_usage_msg
#define pmix_cmd_line_is_taken @PMIX_RENAME@pmix_cmd_line_is_taken
#define pmix_cmd_line_make_opt3 @PMIX_RENAME@pmix_cmd_line_make_opt3
#define pmix_cmd_line_make_opt_mca @PMIX_RENAME@pmix_cmd_line_make_opt_mca
#define pmix_cmd_line_parse @PMIX_RENAME@pmix_cmd_line_parse
#define pmix_cmd_line_t_class @PMIX_RENAME@pmix_cmd_line_t_class
#define pmix_command_string @PMIX_RENAME@pmix_command_string
#define PMIx_Commit @PMIX_RENAME@PMIx_Commit
#define PMIx_Connect @PMIX_RENAME@PMIx_Connect
#define PMIx_Connect_nb @PMIX_RENAME@PMIx_Connect_nb
#define PMIx_Data_copy @PMIX_RENAME@PMIx_Data_copy
#define PMIx_Data_copy_payload @PMIX_RENAME@PMIx_Data_copy_payload
#define PMIx_Data_pack @PMIX_RENAME@PMIx_Data_pack
#define PMIx_Data_print @PMIX_RENAME@PMIx_Data_print
#define PMIx_Data_range_string @PMIX_RENAME@PMIx_Data_range_string
#define PMIx_Data_type_string @PMIX_RENAME@PMIx_Data_type_string
#define PMIx_Data_unpack @PMIX_RENAME@PMIx_Data_unpack
#define pmix_debug_threads @PMIX_RENAME@pmix_debug_threads
#define PMIx_Deregister_event_handler @PMIX_RENAME@PMIx_Deregister_event_handler
#define pmix_deregister_params @PMIX_RENAME@pmix_deregister_params
#define pmix_dirname @PMIX_RENAME@pmix_dirname
#define PMIx_Disconnect @PMIX_RENAME@PMIx_Disconnect
#define PMIx_Disconnect_nb @PMIX_RENAME@PMIx_Disconnect_nb
#define pmix_environ_merge @PMIX_RENAME@pmix_environ_merge
#define PMIx_Error_string @PMIX_RENAME@PMIx_Error_string
#define pmix_fd_read @PMIX_RENAME@pmix_fd_read
#define pmix_fd_set_cloexec @PMIX_RENAME@pmix_fd_set_cloexec
#define pmix_fd_write @PMIX_RENAME@pmix_fd_write
#define PMIx_Fence @PMIX_RENAME@PMIx_Fence
#define PMIx_Fence_nb @PMIX_RENAME@PMIx_Fence_nb
#define PMIx_Finalize @PMIX_RENAME@PMIx_Finalize
#define pmix_find_absolute_path @PMIX_RENAME@pmix_find_absolute_path
#define pmix_gds_base_assign_module @PMIX_RENAME@pmix_gds_base_assign_module
#define pmix_gds_base_framework @PMIX_RENAME@pmix_gds_base_framework
#define pmix_gds_base_get_available_modules @PMIX_RENAME@pmix_gds_base_get_available_modules
#define pmix_gds_base_output @PMIX_RENAME@pmix_gds_base_output
#define pmix_gds_base_select @PMIX_RENAME@pmix_gds_base_select
#define pmix_gds_base_setup_fork @PMIX_RENAME@pmix_gds_base_setup_fork
#define pmix_gds_globals @PMIX_RENAME@pmix_gds_globals
#define PMIx_generate_ppn @PMIX_RENAME@PMIx_generate_ppn
#define PMIx_generate_regex @PMIX_RENAME@PMIx_generate_regex
#define PMIx_Get @PMIX_RENAME@PMIx_Get
#define PMIx_Get_nb @PMIX_RENAME@PMIx_Get_nb
#define PMIx_Get_version @PMIX_RENAME@PMIx_Get_version
#define pmix_global_lock @PMIX_RENAME@pmix_global_lock
#define pmix_globals @PMIX_RENAME@pmix_globals
#define pmix_hash_fetch @PMIX_RENAME@pmix_hash_fetch
#define pmix_hash_fetch_by_key @PMIX_RENAME@pmix_hash_fetch_by_key
#define pmix_hash_remove_data @PMIX_RENAME@pmix_hash_remove_data
#define pmix_hash_store @PMIX_RENAME@pmix_hash_store
#define pmix_hash_table_get_first_key_ptr @PMIX_RENAME@pmix_hash_table_get_first_key_ptr
#define pmix_hash_table_get_first_key_uint32 @PMIX_RENAME@pmix_hash_table_get_first_key_uint32
#define pmix_hash_table_get_first_key_uint64 @PMIX_RENAME@pmix_hash_table_get_first_key_uint64
#define pmix_hash_table_get_next_key_ptr @PMIX_RENAME@pmix_hash_table_get_next_key_ptr
#define pmix_hash_table_get_next_key_uint32 @PMIX_RENAME@pmix_hash_table_get_next_key_uint32
#define pmix_hash_table_get_next_key_uint64 @PMIX_RENAME@pmix_hash_table_get_next_key_uint64
#define pmix_hash_table_get_value_ptr @PMIX_RENAME@pmix_hash_table_get_value_ptr
#define pmix_hash_table_get_value_uint32 @PMIX_RENAME@pmix_hash_table_get_value_uint32
#define pmix_hash_table_get_value_uint64 @PMIX_RENAME@pmix_hash_table_get_value_uint64
#define pmix_hash_table_init @PMIX_RENAME@pmix_hash_table_init
#define pmix_hash_table_init2 @PMIX_RENAME@pmix_hash_table_init2
#define pmix_hash_table_remove_all @PMIX_RENAME@pmix_hash_table_remove_all
#define pmix_hash_table_remove_value_ptr @PMIX_RENAME@pmix_hash_table_remove_value_ptr
#define pmix_hash_table_remove_value_uint32 @PMIX_RENAME@pmix_hash_table_remove_value_uint32
#define pmix_hash_table_remove_value_uint64 @PMIX_RENAME@pmix_hash_table_remove_value_uint64
#define pmix_hash_table_set_value_ptr @PMIX_RENAME@pmix_hash_table_set_value_ptr
#define pmix_hash_table_set_value_uint32 @PMIX_RENAME@pmix_hash_table_set_value_uint32
#define pmix_hash_table_set_value_uint64 @PMIX_RENAME@pmix_hash_table_set_value_uint64
#define pmix_hash_table_t_class @PMIX_RENAME@pmix_hash_table_t_class
#define pmix_home_directory @PMIX_RENAME@pmix_home_directory
#define pmix_host_server @PMIX_RENAME@pmix_host_server
#define pmix_hotel_init @PMIX_RENAME@pmix_hotel_init
#define pmix_ifaddrtokindex @PMIX_RENAME@pmix_ifaddrtokindex
#define pmix_ifaddrtoname @PMIX_RENAME@pmix_ifaddrtoname
#define pmix_ifbegin @PMIX_RENAME@pmix_ifbegin
#define pmix_ifcount @PMIX_RENAME@pmix_ifcount
#define pmix_ifgetaliases @PMIX_RENAME@pmix_ifgetaliases
#define pmix_ifindextoaddr @PMIX_RENAME@pmix_ifindextoaddr
#define pmix_ifindextoflags @PMIX_RENAME@pmix_ifindextoflags
#define pmix_ifindextokindex @PMIX_RENAME@pmix_ifindextokindex
#define pmix_ifindextomac @PMIX_RENAME@pmix_ifindextomac
#define pmix_ifindextomask @PMIX_RENAME@pmix_ifindextomask
#define pmix_ifindextomtu @PMIX_RENAME@pmix_ifindextomtu
#define pmix_ifindextoname @PMIX_RENAME@pmix_ifindextoname
#define pmix_ifislocal @PMIX_RENAME@pmix_ifislocal
#define pmix_ifisloopback @PMIX_RENAME@pmix_ifisloopback
#define pmix_ifkindextoaddr @PMIX_RENAME@pmix_ifkindextoaddr
#define pmix_ifkindextoname @PMIX_RENAME@pmix_ifkindextoname
#define pmix_ifmatches @PMIX_RENAME@pmix_ifmatches
#define pmix_ifnametoaddr @PMIX_RENAME@pmix_ifnametoaddr
#define pmix_ifnametoindex @PMIX_RENAME@pmix_ifnametoindex
#define pmix_ifnametokindex @PMIX_RENAME@pmix_ifnametokindex
#define pmix_ifnext @PMIX_RENAME@pmix_ifnext
#define pmix_iftupletoaddr @PMIX_RENAME@pmix_iftupletoaddr
#define pmix_info_caddy_t_class @PMIX_RENAME@pmix_info_caddy_t_class
#define PMIx_Info_directives_string @PMIX_RENAME@PMIx_Info_directives_string
#define PMIx_Init @PMIX_RENAME@PMIx_Init
#define pmix_init_called @PMIX_RENAME@pmix_init_called
#define pmix_initialized @PMIX_RENAME@pmix_initialized
#define PMIx_Initialized @PMIX_RENAME@PMIx_Initialized
#define PMIx_Job_control_nb @PMIX_RENAME@PMIx_Job_control_nb
#define pmix_kval_t_class @PMIX_RENAME@pmix_kval_t_class
#define pmix_listener_t_class @PMIX_RENAME@pmix_listener_t_class
#define pmix_list_item_t_class @PMIX_RENAME@pmix_list_item_t_class
#define pmix_list_t_class @PMIX_RENAME@pmix_list_t_class
#define PMIx_Log_nb @PMIX_RENAME@PMIx_Log_nb
#define PMIx_Lookup @PMIX_RENAME@PMIx_Lookup
#define PMIx_Lookup_nb @PMIX_RENAME@PMIx_Lookup_nb
#define pmix_mca_base_close @PMIX_RENAME@pmix_mca_base_close
#define pmix_mca_base_cmd_line_process_args @PMIX_RENAME@pmix_mca_base_cmd_line_process_args
#define pmix_mca_base_cmd_line_setup @PMIX_RENAME@pmix_mca_base_cmd_line_setup
#define pmix_mca_base_cmd_line_wrap_args @PMIX_RENAME@pmix_mca_base_cmd_line_wrap_args
#define pmix_mca_base_component_close @PMIX_RENAME@pmix_mca_base_component_close
#define pmix_mca_base_component_compare @PMIX_RENAME@pmix_mca_base_component_compare
#define pmix_mca_base_component_compare_priority @PMIX_RENAME@pmix_mca_base_component_compare_priority
#define pmix_mca_base_component_compatible @PMIX_RENAME@pmix_mca_base_component_compatible
#define pmix_mca_base_component_disable_dlopen @PMIX_RENAME@pmix_mca_base_component_disable_dlopen
#define pmix_mca_base_component_find @PMIX_RENAME@pmix_mca_base_component_find
#define pmix_mca_base_component_find_finalize @PMIX_RENAME@pmix_mca_base_component_find_finalize
#define pmix_mca_base_component_list_item_t_class @PMIX_RENAME@pmix_mca_base_component_list_item_t_class
#define pmix_mca_base_component_parse_requested @PMIX_RENAME@pmix_mca_base_component_parse_requested
#define pmix_mca_base_component_path @PMIX_RENAME@pmix_mca_base_component_path
#define pmix_mca_base_component_priority_list_item_t_class @PMIX_RENAME@pmix_mca_base_component_priority_list_item_t_class
#define pmix_mca_base_component_repository_add @PMIX_RENAME@pmix_mca_base_component_repository_add
#define pmix_mca_base_component_repository_finalize @PMIX_RENAME@pmix_mca_base_component_repository_finalize
#define pmix_mca_base_component_repository_get_components @PMIX_RENAME@pmix_mca_base_component_repository_get_components
#define pmix_mca_base_component_repository_init @PMIX_RENAME@pmix_mca_base_component_repository_init
#define pmix_mca_base_component_repository_item_t_class @PMIX_RENAME@pmix_mca_base_component_repository_item_t_class
#define pmix_mca_base_component_repository_open @PMIX_RENAME@pmix_mca_base_component_repository_open
#define pmix_mca_base_component_repository_release @PMIX_RENAME@pmix_mca_base_component_repository_release
#define pmix_mca_base_component_repository_retain_component @PMIX_RENAME@pmix_mca_base_component_repository_retain_component
#define pmix_mca_base_components_close @PMIX_RENAME@pmix_mca_base_components_close
#define pmix_mca_base_components_filter @PMIX_RENAME@pmix_mca_base_components_filter
#define pmix_mca_base_component_show_load_errors @PMIX_RENAME@pmix_mca_base_component_show_load_errors
#define pmix_mca_base_component_to_string @PMIX_RENAME@pmix_mca_base_component_to_string
#define pmix_mca_base_component_track_load_errors @PMIX_RENAME@pmix_mca_base_component_track_load_errors
#define pmix_mca_base_component_unload @PMIX_RENAME@pmix_mca_base_component_unload
#define pmix_mca_base_component_var_register @PMIX_RENAME@pmix_mca_base_component_var_register
#define pmix_mca_base_failed_component_t_class @PMIX_RENAME@pmix_mca_base_failed_component_t_class
#define pmix_mca_base_framework_close @PMIX_RENAME@pmix_mca_base_framework_close
#define pmix_mca_base_framework_components_close @PMIX_RENAME@pmix_mca_base_framework_components_close
#define pmix_mca_base_framework_components_open @PMIX_RENAME@pmix_mca_base_framework_components_open
#define pmix_mca_base_framework_components_register @PMIX_RENAME@pmix_mca_base_framework_components_register
#define pmix_mca_base_framework_is_open @PMIX_RENAME@pmix_mca_base_framework_is_open
#define pmix_mca_base_framework_is_registered @PMIX_RENAME@pmix_mca_base_framework_is_registered
#define pmix_mca_base_framework_open @PMIX_RENAME@pmix_mca_base_framework_open
#define pmix_mca_base_framework_register @PMIX_RENAME@pmix_mca_base_framework_register
#define pmix_mca_base_framework_var_register @PMIX_RENAME@pmix_mca_base_framework_var_register
#define pmix_mca_base_open @PMIX_RENAME@pmix_mca_base_open
#define pmix_mca_base_select @PMIX_RENAME@pmix_mca_base_select
#define pmix_mca_base_system_default_path @PMIX_RENAME@pmix_mca_base_system_default_path
#define pmix_mca_base_user_default_path @PMIX_RENAME@pmix_mca_base_user_default_path
#define pmix_mca_base_var_build_env @PMIX_RENAME@pmix_mca_base_var_build_env
#define pmix_mca_base_var_cache_files @PMIX_RENAME@pmix_mca_base_var_cache_files
#define pmix_mca_base_var_check_exclusive @PMIX_RENAME@pmix_mca_base_var_check_exclusive
#define pmix_mca_base_var_deregister @PMIX_RENAME@pmix_mca_base_var_deregister
#define pmix_mca_base_var_dump @PMIX_RENAME@pmix_mca_base_var_dump
#define pmix_mca_base_var_env_name @PMIX_RENAME@pmix_mca_base_var_env_name
#define pmix_mca_base_var_finalize @PMIX_RENAME@pmix_mca_base_var_finalize
#define pmix_mca_base_var_find @PMIX_RENAME@pmix_mca_base_var_find
#define pmix_mca_base_var_find_by_name @PMIX_RENAME@pmix_mca_base_var_find_by_name
#define pmix_mca_base_var_get @PMIX_RENAME@pmix_mca_base_var_get
#define pmix_mca_base_var_get_count @PMIX_RENAME@pmix_mca_base_var_get_count
#define pmix_mca_base_var_get_value @PMIX_RENAME@pmix_mca_base_var_get_value
#define pmix_mca_base_var_group_component_register @PMIX_RENAME@pmix_mca_base_var_group_component_register
#define pmix_mca_base_var_group_deregister @PMIX_RENAME@pmix_mca_base_var_group_deregister
#define pmix_mca_base_var_group_find @PMIX_RENAME@pmix_mca_base_var_group_find
#define pmix_mca_base_var_group_find_by_name @PMIX_RENAME@pmix_mca_base_var_group_find_by_name
#define pmix_mca_base_var_group_get @PMIX_RENAME@pmix_mca_base_var_group_get
#define pmix_mca_base_var_group_get_count @PMIX_RENAME@pmix_mca_base_var_group_get_count
#define pmix_mca_base_var_group_get_stamp @PMIX_RENAME@pmix_mca_base_var_group_get_stamp
#define pmix_mca_base_var_group_register @PMIX_RENAME@pmix_mca_base_var_group_register
#define pmix_mca_base_var_group_set_var_flag @PMIX_RENAME@pmix_mca_base_var_group_set_var_flag
#define pmix_mca_base_var_group_t_class @PMIX_RENAME@pmix_mca_base_var_group_t_class
#define pmix_mca_base_var_init @PMIX_RENAME@pmix_mca_base_var_init
#define pmix_mca_base_var_process_env_list @PMIX_RENAME@pmix_mca_base_var_process_env_list
#define pmix_mca_base_var_process_env_list_from_file @PMIX_RENAME@pmix_mca_base_var_process_env_list_from_file
#define pmix_mca_base_var_register @PMIX_RENAME@pmix_mca_base_var_register
#define pmix_mca_base_var_register_synonym @PMIX_RENAME@pmix_mca_base_var_register_synonym
#define pmix_mca_base_var_set_flag @PMIX_RENAME@pmix_mca_base_var_set_flag
#define pmix_mca_base_var_set_value @PMIX_RENAME@pmix_mca_base_var_set_value
#define pmix_mca_base_var_t_class @PMIX_RENAME@pmix_mca_base_var_t_class
#define pmix_mutex_t_class @PMIX_RENAME@pmix_mutex_t_class
#define pmix_namelist_t_class @PMIX_RENAME@pmix_namelist_t_class
#define pmix_net_addr_isipv4public @PMIX_RENAME@pmix_net_addr_isipv4public
#define pmix_net_finalize @PMIX_RENAME@pmix_net_finalize
#define pmix_net_get_hostname @PMIX_RENAME@pmix_net_get_hostname
#define pmix_net_get_port @PMIX_RENAME@pmix_net_get_port
#define pmix_net_init @PMIX_RENAME@pmix_net_init
#define pmix_net_isaddr @PMIX_RENAME@pmix_net_isaddr
#define pmix_net_islocalhost @PMIX_RENAME@pmix_net_islocalhost
#define pmix_net_prefix2netmask @PMIX_RENAME@pmix_net_prefix2netmask
#define pmix_net_samenetwork @PMIX_RENAME@pmix_net_samenetwork
#define PMIx_Notify_event @PMIX_RENAME@PMIx_Notify_event
#define pmix_nspace_caddy_t_class @PMIX_RENAME@pmix_nspace_caddy_t_class
#define pmix_nspace_t_class @PMIX_RENAME@pmix_nspace_t_class
#define pmix_object_t_class @PMIX_RENAME@pmix_object_t_class
#define pmix_os_path @PMIX_RENAME@pmix_os_path
#define pmix_output @PMIX_RENAME@pmix_output
#define pmix_output_close @PMIX_RENAME@pmix_output_close
#define pmix_output_finalize @PMIX_RENAME@pmix_output_finalize
#define pmix_output_get_verbosity @PMIX_RENAME@pmix_output_get_verbosity
#define pmix_output_hexdump @PMIX_RENAME@pmix_output_hexdump
#define pmix_output_init @PMIX_RENAME@pmix_output_init
#define pmix_output_open @PMIX_RENAME@pmix_output_open
#define pmix_output_reopen @PMIX_RENAME@pmix_output_reopen
#define pmix_output_reopen_all @PMIX_RENAME@pmix_output_reopen_all
#define pmix_output_set_output_file_info @PMIX_RENAME@pmix_output_set_output_file_info
#define pmix_output_set_verbosity @PMIX_RENAME@pmix_output_set_verbosity
#define pmix_output_switch @PMIX_RENAME@pmix_output_switch
#define pmix_output_verbose @PMIX_RENAME@pmix_output_verbose
#define pmix_output_vverbose @PMIX_RENAME@pmix_output_vverbose
#define pmix_path_access @PMIX_RENAME@pmix_path_access
#define pmix_path_df @PMIX_RENAME@pmix_path_df
#define pmix_path_find @PMIX_RENAME@pmix_path_find
#define pmix_path_findv @PMIX_RENAME@pmix_path_findv
#define pmix_path_is_absolute @PMIX_RENAME@pmix_path_is_absolute
#define pmix_path_nfs @PMIX_RENAME@pmix_path_nfs
#define pmix_pdl_base_framework @PMIX_RENAME@pmix_pdl_base_framework
#define pmix_peer_t_class @PMIX_RENAME@pmix_peer_t_class
#define pmix_pending_connection_t_class @PMIX_RENAME@pmix_pending_connection_t_class
#define PMIx_Persistence_string @PMIX_RENAME@PMIx_Persistence_string
#define pmix_pif_base_framework @PMIX_RENAME@pmix_pif_base_framework
#define pmix_pinstall_dirs @PMIX_RENAME@pmix_pinstall_dirs
#define pmix_pinstalldirs_base_framework @PMIX_RENAME@pmix_pinstalldirs_base_framework
#define pmix_pnet @PMIX_RENAME@pmix_pnet
#define pmix_pnet_base_child_finalized @PMIX_RENAME@pmix_pnet_base_child_finalized
#define pmix_pnet_base_framework @PMIX_RENAME@pmix_pnet_base_framework
#define pmix_pnet_base_local_app_finalized @PMIX_RENAME@pmix_pnet_base_local_app_finalized
#define pmix_pnet_base_select @PMIX_RENAME@pmix_pnet_base_select
#define pmix_pnet_base_setup_app @PMIX_RENAME@pmix_pnet_base_setup_app
#define pmix_pnet_base_setup_fork @PMIX_RENAME@pmix_pnet_base_setup_fork
#define pmix_pnet_base_setup_local_network @PMIX_RENAME@pmix_pnet_base_setup_local_network
#define pmix_pnet_globals @PMIX_RENAME@pmix_pnet_globals
#define pmix_pointer_array_add @PMIX_RENAME@pmix_pointer_array_add
#define pmix_pointer_array_init @PMIX_RENAME@pmix_pointer_array_init
#define pmix_pointer_array_set_item @PMIX_RENAME@pmix_pointer_array_set_item
#define pmix_pointer_array_set_size @PMIX_RENAME@pmix_pointer_array_set_size
#define pmix_pointer_array_t_class @PMIX_RENAME@pmix_pointer_array_t_class
#define pmix_pointer_array_test_and_set_item @PMIX_RENAME@pmix_pointer_array_test_and_set_item
#define pmix_preg @PMIX_RENAME@pmix_preg
#define pmix_preg_base_framework @PMIX_RENAME@pmix_preg_base_framework
#define pmix_preg_base_generate_node_regex @PMIX_RENAME@pmix_preg_base_generate_node_regex
#define pmix_preg_base_generate_ppn @PMIX_RENAME@pmix_preg_base_generate_ppn
#define pmix_preg_base_parse_nodes @PMIX_RENAME@pmix_preg_base_parse_nodes
#define pmix_preg_base_parse_procs @PMIX_RENAME@pmix_preg_base_parse_procs
#define pmix_preg_base_resolve_nodes @PMIX_RENAME@pmix_preg_base_resolve_nodes
#define pmix_preg_base_resolve_peers @PMIX_RENAME@pmix_preg_base_resolve_peers
#define pmix_preg_base_select @PMIX_RENAME@pmix_preg_base_select
#define pmix_preg_globals @PMIX_RENAME@pmix_preg_globals
#define PMIx_Process_monitor_nb @PMIX_RENAME@PMIx_Process_monitor_nb
#define PMIx_Proc_state_string @PMIX_RENAME@PMIx_Proc_state_string
#define pmix_psec_base_assign_module @PMIX_RENAME@pmix_psec_base_assign_module
#define pmix_psec_base_framework @PMIX_RENAME@pmix_psec_base_framework
#define pmix_psec_base_get_available_modules @PMIX_RENAME@pmix_psec_base_get_available_modules
#define pmix_psec_base_select @PMIX_RENAME@pmix_psec_base_select
#define pmix_psensor @PMIX_RENAME@pmix_psensor
#define pmix_psensor_base @PMIX_RENAME@pmix_psensor_base
#define pmix_psensor_base_framework @PMIX_RENAME@pmix_psensor_base_framework
#define pmix_psensor_base_select @PMIX_RENAME@pmix_psensor_base_select
#define pmix_psensor_base_start @PMIX_RENAME@pmix_psensor_base_start
#define pmix_psensor_base_stop @PMIX_RENAME@pmix_psensor_base_stop
#define pmix_pshmem @PMIX_RENAME@pmix_pshmem
#define pmix_pshmem_base_framework @PMIX_RENAME@pmix_pshmem_base_framework
#define pmix_pshmem_base_select @PMIX_RENAME@pmix_pshmem_base_select
#define pmix_ptl_base_assign_module @PMIX_RENAME@pmix_ptl_base_assign_module
#define pmix_ptl_base_cancel_recv @PMIX_RENAME@pmix_ptl_base_cancel_recv
#define pmix_ptl_base_connect @PMIX_RENAME@pmix_ptl_base_connect
#define pmix_ptl_base_connect_to_peer @PMIX_RENAME@pmix_ptl_base_connect_to_peer
#define pmix_ptl_base_framework @PMIX_RENAME@pmix_ptl_base_framework
#define pmix_ptl_base_get_available_modules @PMIX_RENAME@pmix_ptl_base_get_available_modules
#define pmix_ptl_base_lost_connection @PMIX_RENAME@pmix_ptl_base_lost_connection
#define pmix_ptl_base_output @PMIX_RENAME@pmix_ptl_base_output
#define pmix_ptl_base_process_msg @PMIX_RENAME@pmix_ptl_base_process_msg
#define pmix_ptl_base_recv_blocking @PMIX_RENAME@pmix_ptl_base_recv_blocking
#define pmix_ptl_base_recv_handler @PMIX_RENAME@pmix_ptl_base_recv_handler
#define pmix_ptl_base_register_recv @PMIX_RENAME@pmix_ptl_base_register_recv
#define pmix_ptl_base_select @PMIX_RENAME@pmix_ptl_base_select
#define pmix_ptl_base_send @PMIX_RENAME@pmix_ptl_base_send
#define pmix_ptl_base_send_blocking @PMIX_RENAME@pmix_ptl_base_send_blocking
#define pmix_ptl_base_send_handler @PMIX_RENAME@pmix_ptl_base_send_handler
#define pmix_ptl_base_send_recv @PMIX_RENAME@pmix_ptl_base_send_recv
#define pmix_ptl_base_set_blocking @PMIX_RENAME@pmix_ptl_base_set_blocking
#define pmix_ptl_base_set_nonblocking @PMIX_RENAME@pmix_ptl_base_set_nonblocking
#define pmix_ptl_base_set_notification_cbfunc @PMIX_RENAME@pmix_ptl_base_set_notification_cbfunc
#define pmix_ptl_base_start_listening @PMIX_RENAME@pmix_ptl_base_start_listening
#define pmix_ptl_base_stop_listening @PMIX_RENAME@pmix_ptl_base_stop_listening
#define pmix_ptl_globals @PMIX_RENAME@pmix_ptl_globals
#define pmix_ptl_posted_recv_t_class @PMIX_RENAME@pmix_ptl_posted_recv_t_class
#define pmix_ptl_queue_t_class @PMIX_RENAME@pmix_ptl_queue_t_class
#define pmix_ptl_recv_t_class @PMIX_RENAME@pmix_ptl_recv_t_class
#define pmix_ptl_send_t_class @PMIX_RENAME@pmix_ptl_send_t_class
#define pmix_ptl_sr_t_class @PMIX_RENAME@pmix_ptl_sr_t_class
#define PMIx_Publish @PMIX_RENAME@PMIx_Publish
#define PMIx_Publish_nb @PMIX_RENAME@PMIx_Publish_nb
#define PMIx_Put @PMIX_RENAME@PMIx_Put
#define pmix_query_caddy_t_class @PMIX_RENAME@pmix_query_caddy_t_class
#define PMIx_Query_info_nb @PMIX_RENAME@PMIx_Query_info_nb
#define pmix_rand @PMIX_RENAME@pmix_rand
#define pmix_random @PMIX_RENAME@pmix_random
#define pmix_rank_info_t_class @PMIX_RENAME@pmix_rank_info_t_class
#define pmix_recursive_mutex_t_class @PMIX_RENAME@pmix_recursive_mutex_t_class
#define pmix_regex_range_t_class @PMIX_RENAME@pmix_regex_range_t_class
#define pmix_regex_value_t_class @PMIX_RENAME@pmix_regex_value_t_class
#define PMIx_Register_event_handler @PMIX_RENAME@PMIx_Register_event_handler
#define pmix_register_params @PMIX_RENAME@pmix_register_params
#define PMIx_Resolve_nodes @PMIX_RENAME@PMIx_Resolve_nodes
#define PMIx_Resolve_peers @PMIX_RENAME@PMIx_Resolve_peers
#define pmix_ring_buffer_init @PMIX_RENAME@pmix_ring_buffer_init
#define pmix_ring_buffer_poke @PMIX_RENAME@pmix_ring_buffer_poke
#define pmix_ring_buffer_pop @PMIX_RENAME@pmix_ring_buffer_pop
#define pmix_ring_buffer_push @PMIX_RENAME@pmix_ring_buffer_push
#define pmix_rte_finalize @PMIX_RENAME@pmix_rte_finalize
#define pmix_rte_init @PMIX_RENAME@pmix_rte_init
#define PMIx_Scope_string @PMIX_RENAME@PMIx_Scope_string
#define PMIx_server_deregister_client @PMIX_RENAME@PMIx_server_deregister_client
#define PMIx_server_deregister_nspace @PMIX_RENAME@PMIx_server_deregister_nspace
#define PMIx_server_dmodex_request @PMIX_RENAME@PMIx_server_dmodex_request
#define PMIx_server_finalize @PMIX_RENAME@PMIx_server_finalize
#define pmix_server_globals @PMIX_RENAME@pmix_server_globals
#define PMIx_server_init @PMIX_RENAME@PMIx_server_init
#define PMIx_server_register_client @PMIX_RENAME@PMIx_server_register_client
#define PMIx_server_register_nspace @PMIX_RENAME@PMIx_server_register_nspace
#define PMIx_server_setup_application @PMIX_RENAME@PMIx_server_setup_application
#define PMIx_server_setup_fork @PMIX_RENAME@PMIx_server_setup_fork
#define PMIx_server_setup_local_support @PMIX_RENAME@PMIx_server_setup_local_support
#define pmix_setenv @PMIX_RENAME@pmix_setenv
#define pmix_setup_caddy_t_class @PMIX_RENAME@pmix_setup_caddy_t_class
#define pmix_shift_caddy_t_class @PMIX_RENAME@pmix_shift_caddy_t_class
#define pmix_show_help @PMIX_RENAME@pmix_show_help
#define pmix_show_help_add_dir @PMIX_RENAME@pmix_show_help_add_dir
#define pmix_show_help_finalize @PMIX_RENAME@pmix_show_help_finalize
#define pmix_show_help_init @PMIX_RENAME@pmix_show_help_init
#define pmix_show_help_string @PMIX_RENAME@pmix_show_help_string
#define pmix_show_help_vstring @PMIX_RENAME@pmix_show_help_vstring
#define pmix_show_vhelp @PMIX_RENAME@pmix_show_vhelp
#define pmix_snprintf @PMIX_RENAME@pmix_snprintf
#define PMIx_Spawn @PMIX_RENAME@PMIx_Spawn
#define PMIx_Spawn_nb @PMIX_RENAME@PMIx_Spawn_nb
#define pmix_srand @PMIX_RENAME@pmix_srand
#define PMIx_Store_internal @PMIX_RENAME@PMIx_Store_internal
#define pmix_sync_wait_mt @PMIX_RENAME@pmix_sync_wait_mt
#define pmix_thread_get_self @PMIX_RENAME@pmix_thread_get_self
#define pmix_thread_join @PMIX_RENAME@pmix_thread_join
#define pmix_thread_kill @PMIX_RENAME@pmix_thread_kill
#define pmix_thread_self_compare @PMIX_RENAME@pmix_thread_self_compare
#define pmix_thread_set_main @PMIX_RENAME@pmix_thread_set_main
#define pmix_thread_start @PMIX_RENAME@pmix_thread_start
#define pmix_thread_t_class @PMIX_RENAME@pmix_thread_t_class
#define pmix_tmp_directory @PMIX_RENAME@pmix_tmp_directory
#define PMIx_tool_finalize @PMIX_RENAME@PMIx_tool_finalize
#define PMIx_tool_init @PMIX_RENAME@PMIx_tool_init
#define pmix_tsd_key_create @PMIX_RENAME@pmix_tsd_key_create
#define pmix_tsd_keys_destruct @PMIX_RENAME@pmix_tsd_keys_destruct
#define PMIx_Unpublish @PMIX_RENAME@PMIx_Unpublish
#define PMIx_Unpublish_nb @PMIX_RENAME@PMIx_Unpublish_nb
#define pmix_unsetenv @PMIX_RENAME@pmix_unsetenv
#define pmix_util_compress_string @PMIX_RENAME@pmix_util_compress_string
#define pmix_util_getid @PMIX_RENAME@pmix_util_getid
#define pmix_util_get_ranges @PMIX_RENAME@pmix_util_get_ranges
#define pmix_util_keyval_parse @PMIX_RENAME@pmix_util_keyval_parse
#define pmix_util_keyval_parse_finalize @PMIX_RENAME@pmix_util_keyval_parse_finalize
#define pmix_util_keyval_parse_init @PMIX_RENAME@pmix_util_keyval_parse_init
#define pmix_util_keyval_parse_lineno @PMIX_RENAME@pmix_util_keyval_parse_lineno
#define pmix_util_keyval_save_internal_envars @PMIX_RENAME@pmix_util_keyval_save_internal_envars
#define pmix_util_parse_range_options @PMIX_RENAME@pmix_util_parse_range_options
#define pmix_util_uncompress_string @PMIX_RENAME@pmix_util_uncompress_string
#define pmix_value_array_set_size @PMIX_RENAME@pmix_value_array_set_size
#define pmix_value_array_t_class @PMIX_RENAME@pmix_value_array_t_class
#define pmix_value_load @PMIX_RENAME@pmix_value_load
#define pmix_value_xfer @PMIX_RENAME@pmix_value_xfer
#define pmix_var_type_names @PMIX_RENAME@pmix_var_type_names
#define pmix_vasprintf @PMIX_RENAME@pmix_vasprintf
#define pmix_vsnprintf @PMIX_RENAME@pmix_vsnprintf

Просмотреть файл

@ -92,6 +92,7 @@ include client/Makefile.include
include server/Makefile.include
include runtime/Makefile.include
include tool/Makefile.include
include tools/Makefile.include
include common/Makefile.include
MAINTAINERCLEANFILES = Makefile.in config.h config.h.in

Просмотреть файл

@ -12,6 +12,8 @@
# All rights reserved.
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
# Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -37,11 +39,13 @@ headers += \
include/prefetch.h \
include/types.h \
include/pmix_config_top.h \
include/pmix_config_bottom.h
include/pmix_config_bottom.h \
include/pmix_portable_platform.h \
include/frameworks.h
endif ! PMIX_EMBEDDED_MODE
if WANT_INSTALL_HEADERS
headers += \
nodist_headers += \
include/pmix_config.h
endif

Просмотреть файл

@ -0,0 +1,401 @@
/*
* Header file with preprocessor magic to figure out, which compiler the user has been calling!
*
* This code is adapted from the file other/portable_platform.h of GASnet-1.14.0:
* - Ripping out the required parts.
* - Get rid of brackets as it messes up autoconf
* - Delete version tests for older PGI versions (#include "omp.h" not acceptabe)
* - Indent ('#' should be in column 0)
*
* External packages (i.e., romio) depend on top_build_dir/ompi/include, therefore
* although this is not changed in the configure process, this has to be set as
* a .in file...
* ---------------------------------------------------------------------------
*/
#ifndef PMIX_PORTABLE_PLATFORM_H
#define PMIX_PORTABLE_PLATFORM_H
/* All files in this directory and all sub-directories (except where otherwise noted)
* are subject to the following licensing terms:
*
* ---------------------------------------------------------------------------
* "Copyright (c) 2000-2003 The Regents of the University of California.
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose, without fee, and without written agreement is
* hereby granted, provided that the above copyright notice and the following
* two paragraphs appear in all copies of this software.
*
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
* CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
* ---------------------------------------------------------------------------
*
* Please see the license.txt files within the gm-conduit, lapi-conduit and
* vapi-conduit directories for the licensing terms governing those
* contributed components.
*
* The authors/contributors of GASNet include:
*
* Dan Bonachea <bonachea@cs.berkeley.edu>:
* General infrastructure & documentation
* mpi-conduit
* elan-conduit
* smp-conduit
* udp-conduit
* extended-ref
* template-conduit
* Christian Bell <csbell@cs.berkeley.edu>: gm-conduit, shmem-conduit
* Mike Welcome <mlwelcome@lbl.gov>: lapi-conduit, portals-conduit
* Paul H. Hargrove <phhargrove@lbl.gov>: vapi-conduit, ibv-conduit
* Rajesh Nishtala <rajeshn@cs.berkeley.edu>: collectives, dcmf-conduit
* Parry Husbands (PJRHusbands@lbl.gov): lapi-conduit
*
* For more information about GASNet, visit our home page at:
* http://gasnet.cs.berkeley.edu/
* Or send email to:
* <upc@lbl.gov>
*
* Source code contributions (fixes, patches, extensions etc.) should be
* sent to <upc@lbl.gov> to be reviewed for acceptance into the primary
* distribution. Contributions are most likely to be accepted if they
* are provided as public domain, or under a BSD-style license such as
* the one above.
*
*/
#ifndef _STRINGIFY
#define _STRINGIFY_HELPER(x) #x
#define _STRINGIFY(x) _STRINGIFY_HELPER(x)
#endif
#if defined(__INTEL_COMPILER)
# define PLATFORM_COMPILER_FAMILYNAME INTEL
# define PLATFORM_COMPILER_FAMILYID 2
# ifdef __cplusplus
# define PLATFORM_COMPILER_INTEL_CXX 1
# else
# define PLATFORM_COMPILER_INTEL_C 1
# endif
# define _PLATFORM_COMPILER_INTEL_MIN_BUILDDATE 19700000 /* year 1970: predates most intel products :) */
# ifdef __INTEL_COMPILER_BUILD_DATE
# define _PLATFORM_INTEL_COMPILER_BUILD_DATE __INTEL_COMPILER_BUILD_DATE
# else
# define _PLATFORM_INTEL_COMPILER_BUILD_DATE _PLATFORM_COMPILER_INTEL_MIN_BUILDDATE
# endif
/* patch number is a decimal build date: YYYYMMDD */
# define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \
(((((maj) * 10) | (min)) << 20) | \
((pat) < _PLATFORM_COMPILER_INTEL_MIN_BUILDDATE ? \
_PLATFORM_COMPILER_INTEL_MIN_BUILDDATE : ((pat)-_PLATFORM_COMPILER_INTEL_MIN_BUILDDATE)))
# define PLATFORM_COMPILER_VERSION \
PLATFORM_COMPILER_VERSION_INT(__INTEL_COMPILER/10, __INTEL_COMPILER/100, _PLATFORM_INTEL_COMPILER_BUILD_DATE)
# define PLATFORM_COMPILER_VERSION_STR \
_STRINGIFY(__INTEL_COMPILER) "." _STRINGIFY(_PLATFORM_INTEL_COMPILER_BUILD_DATE)
#elif defined(__PATHSCALE__)
# define PLATFORM_COMPILER_PATHSCALE 1
# define PLATFORM_COMPILER_FAMILYNAME PATHSCALE
# define PLATFORM_COMPILER_FAMILYID 3
# ifdef __cplusplus
# define PLATFORM_COMPILER_PATHSCALE_CXX 1
# else
# define PLATFORM_COMPILER_PATHSCALE_C 1
# endif
# define PLATFORM_COMPILER_VERSION \
PLATFORM_COMPILER_VERSION_INT(__PATHCC__,__PATHCC_MINOR__,__PATHCC_PATCHLEVEL__)
# define PLATFORM_COMPILER_VERSION_STR __PATHSCALE__
#elif defined(__PGI)
# define PLATFORM_COMPILER_PGI 1
# define PLATFORM_COMPILER_FAMILYNAME PGI
# define PLATFORM_COMPILER_FAMILYID 4
# ifdef __cplusplus
# define PLATFORM_COMPILER_PGI_CXX 1
# else
# define PLATFORM_COMPILER_PGI_C 1
# endif
# if __PGIC__ == 99
/* bug 2230: PGI versioning was broken for some platforms in 7.0
no way to know exact version, but provide something slightly more accurate */
# define PLATFORM_COMPILER_VERSION 0x070000
# define PLATFORM_COMPILER_VERSION_STR "7.?-?"
# elif defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)
# define PLATFORM_COMPILER_VERSION \
PLATFORM_COMPILER_VERSION_INT(__PGIC__,__PGIC_MINOR__,__PGIC_PATCHLEVEL__)
# define PLATFORM_COMPILER_VERSION_STR \
_STRINGIFY(__PGIC__) "." _STRINGIFY(__PGIC_MINOR__) "-" _STRINGIFY(__PGIC_PATCHLEVEL__)
# else
/* PGI before 6.1-4 lacks any version ID preprocessor macros - so use this filthy hack */
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
* We cannot do these within mpi.h.in, as we should not include ompi.h
* Hopefully, compilers with integrated preprocessors will not analyse code within the #if 0-block
* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*/
#if 0
# ifdef PLATFORM_PGI_IS_ANCIENT
/* Include below might fail for ancient versions lacking this header, but testing shows it
works back to at least 5.1-3 (Nov 2003), and based on docs probably back to 3.2 (Sep 2000) */
# define PLATFORM_COMPILER_VERSION 0
# elif defined(__x86_64__) /* bug 1753 - 64-bit omp.h upgrade happenned in <6.0-8,6.1-1) */
# include "omp.h"
# if defined(_PGOMP_H)
/* 6.1.1 or newer */
# define PLATFORM_COMPILER_VERSION 0x060101
# define PLATFORM_COMPILER_VERSION_STR ">=6.1-1"
# else
/* 6.0.8 or older */
# define PLATFORM_COMPILER_VERSION 0
# define PLATFORM_COMPILER_VERSION_STR "<=6.0-8"
# endif
# else /* 32-bit omp.h upgrade happenned in <5.2-4,6.0-8 */
# include "omp.h"
# if defined(_PGOMP_H)
/* 6.0-8 or newer */
# define PLATFORM_COMPILER_VERSION 0x060008
# define PLATFORM_COMPILER_VERSION_STR ">=6.0-8"
# else
/* 5.2-4 or older */
# define PLATFORM_COMPILER_VERSION 0
# define PLATFORM_COMPILER_VERSION_STR "<=5.2-4"
# endif
# endif
#endif /* 0 */
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
# endif
#elif defined(__xlC__)
# define PLATFORM_COMPILER_XLC 1
# define PLATFORM_COMPILER_FAMILYNAME XLC
# define PLATFORM_COMPILER_FAMILYID 5
# ifdef __cplusplus
# define PLATFORM_COMPILER_XLC_CXX 1
# else
# define PLATFORM_COMPILER_XLC_C 1
# endif
# define PLATFORM_COMPILER_VERSION __xlC__
# define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \
( ((maj) << 8) | ((min) << 4) | (pat) )
#elif defined(__DECC) || defined(__DECCXX)
# define PLATFORM_COMPILER_COMPAQ 1
# define PLATFORM_COMPILER_FAMILYNAME COMPAQ
# define PLATFORM_COMPILER_FAMILYID 6
# ifdef __cplusplus
# define PLATFORM_COMPILER_COMPAQ_CXX 1
# else
# define PLATFORM_COMPILER_COMPAQ_C 1
# endif
# if defined(__DECC_VER)
# define PLATFORM_COMPILER_VERSION __DECC_VER
# elif defined(__DECCXX_VER)
# define PLATFORM_COMPILER_VERSION __DECCXX_VER
# endif
# define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \
( ((maj) * 10000000) + ((min) * 100000) + (90000) + (pat) )
/* 90000 = official ver, 80000 = customer special ver, 60000 = field test ver */
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# define PLATFORM_COMPILER_SUN 1
# define PLATFORM_COMPILER_FAMILYNAME SUN
# define PLATFORM_COMPILER_FAMILYID 7
# ifdef __cplusplus
# define PLATFORM_COMPILER_SUN_CXX 1
# else
# define PLATFORM_COMPILER_SUN_C 1
# endif
# if defined(__SUNPRO_C) && __SUNPRO_C > 0
# define PLATFORM_COMPILER_VERSION __SUNPRO_C
# elif defined(__SUNPRO_CC) && __SUNPRO_CC > 0
# define PLATFORM_COMPILER_VERSION __SUNPRO_CC
# endif
# define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \
( ((maj) << 8) | ((min) << 4) | (pat) )
#elif defined(__HP_cc) || defined(__HP_aCC)
# define PLATFORM_COMPILER_HP 1
# define PLATFORM_COMPILER_FAMILYNAME HP
# define PLATFORM_COMPILER_FAMILYID 8
# ifdef __cplusplus
# define PLATFORM_COMPILER_HP_CXX 1
# else
# define PLATFORM_COMPILER_HP_C 1
# endif
# if defined(__HP_cc) && __HP_cc > 0
# define PLATFORM_COMPILER_VERSION __HP_cc
# elif defined(__HP_aCC) && __HP_aCC > 0
# define PLATFORM_COMPILER_VERSION __HP_aCC
# endif
# define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \
( ((maj) << 16) | ((min) << 8) | (pat) )
#elif defined(_SGI_COMPILER_VERSION) || \
(defined(_COMPILER_VERSION) && defined(__sgi) && !defined(__GNUC__)) /* 7.3.0 and earlier lack _SGI_COMPILER_VERSION */
# define PLATFORM_COMPILER_SGI 1
# define PLATFORM_COMPILER_FAMILYNAME SGI
# define PLATFORM_COMPILER_FAMILYID 9
# ifdef __cplusplus
# define PLATFORM_COMPILER_SGI_CXX 1
# else
# define PLATFORM_COMPILER_SGI_C 1
# endif
# if defined(_SGI_COMPILER_VERSION) && _SGI_COMPILER_VERSION > 0
# define PLATFORM_COMPILER_VERSION _SGI_COMPILER_VERSION
# elif defined(_COMPILER_VERSION) && _COMPILER_VERSION > 0
# define PLATFORM_COMPILER_VERSION _COMPILER_VERSION
# endif
# define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \
( ((maj) << 8) | ((min) << 4) | (pat) )
#elif defined(_CRAYC)
# define PLATFORM_COMPILER_CRAY 1
# define PLATFORM_COMPILER_FAMILYNAME CRAY
# define PLATFORM_COMPILER_FAMILYID 10
# ifdef __cplusplus
# define PLATFORM_COMPILER_CRAY_CXX 1
# else
# define PLATFORM_COMPILER_CRAY_C 1
# endif
# if defined(_RELEASE) && defined(_RELEASE_MINOR) /* X1 and XT */
# define PLATFORM_COMPILER_VERSION \
PLATFORM_COMPILER_VERSION_INT(_RELEASE,_RELEASE_MINOR,0)
# elif defined(_RELEASE) /* T3E */
# define PLATFORM_COMPILER_VERSION \
PLATFORM_COMPILER_VERSION_INT(_RELEASE,0,0)
# endif
# ifdef _RELEASE_STRING /* X1 and XT */
# define PLATFORM_COMPILER_VERSION_STR _RELEASE_STRING
# endif
#elif defined(__KCC)
# define PLATFORM_COMPILER_KAI 1
# define PLATFORM_COMPILER_FAMILYNAME KAI
# define PLATFORM_COMPILER_FAMILYID 11
# ifdef __cplusplus
# define PLATFORM_COMPILER_KAI_CXX 1
# else
# define PLATFORM_COMPILER_KAI_C 1
# endif
#elif defined(__MTA__)
# define PLATFORM_COMPILER_MTA 1
# define PLATFORM_COMPILER_FAMILYNAME MTA
# define PLATFORM_COMPILER_FAMILYID 12
# ifdef __cplusplus
# define PLATFORM_COMPILER_MTA_CXX 1
# else
# define PLATFORM_COMPILER_MTA_C 1
# endif
#elif defined(_SX)
# define PLATFORM_COMPILER_NECSX 1
# define PLATFORM_COMPILER_FAMILYNAME NECSX
# define PLATFORM_COMPILER_FAMILYID 13
# ifdef __cplusplus
# define PLATFORM_COMPILER_NECSX_CXX 1
# else
# define PLATFORM_COMPILER_NECSX_C 1
# endif
#elif defined(_MSC_VER)
# define PLATFORM_COMPILER_MICROSOFT 1
# define PLATFORM_COMPILER_FAMILYNAME MICROSOFT
# define PLATFORM_COMPILER_FAMILYID 14
# ifdef __cplusplus
# define PLATFORM_COMPILER_MICROSOFT_CXX 1
# else
# define PLATFORM_COMPILER_MICROSOFT_C 1
# endif
# define PLATFORM_COMPILER_VERSION _MSC_VER
#elif defined(__TINYC__)
# define PLATFORM_COMPILER_TINY 1
# define PLATFORM_COMPILER_FAMILYNAME TINY
# define PLATFORM_COMPILER_FAMILYID 15
# ifdef __cplusplus
# define PLATFORM_COMPILER_TINY_CXX 1
# else
# define PLATFORM_COMPILER_TINY_C 1
# endif
#elif defined(__LCC__)
# define PLATFORM_COMPILER_LCC 1
# define PLATFORM_COMPILER_FAMILYNAME LCC
# define PLATFORM_COMPILER_FAMILYID 16
# ifdef __cplusplus
# define PLATFORM_COMPILER_LCC_CXX 1
# else
# define PLATFORM_COMPILER_LCC_C 1
# endif
#else /* unknown compiler */
# define PLATFORM_COMPILER_UNKNOWN 1
#endif
/* this stanza comes last, because many vendor compilers lie and claim
to be GNU C for compatibility reasons and/or because they share a frontend */
#if defined(__GNUC__)
# undef PLATFORM_COMPILER_UNKNOWN
# ifndef PLATFORM_COMPILER_FAMILYID
# define PLATFORM_COMPILER_GNU 1
# define PLATFORM_COMPILER_FAMILYNAME GNU
# define PLATFORM_COMPILER_FAMILYID 1
# ifdef __cplusplus
# define PLATFORM_COMPILER_GNU_CXX 1
# else
# define PLATFORM_COMPILER_GNU_C 1
# endif
# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
# define PLATFORM_COMPILER_VERSION \
PLATFORM_COMPILER_VERSION_INT(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__)
# elif defined(__GNUC_MINOR__) /* older versions of egcs lack __GNUC_PATCHLEVEL__ */
# define PLATFORM_COMPILER_VERSION \
PLATFORM_COMPILER_VERSION_INT(__GNUC__,__GNUC_MINOR__,0)
# else
# define PLATFORM_COMPILER_VERSION \
PLATFORM_COMPILER_VERSION_INT(__GNUC__,0,0)
# endif
# define PLATFORM_COMPILER_VERSION_STR __PLATFORM_COMPILER_GNU_VERSION_STR
# else
# define _PLATFORM_COMPILER_GNU_VERSION_STR __PLATFORM_COMPILER_GNU_VERSION_STR
# endif
/* gather any advertised GNU version number info, even for non-gcc compilers */
# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
# define __PLATFORM_COMPILER_GNU_VERSION_STR \
_STRINGIFY(__GNUC__) "." _STRINGIFY(__GNUC_MINOR__) "." _STRINGIFY(__GNUC_PATCHLEVEL__)
# elif defined(__GNUC_MINOR__)
# define __PLATFORM_COMPILER_GNU_VERSION_STR \
_STRINGIFY(__GNUC__) "." _STRINGIFY(__GNUC_MINOR__) ".?"
# else
# define __PLATFORM_COMPILER_GNU_VERSION_STR \
_STRINGIFY(__GNUC__) ".?.?"
# endif
#elif defined(PLATFORM_COMPILER_UNKNOWN) /* unknown compiler */
# define PLATFORM_COMPILER_FAMILYNAME UNKNOWN
# define PLATFORM_COMPILER_FAMILYID 0
#endif
/* Default Values */
#ifndef PLATFORM_COMPILER_VERSION
# define PLATFORM_COMPILER_VERSION 0 /* don't know */
#endif
#ifndef PLATFORM_COMPILER_VERSION_STR
# define PLATFORM_COMPILER_VERSION_STR _STRINGIFY(PLATFORM_COMPILER_VERSION)
#endif
#ifndef PLATFORM_COMPILER_VERSION_INT
# define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \
(((maj) << 16) | ((min) << 8) | (pat))
#endif
#endif /* PMIX_PORTABLE_PLATFORM_H */

Просмотреть файл

@ -10,6 +10,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2010-2016 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -43,6 +44,7 @@ headers = \
libpmix_mca_base_la_SOURCES = \
$(headers) \
pmix_mca_base_close.c \
pmix_mca_base_cmd_line.c \
pmix_mca_base_component_compare.c \
pmix_mca_base_component_find.c \
pmix_mca_base_component_repository.c \

Просмотреть файл

@ -15,7 +15,7 @@
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016 Intel, Inc. All rights reserved.
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -37,6 +37,7 @@
#include "src/mca/mca.h"
#include "src/mca/base/pmix_mca_base_var.h"
#include "src/mca/base/pmix_mca_base_framework.h"
#include "src/util/cmd_line.h"
#include "src/util/output.h"
BEGIN_C_DECLS
@ -49,7 +50,7 @@ struct pmix_mca_base_component_list_item_t {
const pmix_mca_base_component_t *cli_component;
};
typedef struct pmix_mca_base_component_list_item_t pmix_mca_base_component_list_item_t;
PMIX_CLASS_DECLARATION(pmix_mca_base_component_list_item_t);
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_mca_base_component_list_item_t);
/*
* Structure for making priority lists of components
@ -61,16 +62,17 @@ struct pmix_mca_base_component_priority_list_item_t {
typedef struct pmix_mca_base_component_priority_list_item_t
pmix_mca_base_component_priority_list_item_t;
PMIX_CLASS_DECLARATION(pmix_mca_base_component_priority_list_item_t);
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_mca_base_component_priority_list_item_t);
/*
* Public variables
*/
extern char *pmix_mca_base_component_path;
extern bool pmix_mca_base_component_show_load_errors;
extern bool pmix_mca_base_component_disable_dlopen;
extern char *pmix_mca_base_system_default_path;
extern char *pmix_mca_base_user_default_path;
PMIX_EXPORT extern char *pmix_mca_base_component_path;
PMIX_EXPORT extern bool pmix_mca_base_component_show_load_errors;
PMIX_EXPORT extern bool pmix_mca_base_component_track_load_errors;
PMIX_EXPORT extern bool pmix_mca_base_component_disable_dlopen;
PMIX_EXPORT extern char *pmix_mca_base_system_default_path;
PMIX_EXPORT extern char *pmix_mca_base_user_default_path;
/*
* Standard verbosity levels
@ -114,7 +116,7 @@ enum {
* invoked during the initialization stage and specifically
* invoked in the special case of the *_info command.
*/
int pmix_mca_base_open(void);
PMIX_EXPORT int pmix_mca_base_open(void);
/**
* Last function called in the MCA
@ -128,17 +130,17 @@ int pmix_mca_base_open(void);
* It must be the last MCA function invoked. It is normally invoked
* during the finalize stage.
*/
int pmix_mca_base_close(void);
PMIX_EXPORT int pmix_mca_base_close(void);
/**
* A generic select function
*
*/
int pmix_mca_base_select(const char *type_name, int output_id,
pmix_list_t *components_available,
pmix_mca_base_module_t **best_module,
pmix_mca_base_component_t **best_component,
int *priority_out);
PMIX_EXPORT int pmix_mca_base_select(const char *type_name, int output_id,
pmix_list_t *components_available,
pmix_mca_base_module_t **best_module,
pmix_mca_base_component_t **best_component,
int *priority_out);
/**
* A function for component query functions to discover if they have
@ -148,32 +150,40 @@ int pmix_mca_base_select(const char *type_name, int output_id,
* available for selection.
*
*/
int pmix_mca_base_is_component_required(pmix_list_t *components_available,
pmix_mca_base_component_t *component,
bool exclusive,
bool *is_required);
PMIX_EXPORT int pmix_mca_base_is_component_required(pmix_list_t *components_available,
pmix_mca_base_component_t *component,
bool exclusive,
bool *is_required);
/* mca_base_cmd_line.c */
PMIX_EXPORT int pmix_mca_base_cmd_line_setup(pmix_cmd_line_t *cmd);
PMIX_EXPORT int pmix_mca_base_cmd_line_process_args(pmix_cmd_line_t *cmd,
char ***app_env,
char ***global_env);
PMIX_EXPORT void pmix_mca_base_cmd_line_wrap_args(char **args);
/* pmix_mca_base_component_compare.c */
int pmix_mca_base_component_compare_priority(pmix_mca_base_component_priority_list_item_t *a,
pmix_mca_base_component_priority_list_item_t *b);
int pmix_mca_base_component_compare(const pmix_mca_base_component_t *a,
const pmix_mca_base_component_t *b);
int pmix_mca_base_component_compatible(const pmix_mca_base_component_t *a,
const pmix_mca_base_component_t *b);
char * pmix_mca_base_component_to_string(const pmix_mca_base_component_t *a);
PMIX_EXPORT int pmix_mca_base_component_compare_priority(pmix_mca_base_component_priority_list_item_t *a,
pmix_mca_base_component_priority_list_item_t *b);
PMIX_EXPORT int pmix_mca_base_component_compare(const pmix_mca_base_component_t *a,
const pmix_mca_base_component_t *b);
PMIX_EXPORT int pmix_mca_base_component_compatible(const pmix_mca_base_component_t *a,
const pmix_mca_base_component_t *b);
PMIX_EXPORT char * pmix_mca_base_component_to_string(const pmix_mca_base_component_t *a);
/* pmix_mca_base_component_find.c */
int pmix_mca_base_component_find (const char *directory, pmix_mca_base_framework_t *framework,
bool ignore_requested, bool open_dso_components);
PMIX_EXPORT int pmix_mca_base_component_find (const char *directory, pmix_mca_base_framework_t *framework,
bool ignore_requested, bool open_dso_components);
/**
* Parse the requested component string and return an pmix_argv of the requested
* (or not requested) components.
*/
int pmix_mca_base_component_parse_requested (const char *requested, bool *include_mode,
char ***requested_component_names);
PMIX_EXPORT int pmix_mca_base_component_parse_requested (const char *requested, bool *include_mode,
char ***requested_component_names);
/**
* Filter a list of components based on a comma-delimted list of names and/or
@ -193,27 +203,27 @@ int pmix_mca_base_component_parse_requested (const char *requested, bool *includ
* This function closes and releases any components that do not match the filter_name and
* filter flags.
*/
int pmix_mca_base_components_filter (pmix_mca_base_framework_t *framework, uint32_t filter_flags);
PMIX_EXPORT int pmix_mca_base_components_filter (pmix_mca_base_framework_t *framework, uint32_t filter_flags);
/* Safely release some memory allocated by pmix_mca_base_component_find()
(i.e., is safe to call even if you never called
pmix_mca_base_component_find()). */
int pmix_mca_base_component_find_finalize(void);
PMIX_EXPORT int pmix_mca_base_component_find_finalize(void);
/* pmix_mca_base_components_register.c */
int pmix_mca_base_framework_components_register (struct pmix_mca_base_framework_t *framework,
pmix_mca_base_register_flag_t flags);
PMIX_EXPORT int pmix_mca_base_framework_components_register (struct pmix_mca_base_framework_t *framework,
pmix_mca_base_register_flag_t flags);
/* pmix_mca_base_components_open.c */
int pmix_mca_base_framework_components_open (struct pmix_mca_base_framework_t *framework,
pmix_mca_base_open_flag_t flags);
PMIX_EXPORT int pmix_mca_base_framework_components_open (struct pmix_mca_base_framework_t *framework,
pmix_mca_base_open_flag_t flags);
int pmix_mca_base_components_open(const char *type_name, int output_id,
const pmix_mca_base_component_t **static_components,
pmix_list_t *components_available,
bool open_dso_components);
PMIX_EXPORT int pmix_mca_base_components_open(const char *type_name, int output_id,
const pmix_mca_base_component_t **static_components,
pmix_list_t *components_available,
bool open_dso_components);
/* pmix_mca_base_components_close.c */
/**
@ -224,7 +234,7 @@ int pmix_mca_base_components_open(const char *type_name, int output_id,
*
* After calling this function the component may no longer be used.
*/
void pmix_mca_base_component_close (const pmix_mca_base_component_t *component, int output_id);
PMIX_EXPORT void pmix_mca_base_component_close (const pmix_mca_base_component_t *component, int output_id);
/**
* Release a component without closing it.
@ -233,13 +243,13 @@ void pmix_mca_base_component_close (const pmix_mca_base_component_t *component,
*
* After calling this function the component may no longer be used.
*/
void pmix_mca_base_component_unload (const pmix_mca_base_component_t *component, int output_id);
PMIX_EXPORT void pmix_mca_base_component_unload (const pmix_mca_base_component_t *component, int output_id);
int pmix_mca_base_components_close(int output_id, pmix_list_t *components_available,
const pmix_mca_base_component_t *skip);
PMIX_EXPORT int pmix_mca_base_components_close(int output_id, pmix_list_t *components_available,
const pmix_mca_base_component_t *skip);
int pmix_mca_base_framework_components_close (struct pmix_mca_base_framework_t *framework,
const pmix_mca_base_component_t *skip);
PMIX_EXPORT int pmix_mca_base_framework_components_close (struct pmix_mca_base_framework_t *framework,
const pmix_mca_base_component_t *skip);
END_C_DECLS

Просмотреть файл

@ -0,0 +1,239 @@
/*
* 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) 2014-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "pmix_config.h"
#include <stdio.h>
#include <string.h>
#include "src/util/cmd_line.h"
#include "src/util/argv.h"
#include "src/util/pmix_environ.h"
#include "src/util/show_help.h"
#include "src/mca/base/base.h"
#include "pmix_common.h"
/*
* Private variables
*/
/*
* Private functions
*/
static int process_arg(const char *param, const char *value,
char ***params, char ***values);
static void add_to_env(char **params, char **values, char ***env);
/*
* Add -mca to the possible command line options list
*/
int pmix_mca_base_cmd_line_setup(pmix_cmd_line_t *cmd)
{
int ret = PMIX_SUCCESS;
ret = pmix_cmd_line_make_opt3(cmd, '\0', PMIX_MCA_CMD_LINE_ID, PMIX_MCA_CMD_LINE_ID, 2,
"Pass context-specific MCA parameters; they are considered global if --g"PMIX_MCA_CMD_LINE_ID" is not used and only one context is specified (arg0 is the parameter name; arg1 is the parameter value)");
if (PMIX_SUCCESS != ret) {
return ret;
}
ret = pmix_cmd_line_make_opt3(cmd, '\0', "g"PMIX_MCA_CMD_LINE_ID, "g"PMIX_MCA_CMD_LINE_ID, 2,
"Pass global MCA parameters that are applicable to all contexts (arg0 is the parameter name; arg1 is the parameter value)");
if (PMIX_SUCCESS != ret) {
return ret;
}
{
pmix_cmd_line_init_t entry =
{"mca_base_param_file_prefix", '\0', "am", NULL, 1,
NULL, PMIX_CMD_LINE_TYPE_STRING,
"Aggregate MCA parameter set file list",
PMIX_CMD_LINE_OTYPE_LAUNCH
};
ret = pmix_cmd_line_make_opt_mca(cmd, entry);
if (PMIX_SUCCESS != ret) {
return ret;
}
}
{
pmix_cmd_line_init_t entry =
{"mca_base_envar_file_prefix", '\0', "tune", NULL, 1,
NULL, PMIX_CMD_LINE_TYPE_STRING,
"Application profile options file list",
PMIX_CMD_LINE_OTYPE_DEBUG
};
ret = pmix_cmd_line_make_opt_mca(cmd, entry);
if (PMIX_SUCCESS != ret) {
return ret;
}
}
return ret;
}
/*
* Look for and handle any -mca options on the command line
*/
int pmix_mca_base_cmd_line_process_args(pmix_cmd_line_t *cmd,
char ***context_env, char ***global_env)
{
int i, num_insts, rc;
char **params;
char **values;
/* If no relevant parameters were given, just return */
if (!pmix_cmd_line_is_taken(cmd, PMIX_MCA_CMD_LINE_ID) &&
!pmix_cmd_line_is_taken(cmd, "g"PMIX_MCA_CMD_LINE_ID)) {
return PMIX_SUCCESS;
}
/* Handle app context-specific parameters */
num_insts = pmix_cmd_line_get_ninsts(cmd, PMIX_MCA_CMD_LINE_ID);
params = values = NULL;
for (i = 0; i < num_insts; ++i) {
if (PMIX_SUCCESS != (rc = process_arg(pmix_cmd_line_get_param(cmd, PMIX_MCA_CMD_LINE_ID, i, 0),
pmix_cmd_line_get_param(cmd, PMIX_MCA_CMD_LINE_ID, i, 1),
&params, &values))) {
return rc;
}
}
if (NULL != params) {
add_to_env(params, values, context_env);
pmix_argv_free(params);
pmix_argv_free(values);
}
/* Handle global parameters */
num_insts = pmix_cmd_line_get_ninsts(cmd, "g"PMIX_MCA_CMD_LINE_ID);
params = values = NULL;
for (i = 0; i < num_insts; ++i) {
if (PMIX_SUCCESS != (rc = process_arg(pmix_cmd_line_get_param(cmd, "g"PMIX_MCA_CMD_LINE_ID, i, 0),
pmix_cmd_line_get_param(cmd, "g"PMIX_MCA_CMD_LINE_ID, i, 1),
&params, &values))) {
return rc;
}
}
if (NULL != params) {
add_to_env(params, values, global_env);
pmix_argv_free(params);
pmix_argv_free(values);
}
/* All done */
return PMIX_SUCCESS;
}
/*
* Process a single MCA argument.
*/
static int process_arg(const char *param, const char *value,
char ***params, char ***values)
{
int i;
char *p1;
/* check for quoted value */
if ('\"' == value[0] && '\"' == value[strlen(value)-1]) {
p1 = strdup(&value[1]);
p1[strlen(p1)-1] = '\0';
} else {
p1 = strdup(value);
}
/* Look to see if we've already got an -mca argument for the same
param. Check against the list of MCA param's that we've
already saved arguments for - if found, return an error. */
for (i = 0; NULL != *params && NULL != (*params)[i]; ++i) {
if (0 == strcmp(param, (*params)[i])) {
/* cannot use show_help here as it may not get out prior
* to the process exiting */
fprintf(stderr,
"---------------------------------------------------------------------------\n"
"The following MCA parameter has been listed multiple times on the\n"
"command line:\n\n"
" MCA param: %s\n\n"
"MCA parameters can only be listed once on a command line to ensure there\n"
"is no ambiguity as to its value. Please correct the situation and\n"
"try again.\n"
"---------------------------------------------------------------------------\n",
param);
free(p1);
return PMIX_ERROR;
}
}
/* If we didn't already have an value for the same param, save
this one away */
pmix_argv_append_nosize(params, param);
pmix_argv_append_nosize(values, p1);
free(p1);
return PMIX_SUCCESS;
}
static void add_to_env(char **params, char **values, char ***env)
{
int i;
char *name;
/* Loop through all the args that we've gotten and make env
vars of the form PMIX_MCA_PREFIX*=value. */
for (i = 0; NULL != params && NULL != params[i]; ++i) {
(void) pmix_mca_base_var_env_name (params[i], &name);
pmix_setenv(name, values[i], true, env);
free(name);
}
}
void pmix_mca_base_cmd_line_wrap_args(char **args)
{
int i;
char *tstr;
for (i=0; NULL != args && NULL != args[i]; i++) {
if (0 == strcmp(args[i], "-"PMIX_MCA_CMD_LINE_ID) ||
0 == strcmp(args[i], "--"PMIX_MCA_CMD_LINE_ID)) {
if (NULL == args[i+1] || NULL == args[i+2]) {
/* this should be impossible as the error would
* have been detected well before here, but just
* be safe */
return;
}
i += 2;
asprintf(&tstr, "\"%s\"", args[i]);
free(args[i]);
args[i] = tstr;
}
}
}

Просмотреть файл

@ -56,6 +56,26 @@ PMIX_CLASS_INSTANCE(pmix_mca_base_component_repository_item_t, pmix_list_item_t,
#endif /* PMIX_HAVE_PDL_SUPPORT */
static void clf_constructor(pmix_object_t *obj)
{
pmix_mca_base_failed_component_t *cli = (pmix_mca_base_failed_component_t *) obj;
cli->comp = NULL;
cli->error_msg = NULL;
}
static void clf_destructor(pmix_object_t *obj)
{
pmix_mca_base_failed_component_t *cli = (pmix_mca_base_failed_component_t *) obj;
cli->comp = NULL;
if( NULL != cli->error_msg ) {
free(cli->error_msg);
cli->error_msg = NULL;
}
}
PMIX_CLASS_INSTANCE(pmix_mca_base_failed_component_t, pmix_list_item_t,
clf_constructor, clf_destructor);
/*
* Private variables
@ -409,6 +429,17 @@ int pmix_mca_base_component_repository_open(pmix_mca_base_framework_t *framework
}
pmix_output_verbose(vl, 0, "pmix_mca_base_component_repository_open: unable to open %s: %s (ignored)",
ri->ri_base, err_msg);
if( pmix_mca_base_component_track_load_errors ) {
pmix_mca_base_failed_component_t *f_comp = PMIX_NEW(pmix_mca_base_failed_component_t);
f_comp->comp = ri;
if (0 > asprintf(&(f_comp->error_msg), "%s", err_msg)) {
PMIX_RELEASE(f_comp);
return PMIX_ERR_BAD_PARAM;
}
pmix_list_append(&framework->framework_failed_components, &f_comp->super);
}
return PMIX_ERR_BAD_PARAM;
}

Просмотреть файл

@ -13,7 +13,7 @@
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2016 Intel, Inc. All rights reserved.
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -59,7 +59,18 @@ struct pmix_mca_base_component_repository_item_t {
};
typedef struct pmix_mca_base_component_repository_item_t pmix_mca_base_component_repository_item_t;
PMIX_CLASS_DECLARATION(pmix_mca_base_component_repository_item_t);
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_mca_base_component_repository_item_t);
/*
* Structure to track information about why a component failed to load.
*/
struct pmix_mca_base_failed_component_t {
pmix_list_item_t super;
pmix_mca_base_component_repository_item_t *comp;
char *error_msg;
};
typedef struct pmix_mca_base_failed_component_t pmix_mca_base_failed_component_t;
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_mca_base_failed_component_t);
/**
* @brief initialize the component repository
@ -70,14 +81,14 @@ PMIX_CLASS_DECLARATION(pmix_mca_base_component_repository_item_t);
* pmix_mca_base_component_path MCA parameter. pmix_mca_base_open () is a
* prerequisite call as it registers the pmix_mca_base_component_path parameter.
*/
int pmix_mca_base_component_repository_init(void);
PMIX_EXPORT int pmix_mca_base_component_repository_init(void);
/**
* @brief add search path for dynamically loaded components
*
* @param[in] path delimited list of search paths to add
*/
int pmix_mca_base_component_repository_add(const char *path);
PMIX_EXPORT int pmix_mca_base_component_repository_add(const char *path);
/**
@ -89,13 +100,13 @@ int pmix_mca_base_component_repository_add(const char *path);
* The list returned in {framework_components} is owned by the component
* repository and CAN NOT be modified by the caller.
*/
int pmix_mca_base_component_repository_get_components(pmix_mca_base_framework_t *framework,
pmix_list_t **framework_components);
PMIX_EXPORT int pmix_mca_base_component_repository_get_components(pmix_mca_base_framework_t *framework,
pmix_list_t **framework_components);
/**
* @brief finalize the mca component repository
*/
void pmix_mca_base_component_repository_finalize(void);
PMIX_EXPORT void pmix_mca_base_component_repository_finalize(void);
/**
* @brief open the repository item and add it to the framework's component
@ -104,14 +115,14 @@ void pmix_mca_base_component_repository_finalize(void);
* @param[in] framework framework that matches the component
* @param[in] ri dynamic component to open
*/
int pmix_mca_base_component_repository_open(pmix_mca_base_framework_t *framework,
pmix_mca_base_component_repository_item_t *ri);
PMIX_EXPORT int pmix_mca_base_component_repository_open(pmix_mca_base_framework_t *framework,
pmix_mca_base_component_repository_item_t *ri);
/**
* @brief Reduce the reference count of a component and dlclose it if necessary
*/
void pmix_mca_base_component_repository_release(const pmix_mca_base_component_t *component);
PMIX_EXPORT void pmix_mca_base_component_repository_release(const pmix_mca_base_component_t *component);
/**
* @brief Increase the reference count of a component
@ -126,7 +137,7 @@ void pmix_mca_base_component_repository_release(const pmix_mca_base_component_t
* @note all components are automatically unloaded by the
* pmix_mca_base_component_repository_finalize() call.
*/
int pmix_mca_base_component_repository_retain_component(const char *type, const char *name);
PMIX_EXPORT int pmix_mca_base_component_repository_retain_component(const char *type, const char *name);
END_C_DECLS

Просмотреть файл

@ -67,6 +67,7 @@ int pmix_mca_base_framework_register (struct pmix_mca_base_framework_t *framewor
}
PMIX_CONSTRUCT(&framework->framework_components, pmix_list_t);
PMIX_CONSTRUCT(&framework->framework_failed_components, pmix_list_t);
if (framework->framework_flags & PMIX_MCA_BASE_FRAMEWORK_FLAG_NO_DSO) {
flags |= PMIX_MCA_BASE_REGISTER_STATIC_ONLY;
@ -239,6 +240,7 @@ int pmix_mca_base_framework_close (struct pmix_mca_base_framework_t *framework)
framework->framework_flags &= ~(PMIX_MCA_BASE_FRAMEWORK_FLAG_REGISTERED | PMIX_MCA_BASE_FRAMEWORK_FLAG_OPEN);
PMIX_DESTRUCT(&framework->framework_components);
PMIX_LIST_DESTRUCT(&framework->framework_failed_components);
framework_close_output (framework);

Просмотреть файл

@ -156,6 +156,8 @@ typedef struct pmix_mca_base_framework_t {
/** List of selected components (filled in by pmix_mca_base_framework_register()
or pmix_mca_base_framework_open() */
pmix_list_t framework_components;
/** List of components that failed to load */
pmix_list_t framework_failed_components;
} pmix_mca_base_framework_t;

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2017 The University of Tennessee and The University
* Copyright (c) 2004-2008 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -49,6 +49,7 @@ int pmix_mca_base_opened = 0;
char *pmix_mca_base_system_default_path = NULL;
char *pmix_mca_base_user_default_path = NULL;
bool pmix_mca_base_component_show_load_errors = (bool) PMIX_SHOW_LOAD_ERRORS_DEFAULT;
bool pmix_mca_base_component_track_load_errors = false;
bool pmix_mca_base_component_disable_dlopen = false;
static char *pmix_mca_base_verbose = NULL;
@ -119,6 +120,14 @@ int pmix_mca_base_open(void)
(void) pmix_mca_base_var_register_synonym(var_id, "pmix", "mca", NULL, "component_show_load_errors",
PMIX_MCA_BASE_VAR_SYN_FLAG_DEPRECATED);
pmix_mca_base_component_track_load_errors = false;
var_id = pmix_mca_base_var_register("pmix", "mca", "base", "component_track_load_errors",
"Whether to track errors for components that failed to load or not",
PMIX_MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
PMIX_INFO_LVL_9,
PMIX_MCA_BASE_VAR_SCOPE_READONLY,
&pmix_mca_base_component_track_load_errors);
pmix_mca_base_component_disable_dlopen = false;
var_id = pmix_mca_base_var_register("pmix", "mca", "base", "component_disable_dlopen",
"Whether to attempt to disable opening dynamic components or not",

Просмотреть файл

@ -1365,7 +1365,10 @@ static int register_variable (const char *project_name, const char *framework_na
/* Initialize the array if it has never been initialized */
if (!pmix_mca_base_var_initialized) {
pmix_mca_base_var_init();
ret = pmix_mca_base_var_init();
if (PMIX_SUCCESS != ret) {
return ret;
}
}
/* See if this entry is already in the array */

Просмотреть файл

@ -95,7 +95,7 @@ typedef enum {
PMIX_MCA_BASE_VAR_TYPE_MAX
} pmix_mca_base_var_type_t;
extern const char *pmix_var_type_names[];
PMIX_EXPORT extern const char *pmix_var_type_names[];
/**
* Source of an MCA variable's value
@ -298,7 +298,7 @@ BEGIN_C_DECLS
/**
* Object declarayion for pmix_mca_base_var_t
*/
PMIX_CLASS_DECLARATION(pmix_mca_base_var_t);
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_mca_base_var_t);
/**
* Initialize the MCA variable system.
@ -309,7 +309,7 @@ PMIX_CLASS_DECLARATION(pmix_mca_base_var_t);
* invoked internally (by pmix_mca_base_open()) and is only documented
* here for completeness.
*/
int pmix_mca_base_var_init(void);
PMIX_EXPORT int pmix_mca_base_var_init(void);
/**
* Register an MCA variable
@ -489,7 +489,7 @@ PMIX_EXPORT int pmix_mca_base_var_register_synonym (int synonym_for, const char
*
* If an enumerator is associated with this variable it will be dereferenced.
*/
int pmix_mca_base_var_deregister(int vari);
PMIX_EXPORT int pmix_mca_base_var_deregister(int vari);
/**
@ -512,9 +512,9 @@ int pmix_mca_base_var_deregister(int vari);
* Note: The value can be changed by the registering code without using
* the pmix_mca_base_var_* interface so the source may be incorrect.
*/
int pmix_mca_base_var_get_value (int vari, void *value,
pmix_mca_base_var_source_t *source,
const char **source_file);
PMIX_EXPORT int pmix_mca_base_var_get_value (int vari, void *value,
pmix_mca_base_var_source_t *source,
const char **source_file);
/**
* Sets an "override" value for an integer MCA variable.
@ -537,9 +537,9 @@ int pmix_mca_base_var_get_value (int vari, void *value,
* a synonym the variable the synonym represents) if the value is
* settable.
*/
int pmix_mca_base_var_set_value (int vari, const void *value, size_t size,
pmix_mca_base_var_source_t source,
const char *source_file);
PMIX_EXPORT int pmix_mca_base_var_set_value (int vari, const void *value, size_t size,
pmix_mca_base_var_source_t source,
const char *source_file);
/**
* Get the string name corresponding to the MCA variable
@ -554,8 +554,8 @@ int pmix_mca_base_var_set_value (int vari, const void *value, size_t size,
* The string that is returned is owned by the caller; if
* appropriate, it must be eventually freed by the caller.
*/
int pmix_mca_base_var_env_name(const char *param_name,
char **env_name);
PMIX_EXPORT int pmix_mca_base_var_env_name(const char *param_name,
char **env_name);
/**
* Find the index for an MCA variable based on its names.
@ -574,10 +574,10 @@ int pmix_mca_base_var_env_name(const char *param_name,
* of any registered variable. The returned index can be used with
* pmix_mca_base_var_get() and pmix_mca_base_var_get_value().
*/
int pmix_mca_base_var_find (const char *project_name,
const char *type_name,
const char *component_name,
const char *param_name);
PMIX_EXPORT int pmix_mca_base_var_find (const char *project_name,
const char *type_name,
const char *component_name,
const char *param_name);
/**
* Find the index for a variable based on its full name
@ -587,7 +587,7 @@ int pmix_mca_base_var_find (const char *project_name,
*
* See pmix_mca_base_var_find().
*/
int pmix_mca_base_var_find_by_name (const char *full_name, int *vari);
PMIX_EXPORT int pmix_mca_base_var_find_by_name (const char *full_name, int *vari);
/**
* Check that two MCA variables were not both set to non-default
@ -617,13 +617,13 @@ int pmix_mca_base_var_find_by_name (const char *full_name, int *vari);
* are not MCA_BASE_VAR_SOURCE_DEFAULT.
* @returns PMIX_SUCCESS otherwise.
*/
int pmix_mca_base_var_check_exclusive (const char *project,
const char *type_a,
const char *component_a,
const char *param_a,
const char *type_b,
const char *component_b,
const char *param_b);
PMIX_EXPORT int pmix_mca_base_var_check_exclusive (const char *project,
const char *type_a,
const char *component_a,
const char *param_a,
const char *type_b,
const char *component_b,
const char *param_b);
/**
* Set or unset a flag on a variable.
@ -636,8 +636,8 @@ int pmix_mca_base_var_check_exclusive (const char *project,
* @returns PMIX_ERR_BAD_PARAM If the variable is not registered.
* @returns PMIX_ERROR Otherwise
*/
int pmix_mca_base_var_set_flag(int vari, pmix_mca_base_var_flag_t flag,
bool set);
PMIX_EXPORT int pmix_mca_base_var_set_flag(int vari, pmix_mca_base_var_flag_t flag,
bool set);
/**
* Obtain basic info on a single variable (name, help message, etc)
@ -651,7 +651,7 @@ int pmix_mca_base_var_set_flag(int vari, pmix_mca_base_var_flag_t flag,
* The returned pointer belongs to the MCA variable system. Do not
* modify/free/retain the pointer.
*/
int pmix_mca_base_var_get (int vari, const pmix_mca_base_var_t **var);
PMIX_EXPORT int pmix_mca_base_var_get (int vari, const pmix_mca_base_var_t **var);
/**
* Obtain the number of variables that have been registered.
@ -664,7 +664,7 @@ int pmix_mca_base_var_get (int vari, const pmix_mca_base_var_t **var);
* returned is equal to the number of calls to pmix_mca_base_var_register with
* unique names. ie. two calls with the same name will not affect the count.
*/
int pmix_mca_base_var_get_count (void);
PMIX_EXPORT int pmix_mca_base_var_get_count (void);
/**
* Obtain a list of enironment variables describing the all
@ -683,8 +683,8 @@ int pmix_mca_base_var_get_count (void);
* its output is in terms of an argv-style array of key=value
* strings, suitable for using in an environment.
*/
int pmix_mca_base_var_build_env(char ***env, int *num_env,
bool internal);
PMIX_EXPORT int pmix_mca_base_var_build_env(char ***env, int *num_env,
bool internal);
/**
* Shut down the MCA variable system (normally only invoked by the
@ -700,7 +700,7 @@ int pmix_mca_base_var_build_env(char ***env, int *num_env,
* when the process is shutting down (e.g., during MPI_FINALIZE). It
* is only documented here for completeness.
*/
int pmix_mca_base_var_finalize(void);
PMIX_EXPORT int pmix_mca_base_var_finalize(void);
typedef enum {
/* Dump human-readable strings */
@ -721,19 +721,19 @@ typedef enum {
* This function returns an array of strings describing the variable. All strings
* and the array must be freed by the caller.
*/
int pmix_mca_base_var_dump(int vari, char ***out, pmix_mca_base_var_dump_type_t output_type);
PMIX_EXPORT int pmix_mca_base_var_dump(int vari, char ***out, pmix_mca_base_var_dump_type_t output_type);
#define MCA_COMPILETIME_VER "print_compiletime_version"
#define MCA_RUNTIME_VER "print_runtime_version"
int pmix_mca_base_var_cache_files (bool rel_path_search);
PMIX_EXPORT int pmix_mca_base_var_cache_files (bool rel_path_search);
/*
* Parse a provided list of envars and add their local value, or
* their assigned value, to the provided argv
*/
int pmix_mca_base_var_process_env_list(char ***argv);
int pmix_mca_base_var_process_env_list_from_file(char ***argv);
PMIX_EXPORT int pmix_mca_base_var_process_env_list(char ***argv);
PMIX_EXPORT int pmix_mca_base_var_process_env_list_from_file(char ***argv);
END_C_DECLS

Просмотреть файл

@ -13,7 +13,7 @@
* Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2016 Intel, Inc. All rights reserved
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -58,7 +58,7 @@ typedef struct pmix_mca_base_var_group_t pmix_mca_base_var_group_t;
/**
* Object declaration for pmix_mca_base_var_group_t
*/
PMIX_CLASS_DECLARATION(pmix_mca_base_var_group_t);
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_mca_base_var_group_t);
/**
* Register an MCA variable group
@ -74,10 +74,10 @@ PMIX_CLASS_DECLARATION(pmix_mca_base_var_group_t);
* Create an MCA variable group. If the group already exists
* this call is equivalent to pmix_mca_base_ver_find_group().
*/
int pmix_mca_base_var_group_register(const char *project_name,
const char *framework_name,
const char *component_name,
const char *description);
PMIX_EXPORT int pmix_mca_base_var_group_register(const char *project_name,
const char *framework_name,
const char *component_name,
const char *description);
/**
* Register an MCA variable group for a component
@ -89,8 +89,8 @@ int pmix_mca_base_var_group_register(const char *project_name,
* @retval index Unique group index
* @return pmix error code on Error
*/
int pmix_mca_base_var_group_component_register (const pmix_mca_base_component_t *component,
const char *description);
PMIX_EXPORT int pmix_mca_base_var_group_component_register (const pmix_mca_base_component_t *component,
const char *description);
/**
* Deregister an MCA param group
@ -100,7 +100,7 @@ int pmix_mca_base_var_group_component_register (const pmix_mca_base_component_t
*
* This call deregisters all associated variables and subgroups.
*/
int pmix_mca_base_var_group_deregister (int group_index);
PMIX_EXPORT int pmix_mca_base_var_group_deregister (int group_index);
/**
* Find an MCA group
@ -112,9 +112,9 @@ int pmix_mca_base_var_group_deregister (int group_index);
* @returns PMIX_SUCCESS if found
* @returns PMIX_ERR_NOT_FOUND if not found
*/
int pmix_mca_base_var_group_find (const char *project_name,
const char *framework_name,
const char *component_name);
PMIX_EXPORT int pmix_mca_base_var_group_find (const char *project_name,
const char *framework_name,
const char *component_name);
/**
* Find an MCA group by its full name
@ -125,7 +125,7 @@ int pmix_mca_base_var_group_find (const char *project_name,
* @returns PMIX_SUCCESS if found
* @returns PMIX_ERR_NOT_FOUND if not found
*/
int pmix_mca_base_var_group_find_by_name (const char *full_name, int *index);
PMIX_EXPORT int pmix_mca_base_var_group_find_by_name (const char *full_name, int *index);
/**
* Get the group at a specified index
@ -139,8 +139,8 @@ int pmix_mca_base_var_group_find_by_name (const char *full_name, int *index);
* The returned pointer belongs to the MCA variable system. Do not modify/release/retain
* the pointer.
*/
int pmix_mca_base_var_group_get (const int group_index,
const pmix_mca_base_var_group_t **group);
PMIX_EXPORT int pmix_mca_base_var_group_get (const int group_index,
const pmix_mca_base_var_group_t **group);
/**
* Set/unset a flags for all variables in a group.
@ -151,15 +151,15 @@ int pmix_mca_base_var_group_get (const int group_index,
*
* Set a flag for every variable in a group. See pmix_mca_base_var_set_flag() for more info.
*/
int pmix_mca_base_var_group_set_var_flag (const int group_index, int flags,
bool set);
PMIX_EXPORT int pmix_mca_base_var_group_set_var_flag (const int group_index, int flags,
bool set);
/**
* Get the number of registered MCA groups
*
* @retval count Number of registered MCA groups
*/
int pmix_mca_base_var_group_get_count (void);
PMIX_EXPORT int pmix_mca_base_var_group_get_count (void);
/**
* Get a relative timestamp for the MCA group system
@ -168,6 +168,6 @@ int pmix_mca_base_var_group_get_count (void);
*
* This value will change if groups or variables are either added or removed.
*/
int pmix_mca_base_var_group_get_stamp (void);
PMIX_EXPORT int pmix_mca_base_var_group_get_stamp (void);
#endif /* PMIX_MCA_BASE_VAR_GROUP_H */

Просмотреть файл

@ -1151,7 +1151,6 @@ static pmix_status_t hash_store_modex(struct pmix_nspace_t *nspace,
{
pmix_nspace_t *ns = (pmix_nspace_t*)nspace;
pmix_hash_trkr_t *trk, *t;
pmix_server_caddy_t *scd;
pmix_status_t rc = PMIX_SUCCESS;
int32_t cnt;
pmix_buffer_t pbkt;

Просмотреть файл

@ -3,7 +3,7 @@
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2016 Intel, Inc. All rights reserved
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -26,7 +26,7 @@ BEGIN_C_DECLS
/**
* Globals
*/
extern pmix_mca_base_framework_t pmix_pdl_base_framework;
PMIX_EXPORT extern pmix_mca_base_framework_t pmix_pdl_base_framework;
extern pmix_pdl_base_component_t
*pmix_pdl_base_selected_component;
extern pmix_pdl_base_module_t *pmix_pdl;

Просмотреть файл

@ -3,7 +3,7 @@
* reserved.
* Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2016 Intel, Inc. All rights reserved
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -27,7 +27,7 @@ BEGIN_C_DECLS
/**
* Framework structure declaration
*/
extern pmix_mca_base_framework_t pmix_pinstalldirs_base_framework;
PMIX_EXPORT extern pmix_mca_base_framework_t pmix_pinstalldirs_base_framework;
/* Just like pmix_pinstall_dirs_expand() (see pinstalldirs.h), but will
also insert the value of the environment variable $PMIX_DESTDIR, if

Просмотреть файл

@ -54,7 +54,7 @@ struct pmix_pinstall_dirs_t {
typedef struct pmix_pinstall_dirs_t pmix_pinstall_dirs_t;
/* Install directories. Only available after pmix_init() */
extern pmix_pinstall_dirs_t pmix_pinstall_dirs;
PMIX_EXPORT extern pmix_pinstall_dirs_t pmix_pinstall_dirs;
/**
* Expand out path variables (such as ${prefix}) in the input string

Просмотреть файл

@ -0,0 +1,37 @@
# -*- makefile -*-
#
# Copyright (c) 2004-2010 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-2008 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
# reserved.
# Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# This makefile.include does not stand on its own - it is included from
# src/Makefile.am
SUBDIRS += \
tools/pevent \
tools/pinfo \
tools/plookup \
tools/pps
DIST_SUBDIRS += \
tools/pevent \
tools/pinfo \
tools/plookup \
tools/pps

Просмотреть файл

@ -0,0 +1,32 @@
#
# 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) 2008-2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
if PMIX_INSTALL_BINARIES
bin_PROGRAMS = pevent
dist_pmixdata_DATA = help-pevent.txt
endif # PMIX_INSTALL_BINARIES
pevent_SOURCES = pevent.c
pevent_LDADD = \
$(top_builddir)/src/libpmix.la

Просмотреть файл

@ -0,0 +1,47 @@
# -*- text -*-
#
# 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 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# This is the US/English help file for Open MPI PS tool
#
[usage]
ompi-ps [OPTIONS]
Open MPI Job and Process Status Tool
%s
#
[vpid-usage]
Error: You specified a vpid (%d) without also specifying a jobid.
Use the '-j' option to specify a jobid.
#
[need-vpid]
Error: You specified a jobid (%d) without also specifying a vpid.
Use the '-p' option to specify a vpid.
#
[invalid-vpid]
Error: The specified vpid (%d) is not valid for job %d.
#
[stale-hnp]
An attempt was made to obtain ps information from at least
one non-responsive HNP:
HNP name: %s
You may want to cleanup stale session directories in your temporary
directory (e.g., $TMPDIR).

Просмотреть файл

@ -0,0 +1,270 @@
/*
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 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-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Mellanox Technologies, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <pthread.h>
#include <pmix_tool.h>
#include "src/mca/base/base.h"
#include "src/mca/pinstalldirs/base/base.h"
#include "src/threads/threads.h"
#include "src/util/cmd_line.h"
#include "src/util/keyval_parse.h"
#include "src/util/show_help.h"
#include "src/runtime/pmix_rte.h"
typedef struct {
pmix_lock_t lock;
pmix_status_t status;
} mylock_t;
static pmix_proc_t myproc;
/* this is the event notification function we pass down below
* when registering for general events - i.e.,, the default
* handler. We don't technically need to register one, but it
* is usually good practice to catch any events that occur */
static void notification_fn(size_t evhdlr_registration_id,
pmix_status_t status,
const pmix_proc_t *source,
pmix_info_t info[], size_t ninfo,
pmix_info_t results[], size_t nresults,
pmix_event_notification_cbfunc_fn_t cbfunc,
void *cbdata)
{
/* this example doesn't do anything with default events */
if (NULL != cbfunc) {
cbfunc(PMIX_EVENT_ACTION_COMPLETE, NULL, 0, NULL, NULL, cbdata);
}
}
/* event handler registration is done asynchronously because it
* may involve the PMIx server registering with the host RM for
* external events. So we provide a callback function that returns
* the status of the request (success or an error), plus a numerical index
* to the registered event. The index is used later on to deregister
* an event handler - if we don't explicitly deregister it, then the
* PMIx server will do so when it see us exit */
static void evhandler_reg_callbk(pmix_status_t status,
size_t evhandler_ref,
void *cbdata)
{
mylock_t *lock = (mylock_t*)cbdata;
if (PMIX_SUCCESS != status) {
fprintf(stderr, "Client %s:%d EVENT HANDLER REGISTRATION FAILED WITH STATUS %d, ref=%lu\n",
myproc.nspace, myproc.rank, status, (unsigned long)evhandler_ref);
}
lock->status = status;
PMIX_WAKEUP_THREAD(&lock->lock);
}
/*****************************************
* Global Vars for Command line Arguments
*****************************************/
typedef struct {
bool help;
bool verbose;
pid_t pid;
int code;
int range;
} pmix_pevent_globals_t;
pmix_pevent_globals_t pmix_pevent_globals = {0};
pmix_cmd_line_init_t cmd_line_opts[] = {
{ NULL,
'h', NULL, "help",
0,
&pmix_pevent_globals.help, PMIX_CMD_LINE_TYPE_BOOL,
"This help message" },
{ NULL,
'v', NULL, "verbose",
0,
&pmix_pevent_globals.verbose, PMIX_CMD_LINE_TYPE_BOOL,
"Be Verbose" },
{ NULL,
'p', NULL, "pid",
1,
&pmix_pevent_globals.pid, PMIX_CMD_LINE_TYPE_INT,
"Specify starter pid" },
{ NULL,
'e', NULL, "event",
0,
&pmix_pevent_globals.code, PMIX_CMD_LINE_TYPE_INT,
"Status code of event to be sent" },
{ NULL,
'r', NULL, "range",
0,
&pmix_pevent_globals.range, PMIX_CMD_LINE_TYPE_INT,
"Range of event to be sent" },
/* End of list */
{ NULL,
'\0', NULL, NULL,
0,
NULL, PMIX_CMD_LINE_TYPE_NULL,
NULL }
};
static void opcbfunc(pmix_status_t status, void *cbdata)
{
mylock_t *lock = (mylock_t*)cbdata;
lock->status = status;
PMIX_WAKEUP_THREAD(&lock->lock);
}
int main(int argc, char **argv)
{
pmix_status_t rc;
pmix_info_t *info;
mylock_t mylock;
pmix_status_t status;
pmix_data_range_t range;
pmix_cmd_line_t cmd_line;
/* protect against problems if someone passes us thru a pipe
* and then abnormally terminates the pipe early */
signal(SIGPIPE, SIG_IGN);
/* initialize the output system */
if (!pmix_output_init()) {
return PMIX_ERROR;
}
/* initialize install dirs code */
if (PMIX_SUCCESS != (rc = pmix_mca_base_framework_open(&pmix_pinstalldirs_base_framework, 0))) {
fprintf(stderr, "pmix_pinstalldirs_base_open() failed -- process will likely abort (%s:%d, returned %d instead of PMIX_SUCCESS)\n",
__FILE__, __LINE__, rc);
return rc;
}
/* initialize the help system */
pmix_show_help_init();
/* keyval lex-based parser */
if (PMIX_SUCCESS != (rc = pmix_util_keyval_parse_init())) {
fprintf(stderr, "pmix_util_keyval_parse_init failed with %d\n", rc);
return PMIX_ERROR;
}
/* Setup the parameter system */
if (PMIX_SUCCESS != (rc = pmix_mca_base_var_init())) {
fprintf(stderr, "pmix_mca_base_var_init failed with %d\n", rc);
return PMIX_ERROR;
}
/* register params for pmix */
if (PMIX_SUCCESS != (rc = pmix_register_params())) {
fprintf(stderr, "pmix_register_params failed with %d\n", rc);
return PMIX_ERROR;
}
/* Parse the command line options */
pmix_cmd_line_create(&cmd_line, cmd_line_opts);
pmix_mca_base_open();
pmix_mca_base_cmd_line_setup(&cmd_line);
rc = pmix_cmd_line_parse(&cmd_line, false, false, argc, argv);
if (PMIX_SUCCESS != rc) {
if (PMIX_ERR_SILENT != rc) {
fprintf(stderr, "%s: command line error (%s)\n", argv[0],
PMIx_Error_string(rc));
}
return rc;
}
if (pmix_pevent_globals.help) {
char *str, *args = NULL;
args = pmix_cmd_line_get_usage_msg(&cmd_line);
str = pmix_show_help_string("help-pevent.txt", "usage", true,
args);
if (NULL != str) {
printf("%s", str);
free(str);
}
free(args);
/* If we show the help message, that should be all we do */
exit(0);
}
status = (pmix_status_t)pmix_pevent_globals.code;
range = (pmix_data_range_t)pmix_pevent_globals.range;
/* if we were given the pid of a starter, then direct that
* we connect to it */
/* otherwise, use the system connection first, if available */
PMIX_INFO_CREATE(info, 1);
PMIX_INFO_LOAD(&info[0], PMIX_CONNECT_SYSTEM_FIRST, NULL, PMIX_BOOL);
/* init as a tool */
if (PMIX_SUCCESS != (rc = PMIx_tool_init(&myproc, info, 1))) {
fprintf(stderr, "PMIx_tool_init failed: %d\n", rc);
exit(rc);
}
PMIX_INFO_FREE(info, 1);
/* register a default event handler */
PMIX_CONSTRUCT_LOCK(&mylock.lock);
PMIx_Register_event_handler(NULL, 0, NULL, 0,
notification_fn, evhandler_reg_callbk, (void*)&mylock);
PMIX_WAIT_THREAD(&mylock.lock);
if (PMIX_SUCCESS != mylock.status) {
fprintf(stderr, "PMIx_Register_event_handler returned bad status: %d\n", rc);
PMIX_DESTRUCT_LOCK(&mylock.lock);
goto done;
}
PMIX_DESTRUCT_LOCK(&mylock.lock);
/* generate the specified event */
PMIX_CONSTRUCT_LOCK(&mylock.lock);
rc = PMIx_Notify_event(status, &myproc, range, NULL, 0, opcbfunc, (void*)&mylock);
if (PMIX_SUCCESS != rc) {
fprintf(stderr, "PMIx_Notify_event failed: %d\n", rc);
goto done;
}
PMIX_WAIT_THREAD(&mylock.lock);
if (PMIX_SUCCESS != mylock.status) {
fprintf(stderr, "PMIx_Notify_event returned bad status: %d\n", rc);
}
PMIX_DESTRUCT_LOCK(&mylock.lock);
done:
PMIx_tool_finalize();
return(rc);
}

Просмотреть файл

@ -0,0 +1,54 @@
#
# 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) 2008-2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
AM_CFLAGS = \
-DPMIX_CONFIGURE_USER="\"@PMIX_CONFIGURE_USER@\"" \
-DPMIX_CONFIGURE_HOST="\"@PMIX_CONFIGURE_HOST@\"" \
-DPMIX_CONFIGURE_DATE="\"@PMIX_CONFIGURE_DATE@\"" \
-DPMIX_BUILD_USER="\"$$USER\"" \
-DPMIX_BUILD_HOST="\"`(hostname || uname -n) 2> /dev/null | sed 1q`\"" \
-DPMIX_BUILD_DATE="\"`date`\"" \
-DPMIX_BUILD_CFLAGS="\"@CFLAGS@\"" \
-DPMIX_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \
-DPMIX_BUILD_LDFLAGS="\"@LDFLAGS@\"" \
-DPMIX_BUILD_LIBS="\"@LIBS@\"" \
-DPMIX_CC_ABSOLUTE="\"@PMIX_CC_ABSOLUTE@\"" \
-DPMIX_CONFIGURE_CLI="\"@PMIX_CONFIGURE_CLI@\"" \
-DPMIX_GREEK_VERSION="\"@PMIX_GREEK_VERSION@\"" \
-DPMIX_REPO_REV="\"@PMIX_REPO_REV@\"" \
-DPMIX_RELEASE_DATE="\"@PMIX_RELEASE_DATE@\""
if PMIX_INSTALL_BINARIES
bin_PROGRAMS = pinfo
dist_pmixdata_DATA = help-pinfo.txt
endif # PMIX_INSTALL_BINARIES
pinfo_SOURCES = \
pinfo.h \
support.h \
pinfo.c \
support.c
pinfo_LDADD = \
$(top_builddir)/src/libpmix.la

Просмотреть файл

@ -0,0 +1,59 @@
# -*- text -*-
#
# 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) 2010-2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# This is the US/English help file for ORTE orte-info error
# messages.
#
[usage]
The orte-info command can be used to provide detailed information on
your ORTE installation. Syntax:
%s
#
[lib-call-fail]
A library call unexpectedly failed. This is a terminal error; please
show this message to an ORTE wizard:
Library call: %s
Source file: %s
Source line number: %d
Aborting...
#
[developer warning: field too long]
**************************************************************************
*** DEVELOPER WARNING: A field in orte-info output is too long and
*** will appear poorly in the prettyprint output.
***
*** Value: "%s"
*** Max length: %d
**************************************************************************
#
[not-found]
The specified framework could not be found:
Framework: %s
This could be due to a misspelling of the framework name, or because support
for that framework was not configured into this version of orte. Please see
orte-info --config
for a full report of how orte was configured.

Просмотреть файл

@ -0,0 +1,208 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 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) 2007-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010-2016 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2014-2017 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$
*/
#include "pmix_config.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <errno.h>
#include <signal.h>
#include "src/mca/pinstalldirs/base/base.h"
#include "src/class/pmix_object.h"
#include "src/class/pmix_pointer_array.h"
#include "src/util/argv.h"
#include "src/util/cmd_line.h"
#include "src/util/error.h"
#include "src/util/error.h"
#include "src/util/keyval_parse.h"
#include "src/util/output.h"
#include "src/util/show_help.h"
#include "src/mca/base/base.h"
#include "src/runtime/pmix_rte.h"
#include "pinfo.h"
#include "support.h"
/*
* Public variables
*/
pmix_cmd_line_t *pmix_info_cmd_line = NULL;
const char *pmix_info_type_base = "base";
int main(int argc, char *argv[])
{
int ret = 0;
bool acted = false;
bool want_all = false;
int i;
pmix_pointer_array_t mca_types;
pmix_pointer_array_t component_map;
pmix_info_component_map_t *map;
/* protect against problems if someone passes us thru a pipe
* and then abnormally terminates the pipe early */
signal(SIGPIPE, SIG_IGN);
/* initialize the output system */
if (!pmix_output_init()) {
return PMIX_ERROR;
}
/* initialize install dirs code */
if (PMIX_SUCCESS != (ret = pmix_mca_base_framework_open(&pmix_pinstalldirs_base_framework, 0))) {
fprintf(stderr, "pmix_pinstalldirs_base_open() failed -- process will likely abort (%s:%d, returned %d instead of PMIX_SUCCESS)\n",
__FILE__, __LINE__, ret);
return ret;
}
/* initialize the help system */
pmix_show_help_init();
/* keyval lex-based parser */
if (PMIX_SUCCESS != (ret = pmix_util_keyval_parse_init())) {
fprintf(stderr, "pmix_util_keyval_parse_init failed with %d\n", ret);
return PMIX_ERROR;
}
/* Setup the parameter system */
if (PMIX_SUCCESS != (ret = pmix_mca_base_var_init())) {
fprintf(stderr, "pmix_mca_base_var_init failed with %d\n", ret);
return PMIX_ERROR;
}
/* register params for pmix */
if (PMIX_SUCCESS != (ret = pmix_register_params())) {
fprintf(stderr, "pmix_register_params failed with %d\n", ret);
return PMIX_ERROR;
}
pmix_info_cmd_line = PMIX_NEW(pmix_cmd_line_t);
if (NULL == pmix_info_cmd_line) {
ret = errno;
pmix_show_help("help-pmix-info.txt", "lib-call-fail", true,
"pmix_cmd_line_create", __FILE__, __LINE__, NULL);
exit(ret);
}
if (PMIX_SUCCESS != (ret = pmix_info_init(argc, argv, pmix_info_cmd_line))) {
return ret;
}
/* setup the mca_types array */
PMIX_CONSTRUCT(&mca_types, pmix_pointer_array_t);
pmix_pointer_array_init(&mca_types, 256, INT_MAX, 128);
pmix_info_register_types(&mca_types);
/* init the component map */
PMIX_CONSTRUCT(&component_map, pmix_pointer_array_t);
pmix_pointer_array_init(&component_map, 64, INT_MAX, 32);
/* Register PMIx's params */
if (PMIX_SUCCESS != (ret = pmix_info_register_framework_params(&component_map))) {
if (PMIX_ERR_BAD_PARAM == ret) {
/* output what we got */
pmix_info_do_params(true, pmix_cmd_line_is_taken(pmix_info_cmd_line, "internal"),
&mca_types, &component_map, NULL);
}
exit(1);
}
/* Execute the desired action(s) */
want_all = pmix_cmd_line_is_taken(pmix_info_cmd_line, "all");
if (want_all) {
pmix_info_out("Package", "package", PMIX_PACKAGE_STRING);
pmix_info_show_pmix_version(pmix_info_ver_full);
}
if (want_all || pmix_cmd_line_is_taken(pmix_info_cmd_line, "path")) {
pmix_info_do_path(want_all, pmix_info_cmd_line);
acted = true;
}
if (want_all || pmix_cmd_line_is_taken(pmix_info_cmd_line, "arch")) {
pmix_info_do_arch();
acted = true;
}
if (want_all || pmix_cmd_line_is_taken(pmix_info_cmd_line, "hostname")) {
pmix_info_do_hostname();
acted = true;
}
if (want_all || pmix_cmd_line_is_taken(pmix_info_cmd_line, "config")) {
pmix_info_do_config(true);
acted = true;
}
if (want_all || pmix_cmd_line_is_taken(pmix_info_cmd_line, "param") ||
pmix_cmd_line_is_taken(pmix_info_cmd_line, "params")) {
pmix_info_do_params(want_all, pmix_cmd_line_is_taken(pmix_info_cmd_line, "internal"),
&mca_types, &component_map, pmix_info_cmd_line);
acted = true;
}
if (pmix_cmd_line_is_taken(pmix_info_cmd_line, "type")) {
pmix_info_do_type(pmix_info_cmd_line);
acted = true;
}
/* If no command line args are specified, show default set */
if (!acted) {
pmix_info_out("Package", "package", PMIX_PACKAGE_STRING);
pmix_info_show_pmix_version(pmix_info_ver_full);
pmix_info_show_path(pmix_info_path_prefix, pmix_pinstall_dirs.prefix);
pmix_info_do_arch();
pmix_info_do_hostname();
pmix_info_do_config(false);
pmix_info_show_component_version(&mca_types, &component_map, pmix_info_type_all,
pmix_info_component_all, pmix_info_ver_full,
pmix_info_ver_all);
}
/* All done */
pmix_info_close_components();
PMIX_RELEASE(pmix_info_cmd_line);
PMIX_DESTRUCT(&mca_types);
for (i=0; i < component_map.size; i++) {
if (NULL != (map = (pmix_info_component_map_t*)pmix_pointer_array_get_item(&component_map, i))) {
PMIX_RELEASE(map);
}
}
PMIX_DESTRUCT(&component_map);
pmix_info_finalize();
return 0;
}

Просмотреть файл

@ -0,0 +1,76 @@
/*
* Copyright (c) 2004-2009 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) 2007-2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef PMIX_INFO_TOOL_H
#define PMIX_INFO_TOOL_H
#include "pmix_config.h"
#include "src/class/pmix_list.h"
#include "src/class/pmix_pointer_array.h"
#include "src/util/cmd_line.h"
#include "src/mca/mca.h"
BEGIN_C_DECLS
/*
* Globals
*/
extern bool pmix_info_pretty;
extern pmix_cmd_line_t *pmix_info_cmd_line;
extern const char *pmix_info_type_base;
extern pmix_pointer_array_t mca_types;
/*
* Parameter/configuration-related functions
*/
extern const char *pmix_info_component_all;
extern const char *pmix_info_param_all;
extern const char *pmix_info_path_bindir;
extern const char *pmix_info_path_libdir;
extern const char *pmix_info_path_incdir;
extern const char *pmix_info_path_mandir;
extern const char *pmix_info_path_pkglibdir;
extern const char *pmix_info_path_sysconfdir;
extern const char *pmix_info_path_exec_prefix;
extern const char *pmix_info_path_sbindir;
extern const char *pmix_info_path_libexecdir;
extern const char *pmix_info_path_datarootdir;
extern const char *pmix_info_path_datadir;
extern const char *pmix_info_path_sharedstatedir;
extern const char *pmix_info_path_localstatedir;
extern const char *pmix_info_path_infodir;
extern const char *pmix_info_path_pkgdatadir;
extern const char *pmix_info_path_pkgincludedir;
void pmix_info_do_config(bool want_all);
extern pmix_pointer_array_t pmix_component_map;
END_C_DECLS
#endif /* PMIX_INFO_H */

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,120 @@
/*
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* Copyright (c) 2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/** @file **/
#ifndef PMIX_INFO_REGISTER_H
#define PMIX_INFO_REGISTER_H
#include "pmix_config.h"
#include "src/class/pmix_list.h"
#include "src/class/pmix_pointer_array.h"
#include "src/util/cmd_line.h"
#include "src/mca/base/base.h"
BEGIN_C_DECLS
PMIX_EXPORT extern const char *pmix_info_path_prefix;
PMIX_EXPORT extern const char *pmix_info_type_all;
PMIX_EXPORT extern const char *pmix_info_type_pmix;
PMIX_EXPORT extern const char *pmix_info_component_all;
extern const char *pmix_info_param_all;
PMIX_EXPORT extern const char *pmix_info_ver_full;
extern const char *pmix_info_ver_major;
extern const char *pmix_info_ver_minor;
extern const char *pmix_info_ver_release;
extern const char *pmix_info_ver_greek;
extern const char *pmix_info_ver_repo;
PMIX_EXPORT extern const char *pmix_info_ver_all;
extern const char *pmix_info_ver_mca;
extern const char *pmix_info_ver_type;
extern const char *pmix_info_ver_component;
/*
* Component-related functions
*/
typedef struct {
pmix_list_item_t super;
char *type;
pmix_list_t *components;
pmix_list_t *failed_components;
} pmix_info_component_map_t;
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_info_component_map_t);
PMIX_EXPORT int pmix_info_init(int argc, char **argv,
pmix_cmd_line_t *pmix_info_cmd_line);
PMIX_EXPORT void pmix_info_finalize(void);
PMIX_EXPORT void pmix_info_register_types(pmix_pointer_array_t *mca_types);
PMIX_EXPORT int pmix_info_register_framework_params(pmix_pointer_array_t *component_map);
PMIX_EXPORT void pmix_info_close_components(void);
PMIX_EXPORT void pmix_info_err_params(pmix_pointer_array_t *component_map);
PMIX_EXPORT void pmix_info_do_params(bool want_all_in, bool want_internal,
pmix_pointer_array_t *mca_type,
pmix_pointer_array_t *component_map,
pmix_cmd_line_t *pmix_info_cmd_line);
PMIX_EXPORT void pmix_info_show_path(const char *type, const char *value);
PMIX_EXPORT void pmix_info_do_path(bool want_all, pmix_cmd_line_t *cmd_line);
PMIX_EXPORT void pmix_info_show_mca_params(const char *type,
const char *component,
pmix_mca_base_var_info_lvl_t max_level,
bool want_internal);
PMIX_EXPORT void pmix_info_show_mca_version(const pmix_mca_base_component_t *component,
const char *scope, const char *ver_type);
PMIX_EXPORT void pmix_info_show_component_version(pmix_pointer_array_t *mca_types,
pmix_pointer_array_t *component_map,
const char *type_name,
const char *component_name,
const char *scope, const char *ver_type);
PMIX_EXPORT char *pmix_info_make_version_str(const char *scope,
int major, int minor, int release,
const char *greek,
const char *repo);
PMIX_EXPORT void pmix_info_show_pmix_version(const char *scope);
PMIX_EXPORT void pmix_info_do_arch(void);
PMIX_EXPORT void pmix_info_do_hostname(void);
PMIX_EXPORT void pmix_info_do_type(pmix_cmd_line_t *pmix_info_cmd_line);
PMIX_EXPORT void pmix_info_out(const char *pretty_message, const char *plain_message, const char *value);
PMIX_EXPORT void pmix_info_out_int(const char *pretty_message,
const char *plain_message,
int value);
PMIX_EXPORT int pmix_info_register_project_frameworks (const char *project_name,
pmix_mca_base_framework_t **frameworks,
pmix_pointer_array_t *component_map);
END_C_DECLS
#endif

Просмотреть файл

@ -0,0 +1,32 @@
#
# 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) 2008-2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
if PMIX_INSTALL_BINARIES
bin_PROGRAMS = plookup
dist_pmixdata_DATA = help-plookup.txt
endif # PMIX_INSTALL_BINARIES
plookup_SOURCES = plookup.c
plookup_LDADD = \
$(top_builddir)/src/libpmix.la

Просмотреть файл

@ -0,0 +1,47 @@
# -*- text -*-
#
# 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 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# This is the US/English help file for Open MPI PS tool
#
[usage]
ompi-ps [OPTIONS]
Open MPI Job and Process Status Tool
%s
#
[vpid-usage]
Error: You specified a vpid (%d) without also specifying a jobid.
Use the '-j' option to specify a jobid.
#
[need-vpid]
Error: You specified a jobid (%d) without also specifying a vpid.
Use the '-p' option to specify a vpid.
#
[invalid-vpid]
Error: The specified vpid (%d) is not valid for job %d.
#
[stale-hnp]
An attempt was made to obtain ps information from at least
one non-responsive HNP:
HNP name: %s
You may want to cleanup stale session directories in your temporary
directory (e.g., $TMPDIR).

Просмотреть файл

@ -0,0 +1,291 @@
/*
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 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-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Mellanox Technologies, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <pthread.h>
#include <pmix_tool.h>
#include "src/mca/base/base.h"
#include "src/mca/pinstalldirs/base/base.h"
#include "src/threads/threads.h"
#include "src/util/cmd_line.h"
#include "src/util/keyval_parse.h"
#include "src/util/show_help.h"
#include "src/runtime/pmix_rte.h"
typedef struct {
pmix_lock_t lock;
pmix_status_t status;
} mylock_t;
static pmix_proc_t myproc;
/* this is the event notification function we pass down below
* when registering for general events - i.e.,, the default
* handler. We don't technically need to register one, but it
* is usually good practice to catch any events that occur */
static void notification_fn(size_t evhdlr_registration_id,
pmix_status_t status,
const pmix_proc_t *source,
pmix_info_t info[], size_t ninfo,
pmix_info_t results[], size_t nresults,
pmix_event_notification_cbfunc_fn_t cbfunc,
void *cbdata)
{
/* this example doesn't do anything with default events */
if (NULL != cbfunc) {
cbfunc(PMIX_EVENT_ACTION_COMPLETE, NULL, 0, NULL, NULL, cbdata);
}
}
/* event handler registration is done asynchronously because it
* may involve the PMIx server registering with the host RM for
* external events. So we provide a callback function that returns
* the status of the request (success or an error), plus a numerical index
* to the registered event. The index is used later on to deregister
* an event handler - if we don't explicitly deregister it, then the
* PMIx server will do so when it see us exit */
static void evhandler_reg_callbk(pmix_status_t status,
size_t evhandler_ref,
void *cbdata)
{
mylock_t *lock = (mylock_t*)cbdata;
if (PMIX_SUCCESS != status) {
fprintf(stderr, "Client %s:%d EVENT HANDLER REGISTRATION FAILED WITH STATUS %d, ref=%lu\n",
myproc.nspace, myproc.rank, status, (unsigned long)evhandler_ref);
}
lock->status = status;
PMIX_WAKEUP_THREAD(&lock->lock);
}
/*****************************************
* Global Vars for Command line Arguments
*****************************************/
typedef struct {
bool help;
bool verbose;
pid_t pid;
bool wait;
int timeout;
} pmix_plookup_globals_t;
pmix_plookup_globals_t pmix_plookup_globals = {0};
pmix_cmd_line_init_t cmd_line_opts[] = {
{ NULL,
'h', NULL, "help",
0,
&pmix_plookup_globals.help, PMIX_CMD_LINE_TYPE_BOOL,
"This help message" },
{ NULL,
'v', NULL, "verbose",
0,
&pmix_plookup_globals.verbose, PMIX_CMD_LINE_TYPE_BOOL,
"Be Verbose" },
{ NULL,
'p', NULL, "pid",
1,
&pmix_plookup_globals.pid, PMIX_CMD_LINE_TYPE_INT,
"Specify starter pid" },
{ NULL,
'w', NULL, "wait",
0,
&pmix_plookup_globals.wait, PMIX_CMD_LINE_TYPE_BOOL,
"Wait for data to be available" },
{ NULL,
't', NULL, "timeout",
0,
&pmix_plookup_globals.timeout, PMIX_CMD_LINE_TYPE_INT,
"Max number of seconds to wait for data to become available" },
/* End of list */
{ NULL,
'\0', NULL, NULL,
0,
NULL, PMIX_CMD_LINE_TYPE_NULL,
NULL }
};
int main(int argc, char **argv)
{
pmix_status_t rc;
pmix_info_t *info = NULL;
size_t ninfo = 0, n;
mylock_t mylock;
pmix_cmd_line_t cmd_line;
pmix_pdata_t *pdata = NULL;
size_t ndata;
int count;
char **keys = NULL;
/* protect against problems if someone passes us thru a pipe
* and then abnormally terminates the pipe early */
signal(SIGPIPE, SIG_IGN);
/* initialize the output system */
if (!pmix_output_init()) {
return PMIX_ERROR;
}
/* initialize install dirs code */
if (PMIX_SUCCESS != (rc = pmix_mca_base_framework_open(&pmix_pinstalldirs_base_framework, 0))) {
fprintf(stderr, "pmix_pinstalldirs_base_open() failed -- process will likely abort (%s:%d, returned %d instead of PMIX_SUCCESS)\n",
__FILE__, __LINE__, rc);
return rc;
}
/* initialize the help system */
pmix_show_help_init();
/* keyval lex-based parser */
if (PMIX_SUCCESS != (rc = pmix_util_keyval_parse_init())) {
fprintf(stderr, "pmix_util_keyval_parse_init failed with %d\n", rc);
return PMIX_ERROR;
}
/* Setup the parameter system */
if (PMIX_SUCCESS != (rc = pmix_mca_base_var_init())) {
fprintf(stderr, "pmix_mca_base_var_init failed with %d\n", rc);
return PMIX_ERROR;
}
/* register params for pmix */
if (PMIX_SUCCESS != (rc = pmix_register_params())) {
fprintf(stderr, "pmix_register_params failed with %d\n", rc);
return PMIX_ERROR;
}
/* Parse the command line options */
pmix_cmd_line_create(&cmd_line, cmd_line_opts);
pmix_mca_base_open();
pmix_mca_base_cmd_line_setup(&cmd_line);
rc = pmix_cmd_line_parse(&cmd_line, false, false, argc, argv);
if (PMIX_SUCCESS != rc) {
if (PMIX_ERR_SILENT != rc) {
fprintf(stderr, "%s: command line error (%s)\n", argv[0],
PMIx_Error_string(rc));
}
return rc;
}
if (pmix_plookup_globals.help) {
char *str, *args = NULL;
args = pmix_cmd_line_get_usage_msg(&cmd_line);
str = pmix_show_help_string("help-plookup.txt", "usage", true,
args);
if (NULL != str) {
printf("%s", str);
free(str);
}
free(args);
/* If we show the help message, that should be all we do */
exit(0);
}
if (pmix_plookup_globals.wait) {
++ninfo;
if (0 < pmix_plookup_globals.timeout) {
++ninfo;
}
}
/* determine how many keys were given */
pmix_cmd_line_get_tail(&cmd_line, &count, &keys);
if (0 == count) {
/* must give us at least one key */
fprintf(stderr, "%s: Must provide at least one key to lookup\n", argv[0]);
exit(1);
}
ndata = count;
/* if we were given the pid of a starter, then direct that
* we connect to it */
/* otherwise, use the system connection first, if available */
PMIX_INFO_CREATE(info, 1);
PMIX_INFO_LOAD(&info[0], PMIX_CONNECT_SYSTEM_FIRST, NULL, PMIX_BOOL);
/* init as a tool */
if (PMIX_SUCCESS != (rc = PMIx_tool_init(&myproc, info, 1))) {
fprintf(stderr, "PMIx_tool_init failed: %d\n", rc);
exit(rc);
}
PMIX_INFO_FREE(info, 1);
/* register a default event handler */
PMIX_CONSTRUCT_LOCK(&mylock.lock);
PMIx_Register_event_handler(NULL, 0, NULL, 0,
notification_fn, evhandler_reg_callbk, (void*)&mylock);
PMIX_WAIT_THREAD(&mylock.lock);
if (PMIX_SUCCESS != mylock.status) {
fprintf(stderr, "PMIx_Register_event_handler returned bad status: %d\n", rc);
PMIX_DESTRUCT_LOCK(&mylock.lock);
goto done;
}
PMIX_DESTRUCT_LOCK(&mylock.lock);
/* setup any info for the lookup */
if (0 < ninfo) {
PMIX_INFO_CREATE(info, ninfo);
PMIX_INFO_LOAD(&info[0], PMIX_WAIT, NULL, PMIX_BOOL);
if (1 < ninfo) {
PMIX_INFO_LOAD(&info[1], PMIX_TIMEOUT, &pmix_plookup_globals.timeout, PMIX_INT);
}
}
/* setup the keys */
PMIX_PDATA_CREATE(pdata, ndata);
for (n=0; n < ndata; n++) {
(void)strncpy(pdata[n].key, keys[n], PMIX_MAX_KEYLEN);
}
/* perform the lookup */
rc = PMIx_Lookup(pdata, ndata, info, ninfo);
if (PMIX_SUCCESS != rc) {
fprintf(stderr, "PMIx_Lookup failed: %d\n", rc);
goto done;
}
for (n=0; n < ndata; n++) {
fprintf(stderr, "Key: %s\n", pdata[n].key);
}
PMIX_PDATA_FREE(pdata, ndata);
done:
PMIx_tool_finalize();
return(rc);
}

Просмотреть файл

@ -0,0 +1,32 @@
#
# 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) 2008-2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
if PMIX_INSTALL_BINARIES
bin_PROGRAMS = pps
dist_pmixdata_DATA = help-pps.txt
endif # PMIX_INSTALL_BINARIES
pps_SOURCES = pps.c
pps_LDADD = \
$(top_builddir)/src/libpmix.la

Просмотреть файл

@ -0,0 +1,47 @@
# -*- text -*-
#
# 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 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# This is the US/English help file for Open MPI PS tool
#
[usage]
ompi-ps [OPTIONS]
Open MPI Job and Process Status Tool
%s
#
[vpid-usage]
Error: You specified a vpid (%d) without also specifying a jobid.
Use the '-j' option to specify a jobid.
#
[need-vpid]
Error: You specified a jobid (%d) without also specifying a vpid.
Use the '-p' option to specify a vpid.
#
[invalid-vpid]
Error: The specified vpid (%d) is not valid for job %d.
#
[stale-hnp]
An attempt was made to obtain ps information from at least
one non-responsive HNP:
HNP name: %s
You may want to cleanup stale session directories in your temporary
directory (e.g., $TMPDIR).

864
opal/mca/pmix/pmix3x/pmix/src/tools/pps/pps.c Обычный файл
Просмотреть файл

@ -0,0 +1,864 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 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-2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2007-2016 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014-2017 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$
*/
/**
* @fie
* PMIX PS command
*
*/
#include "pmix_config.h"
#include "pmix_common.h"
#include <stdio.h>
#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
#include <stdlib.h>
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif /* HAVE_SYS_STAT_H */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif /* HAVE_SYS_WAIT_H */
#include <string.h>
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif /* HAVE_DIRENT_H */
#include "src/threads/threads.h"
#include "src/util/basename.h"
#include "src/util/cmd_line.h"
#include "src/util/keyval_parse.h"
#include "src/util/output.h"
#include "src/util/pmix_environ.h"
#include "src/util/show_help.h"
#include "src/mca/base/base.h"
#include "src/mca/pinstalldirs/base/base.h"
#include "src/runtime/pmix_rte.h"
#include "src/include/pmix_globals.h"
#include <pmix_tool.h>
#include <pmix.h>
typedef struct {
pmix_lock_t lock;
pmix_status_t status;
} mylock_t;
/* define a structure for collecting returned
* info from a query */
typedef struct {
mylock_t lock;
pmix_info_t *info;
size_t ninfo;
} myquery_data_t;
static pmix_proc_t myproc;
/******************
* Local Functions
******************/
#if 0
static int gather_information(pmix_ps_mpirun_info_t *hnpinfo);
static int gather_active_jobs(pmix_ps_mpirun_info_t *hnpinfo);
static int gather_nodes(pmix_ps_mpirun_info_t *hnpinfo);
static int gather_vpid_info(pmix_ps_mpirun_info_t *hnpinfo);
static int pretty_print(pmix_ps_mpirun_info_t *hnpinfo);
static int pretty_print_nodes(pmix_node_t **nodes, pmix_std_cntr_t num_nodes);
static int pretty_print_jobs(pmix_job_t **jobs, pmix_std_cntr_t num_jobs);
static int pretty_print_vpids(pmix_job_t *job);
static void pretty_print_dashed_line(int len);
static char *pretty_node_state(pmix_node_state_t state);
static int parseable_print(pmix_ps_mpirun_info_t *hnpinfo);
#endif
/*****************************************
* Global Vars for Command line Arguments
*****************************************/
typedef struct {
bool help;
bool parseable;
bool nodes;
char *nspace;
pid_t pid;
} pmix_ps_globals_t;
pmix_ps_globals_t pmix_ps_globals = {0};
pmix_cmd_line_init_t cmd_line_opts[] = {
{ NULL,
'h', NULL, "help",
0,
&pmix_ps_globals.help, PMIX_CMD_LINE_TYPE_BOOL,
"This help message" },
{ NULL,
'\0', NULL, "parseable",
0,
&pmix_ps_globals.parseable, PMIX_CMD_LINE_TYPE_BOOL,
"Provide parseable output" },
{ NULL,
'\0', NULL, "nspace",
0,
&pmix_ps_globals.nspace, PMIX_CMD_LINE_TYPE_STRING,
"Nspace of job whose status is being requested" },
{ NULL,
'p', NULL, "pid",
1,
&pmix_ps_globals.pid, PMIX_CMD_LINE_TYPE_INT,
"Specify pid of starter to be contacted (default is to system server" },
{ NULL,
'n', NULL, "nodes",
0,
&pmix_ps_globals.nodes, PMIX_CMD_LINE_TYPE_BOOL,
"Display Node Information" },
/* End of list */
{ NULL,
'\0', NULL, NULL,
0,
NULL, PMIX_CMD_LINE_TYPE_NULL,
NULL }
};
/* this is a callback function for the PMIx_Query
* API. The query will callback with a status indicating
* if the request could be fully satisfied, partially
* satisfied, or completely failed. The info parameter
* contains an array of the returned data, with the
* info->key field being the key that was provided in
* the query call. Thus, you can correlate the returned
* data in the info->value field to the requested key.
*
* Once we have dealt with the returned data, we must
* call the release_fn so that the PMIx library can
* cleanup */
static void cbfunc(pmix_status_t status,
pmix_info_t *info, size_t ninfo,
void *cbdata,
pmix_release_cbfunc_t release_fn,
void *release_cbdata)
{
myquery_data_t *mq = (myquery_data_t*)cbdata;
size_t n;
/* save the returned info - the PMIx library "owns" it
* and will release it and perform other cleanup actions
* when release_fn is called */
if (0 < ninfo) {
PMIX_INFO_CREATE(mq->info, ninfo);
mq->ninfo = ninfo;
for (n=0; n < ninfo; n++) {
fprintf(stderr, "Transferring %s\n", info[n].key);
PMIX_INFO_XFER(&mq->info[n], &info[n]);
}
}
/* let the library release the data and cleanup from
* the operation */
if (NULL != release_fn) {
release_fn(release_cbdata);
}
/* release the block */
PMIX_WAKEUP_THREAD(&mq->lock.lock);
}
/* this is the event notification function we pass down below
* when registering for general events - i.e.,, the default
* handler. */
static void notification_fn(size_t evhdlr_registration_id,
pmix_status_t status,
const pmix_proc_t *source,
pmix_info_t info[], size_t ninfo,
pmix_info_t results[], size_t nresults,
pmix_event_notification_cbfunc_fn_t cbfunc,
void *cbdata)
{
/* this example doesn't do anything with default events */
if (NULL != cbfunc) {
cbfunc(PMIX_EVENT_ACTION_COMPLETE, NULL, 0, NULL, NULL, cbdata);
}
}
/* event handler registration is done asynchronously because it
* may involve the PMIx server registering with the host RM for
* external events. So we provide a callback function that returns
* the status of the request (success or an error), plus a numerical index
* to the registered event. The index is used later on to deregister
* an event handler - if we don't explicitly deregister it, then the
* PMIx server will do so when it see us exit */
static void evhandler_reg_callbk(pmix_status_t status,
size_t evhandler_ref,
void *cbdata)
{
mylock_t *lock = (mylock_t*)cbdata;
if (PMIX_SUCCESS != status) {
fprintf(stderr, "Client %s:%d EVENT HANDLER REGISTRATION FAILED WITH STATUS %d, ref=%lu\n",
myproc.nspace, myproc.rank, status, (unsigned long)evhandler_ref);
}
lock->status = status;
PMIX_WAKEUP_THREAD(&lock->lock);
}
int
main(int argc, char *argv[])
{
pmix_status_t rc = PMIX_SUCCESS;
pmix_info_t *info;
pmix_query_t *query;
size_t nq;
myquery_data_t myquery_data;
mylock_t mylock;
pmix_cmd_line_t cmd_line;
/* protect against problems if someone passes us thru a pipe
* and then abnormally terminates the pipe early */
signal(SIGPIPE, SIG_IGN);
/* initialize the output system */
if (!pmix_output_init()) {
return PMIX_ERROR;
}
/* initialize install dirs code */
if (PMIX_SUCCESS != (rc = pmix_mca_base_framework_open(&pmix_pinstalldirs_base_framework, 0))) {
fprintf(stderr, "pmix_pinstalldirs_base_open() failed -- process will likely abort (%s:%d, returned %d instead of PMIX_SUCCESS)\n",
__FILE__, __LINE__, rc);
return rc;
}
/* initialize the help system */
pmix_show_help_init();
/* keyval lex-based parser */
if (PMIX_SUCCESS != (rc = pmix_util_keyval_parse_init())) {
fprintf(stderr, "pmix_util_keyval_parse_init failed with %d\n", rc);
return PMIX_ERROR;
}
/* Setup the parameter system */
if (PMIX_SUCCESS != (rc = pmix_mca_base_var_init())) {
fprintf(stderr, "pmix_mca_base_var_init failed with %d\n", rc);
return PMIX_ERROR;
}
/* register params for pmix */
if (PMIX_SUCCESS != (rc = pmix_register_params())) {
fprintf(stderr, "pmix_register_params failed with %d\n", rc);
return PMIX_ERROR;
}
/* Parse the command line options */
pmix_cmd_line_create(&cmd_line, cmd_line_opts);
pmix_mca_base_open();
pmix_mca_base_cmd_line_setup(&cmd_line);
rc = pmix_cmd_line_parse(&cmd_line, false, false, argc, argv);
if (PMIX_SUCCESS != rc) {
if (PMIX_ERR_SILENT != rc) {
fprintf(stderr, "%s: command line error (%s)\n", argv[0],
PMIx_Error_string(rc));
}
return rc;
}
if (pmix_ps_globals.help) {
char *str, *args = NULL;
args = pmix_cmd_line_get_usage_msg(&cmd_line);
str = pmix_show_help_string("help-pps.txt", "usage", true,
args);
if (NULL != str) {
printf("%s", str);
free(str);
}
free(args);
/* If we show the help message, that should be all we do */
exit(0);
}
/* if we were given the pid of a starter, then direct that
* we connect to it */
/* otherwise, use the system connection first, if available */
PMIX_INFO_CREATE(info, 1);
PMIX_INFO_LOAD(&info[0], PMIX_CONNECT_SYSTEM_FIRST, NULL, PMIX_BOOL);
/* init as a tool */
if (PMIX_SUCCESS != (rc = PMIx_tool_init(&myproc, info, 1))) {
fprintf(stderr, "PMIx_tool_init failed: %d\n", rc);
exit(rc);
}
PMIX_INFO_FREE(info, 1);
/* register a default event handler */
PMIX_CONSTRUCT_LOCK(&mylock.lock);
PMIx_Register_event_handler(NULL, 0, NULL, 0,
notification_fn, evhandler_reg_callbk, (void*)&mylock);
PMIX_WAIT_THREAD(&mylock.lock);
PMIX_DESTRUCT_LOCK(&mylock.lock);
/* if we were given a specific nspace to ask about, then do so */
/* if we were asked to provide the status of the nodes, then do that */
/* otherwise, query the active nspaces */
nq = 1;
PMIX_QUERY_CREATE(query, nq);
PMIX_ARGV_APPEND(rc, query[0].keys, PMIX_QUERY_NAMESPACES);
/* setup the caddy to retrieve the data */
PMIX_CONSTRUCT_LOCK(&myquery_data.lock.lock);
myquery_data.info = NULL;
myquery_data.ninfo = 0;
/* execute the query */
fprintf(stderr, "pps: querying nspaces\n");
if (PMIX_SUCCESS != (rc = PMIx_Query_info_nb(query, nq, cbfunc, (void*)&myquery_data))) {
fprintf(stderr, "PMIx_Query_info failed: %d\n", rc);
goto done;
}
PMIX_WAIT_THREAD(&myquery_data.lock.lock);
PMIX_DESTRUCT_LOCK(&myquery_data.lock.lock);
/* we should have received back one info struct containing
* a comma-delimited list of nspaces */
if (1 != myquery_data.ninfo) {
/* this is an error */
fprintf(stderr, "PMIx Query returned an incorrect number of results: %lu\n", myquery_data.ninfo);
PMIX_INFO_FREE(myquery_data.info, myquery_data.ninfo);
goto done;
}
fprintf(stderr, "Active nspaces: %s\n", myquery_data.info[0].value.data.string);
/***************
* Cleanup
***************/
done:
PMIx_tool_finalize();
return rc;
}
#if 0
static int pretty_print(pmix_ps_mpirun_info_t *hnpinfo) {
char *header;
int len_hdr;
/*
* Print header and remember header length
*/
len_hdr = asprintf(&header, "Information from mpirun %s", PMIX_JOBID_PRINT(hnpinfo->hnp->name.jobid));
printf("\n\n%s\n", header);
free(header);
pretty_print_dashed_line(len_hdr);
/*
* Print Node Information
*/
if( pmix_ps_globals.nodes )
pretty_print_nodes(hnpinfo->nodes, hnpinfo->num_nodes);
/*
* Print Job Information
*/
pretty_print_jobs(hnpinfo->jobs, hnpinfo->num_jobs);
return PMIX_SUCCESS;
}
static int pretty_print_nodes(pmix_node_t **nodes, pmix_std_cntr_t num_nodes) {
int line_len;
int len_name = 0,
len_state = 0,
len_slots = 0,
len_slots_i = 0,
len_slots_m = 0;
pmix_node_t *node;
pmix_std_cntr_t i;
/*
* Caculate segment lengths
*/
len_name = (int) strlen("Node Name");
len_state = (int) strlen("State");
len_slots = (int) strlen("Slots");
len_slots_i = (int) strlen("Slots In Use");
len_slots_m = (int) strlen("Slots Max");
for(i=0; i < num_nodes; i++) {
node = nodes[i];
if( NULL != node->name &&
(int)strlen(node->name) > len_name)
len_name = (int) strlen(node->name);
if( (int)strlen(pretty_node_state(node->state)) > len_state )
len_state = (int)strlen(pretty_node_state(node->state));
}
line_len = (len_name + 3 +
len_state + 3 +
len_slots + 3 +
len_slots_i + 3 +
len_slots_m) + 2;
/*
* Print the header
*/
printf("%*s | ", len_name, "Node Name");
printf("%*s | ", len_state, "State");
printf("%*s | ", len_slots, "Slots");
printf("%*s | ", len_slots_m, "Slots Max");
printf("%*s | ", len_slots_i, "Slots In Use");
printf("\n");
pretty_print_dashed_line(line_len);
/*
* Print Info
*/
for(i=0; i < num_nodes; i++) {
node = nodes[i];
printf("%*s | ", len_name, node->name);
printf("%*s | ", len_state, pretty_node_state(node->state));
printf("%*d | ", len_slots, (uint)node->slots);
printf("%*d | ", len_slots_m, (uint)node->slots_max);
printf("%*d | ", len_slots_i, (uint)node->slots_inuse);
printf("\n");
}
return PMIX_SUCCESS;
}
static int pretty_print_jobs(pmix_job_t **jobs, pmix_std_cntr_t num_jobs) {
int len_jobid = 0,
len_state = 0,
len_slots = 0,
len_vpid_r = 0,
len_ckpt_s = 0,
len_ckpt_r = 0,
len_ckpt_l = 0;
int line_len;
pmix_job_t *job;
pmix_std_cntr_t i;
char *jobstr;
pmix_jobid_t mask=0x0000ffff;
for(i=0; i < num_jobs; i++) {
job = jobs[i];
/* check the jobid to see if this is the daemons' job */
if ((0 == (mask & job->jobid)) && !pmix_ps_globals.daemons) {
continue;
}
/* setup the printed name - do -not- free this! */
jobstr = PMIX_JOBID_PRINT(job->jobid);
/*
* Caculate segment lengths
*/
len_jobid = strlen(jobstr);;
len_state = (int) (strlen(pmix_job_state_to_str(job->state)) < strlen("State") ?
strlen("State") :
strlen(pmix_job_state_to_str(job->state)));
len_slots = 6;
len_vpid_r = (int) strlen("Num Procs");
len_ckpt_s = -3;
len_ckpt_r = -3;
len_ckpt_l = -3;
line_len = (len_jobid + 3 +
len_state + 3 +
len_slots + 3 +
len_vpid_r + 3 +
len_ckpt_s + 3 +
len_ckpt_r + 3 +
len_ckpt_l)
+ 2;
/*
* Print Header
*/
printf("\n");
printf("%*s | ", len_jobid , "JobID");
printf("%*s | ", len_state , "State");
printf("%*s | ", len_slots , "Slots");
printf("%*s | ", len_vpid_r , "Num Procs");
printf("\n");
pretty_print_dashed_line(line_len);
/*
* Print Info
*/
printf("%*s | ", len_jobid , PMIX_JOBID_PRINT(job->jobid));
printf("%*s | ", len_state , pmix_job_state_to_str(job->state));
printf("%*d | ", len_slots , (uint)job->total_slots_alloc);
printf("%*d | ", len_vpid_r, job->num_procs);
printf("\n");
pretty_print_vpids(job);
printf("\n\n"); /* give a little room between job outputs */
}
return PMIX_SUCCESS;
}
static int pretty_print_vpids(pmix_job_t *job) {
int len_o_proc_name = 0,
len_proc_name = 0,
len_rank = 0,
len_pid = 0,
len_state = 0,
len_node = 0,
len_ckpt_s = 0,
len_ckpt_r = 0,
len_ckpt_l = 0;
int i, line_len;
pmix_vpid_t v;
pmix_proc_t *vpid;
pmix_app_context_t *app;
char *o_proc_name;
char **nodename = NULL;
if (0 == job->num_procs) {
return PMIX_SUCCESS;
}
/*
* Caculate segment lengths
*/
len_o_proc_name = (int)strlen("PMIX Name");
len_proc_name = (int)strlen("Process Name");
len_rank = (int)strlen("Local Rank");
len_pid = 6;
len_state = 0;
len_node = 0;
len_ckpt_s = -3;
len_ckpt_r = -3;
len_ckpt_l = -3;
nodename = (char **) malloc(job->num_procs * sizeof(char *));
for(v=0; v < job->num_procs; v++) {
char *rankstr;
vpid = (pmix_proc_t*)job->procs->addr[v];
/*
* Find my app context
*/
if( 0 >= (int)job->num_apps ) {
if( 0 == vpid->name.vpid ) {
if( (int)strlen("pmixrun") > len_proc_name)
len_proc_name = strlen("pmixrun");
}
else {
if( (int)strlen("pmixd") > len_proc_name)
len_proc_name = strlen("pmixd");
}
}
for( i = 0; i < (int)job->num_apps; ++i) {
app = (pmix_app_context_t*)job->apps->addr[i];
if( app->idx == vpid->app_idx ) {
if( (int)strlen(app->app) > len_proc_name)
len_proc_name = strlen(app->app);
break;
}
}
o_proc_name = pmix_util_print_name_args(&vpid->name);
if ((int)strlen(o_proc_name) > len_o_proc_name)
len_o_proc_name = strlen(o_proc_name);
asprintf(&rankstr, "%u", (uint)vpid->local_rank);
if ((int)strlen(rankstr) > len_rank)
len_rank = strlen(rankstr);
free(rankstr);
nodename[v] = NULL;
if( pmix_get_attribute(&vpid->attributes, PMIX_PROC_NODENAME, (void**)&nodename[v], PMIX_STRING) &&
(int)strlen(nodename[v]) > len_node) {
len_node = strlen(nodename[v]);
} else if ((int)strlen("Unknown") > len_node) {
len_node = strlen("Unknown");
}
if( (int)strlen(pmix_proc_state_to_str(vpid->state)) > len_state)
len_state = strlen(pmix_proc_state_to_str(vpid->state));
}
line_len = (len_o_proc_name + 3 +
len_proc_name + 3 +
len_rank + 3 +
len_pid + 3 +
len_state + 3 +
len_node + 3 +
len_ckpt_s + 3 +
len_ckpt_r + 3 +
len_ckpt_l)
+ 2;
/*
* Print Header
*/
printf("\t");
printf("%*s | ", len_proc_name , "Process Name");
printf("%*s | ", len_o_proc_name , "PMIX Name");
printf("%*s | ", len_rank , "Local Rank");
printf("%*s | ", len_pid , "PID");
printf("%*s | ", len_node , "Node");
printf("%*s | ", len_state , "State");
printf("\n");
printf("\t");
pretty_print_dashed_line(line_len);
/*
* Print Info
*/
for(v=0; v < job->num_procs; v++) {
vpid = (pmix_proc_t*)job->procs->addr[v];
printf("\t");
if( 0 >= (int)job->num_apps ) {
if( 0 == vpid->name.vpid ) {
printf("%*s | ", len_proc_name, "pmixrun");
} else {
printf("%*s | ", len_proc_name, "pmixd");
}
}
for( i = 0; i < (int)job->num_apps; ++i) {
app = (pmix_app_context_t*)job->apps->addr[i];
if( app->idx == vpid->app_idx ) {
printf("%*s | ", len_proc_name, app->app);
break;
}
}
o_proc_name = pmix_util_print_name_args(&vpid->name);
printf("%*s | ", len_o_proc_name, o_proc_name);
printf("%*u | ", len_rank , (uint)vpid->local_rank);
printf("%*d | ", len_pid , vpid->pid);
printf("%*s | ", len_node , (NULL == nodename[v]) ? "Unknown" : nodename[v]);
printf("%*s | ", len_state , pmix_proc_state_to_str(vpid->state));
if (NULL != nodename[v]) {
free(nodename[v]);
}
printf("\n");
}
if (NULL != nodename) {
free(nodename);
}
return PMIX_SUCCESS;
}
static void pretty_print_dashed_line(int len) {
static const char dashes[9] = "--------";
while (len >= 8) {
printf("%8.8s", dashes);
len -= 8;
}
printf("%*.*s\n", len, len, dashes);
}
static int gather_information(pmix_ps_mpirun_info_t *hnpinfo) {
int ret;
if( PMIX_SUCCESS != (ret = gather_active_jobs(hnpinfo) )) {
goto cleanup;
}
if( PMIX_SUCCESS != (ret = gather_nodes(hnpinfo) )) {
goto cleanup;
}
if( PMIX_SUCCESS != (ret = gather_vpid_info(hnpinfo) )) {
goto cleanup;
}
cleanup:
return ret;
}
static int gather_active_jobs(pmix_ps_mpirun_info_t *hnpinfo) {
int ret;
if (PMIX_SUCCESS != (ret = pmix_util_comm_query_job_info(&(hnpinfo->hnp->name), pmix_ps_globals.jobid,
&hnpinfo->num_jobs, &hnpinfo->jobs))) {
PMIX_ERROR_LOG(ret);
}
return ret;
}
static int gather_nodes(pmix_ps_mpirun_info_t *hnpinfo) {
int ret;
if (PMIX_SUCCESS != (ret = pmix_util_comm_query_node_info(&(hnpinfo->hnp->name), NULL,
&hnpinfo->num_nodes, &hnpinfo->nodes))) {
PMIX_ERROR_LOG(ret);
}
pmix_output(0, "RECEIVED %d NODES", hnpinfo->num_nodes);
return ret;
}
static int gather_vpid_info(pmix_ps_mpirun_info_t *hnpinfo) {
int ret;
pmix_std_cntr_t i;
int cnt;
pmix_job_t *job;
pmix_proc_t **procs;
/*
* For each Job in the HNP
*/
for(i=0; i < hnpinfo->num_jobs; i++) {
job = hnpinfo->jobs[i];
/*
* Skip getting the vpid's for the HNP, unless asked to do so
* The HNP is always the first in the array
*/
if( 0 == i && !pmix_ps_globals.daemons) {
continue;
}
/* query the HNP for info on the procs in this job */
if (PMIX_SUCCESS != (ret = pmix_util_comm_query_proc_info(&(hnpinfo->hnp->name),
job->jobid,
PMIX_VPID_WILDCARD,
&cnt,
&procs))) {
PMIX_ERROR_LOG(ret);
}
job->procs->addr = (void**)procs;
job->procs->size = cnt;
job->num_procs = cnt;
}
return PMIX_SUCCESS;
}
static char *pretty_node_state(pmix_node_state_t state) {
switch(state) {
case PMIX_NODE_STATE_DOWN:
return strdup("Down");
break;
case PMIX_NODE_STATE_UP:
return strdup("Up");
break;
case PMIX_NODE_STATE_REBOOT:
return strdup("Reboot");
break;
case PMIX_NODE_STATE_UNKNOWN:
default:
return strdup("Unknown");
break;
}
}
static int parseable_print(pmix_ps_mpirun_info_t *hnpinfo)
{
pmix_job_t **jobs;
pmix_node_t **nodes;
pmix_proc_t *proc;
pmix_app_context_t *app;
char *appname;
int i, j;
char *nodename;
/* don't include the daemon job in the number of jobs reppmixd */
printf("mpirun:%lu:num nodes:%d:num jobs:%d\n",
(unsigned long)hnpinfo->hnp->pid, hnpinfo->num_nodes, hnpinfo->num_jobs-1);
if (pmix_ps_globals.nodes) {
nodes = hnpinfo->nodes;
for (i=0; i < hnpinfo->num_nodes; i++) {
printf("node:%s:state:%s:slots:%d:in use:%d\n",
nodes[i]->name, pretty_node_state(nodes[i]->state),
nodes[i]->slots, nodes[i]->slots_inuse);
}
}
jobs = hnpinfo->jobs;
/* skip job=0 as that's the daemon job */
for (i=1; i < hnpinfo->num_jobs; i++) {
printf("jobid:%d:state:%s:slots:%d:num procs:%d\n",
PMIX_LOCAL_JOBID(jobs[i]->jobid),
pmix_job_state_to_str(jobs[i]->state),
jobs[i]->total_slots_alloc,
jobs[i]->num_procs);
/* print the proc info */
for (j=0; j < jobs[i]->procs->size; j++) {
if (NULL == (proc = (pmix_proc_t*)pmix_pointer_array_get_item(jobs[i]->procs, j))) {
continue;
}
app = (pmix_app_context_t*)pmix_pointer_array_get_item(jobs[i]->apps, proc->app_idx);
if (NULL == app) {
appname = strdup("NULL");
} else {
appname = pmix_basename(app->app);
}
nodename = NULL;
pmix_get_attribute(&proc->attributes, PMIX_PROC_NODENAME, (void**)&nodename, PMIX_STRING);
printf("process:%s:rank:%s:pid:%lu:node:%s:state:%s\n",
appname, PMIX_VPID_PRINT(proc->name.vpid),
(unsigned long)proc->pid,
(NULL == nodename) ? "unknown" : nodename,
pmix_proc_state_to_str(proc->state));
free(appname);
if (NULL != nodename) {
free(nodename);
}
}
}
return PMIX_SUCCESS;
}
#endif

Просмотреть файл

@ -12,7 +12,7 @@
# All rights reserved.
# Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
# Copyright (c) 2016 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
@ -30,6 +30,7 @@ LEX_OUTPUT_ROOT = lex.pmix_show_help_yy
headers += \
util/alfg.h \
util/argv.h \
util/cmd_line.h \
util/error.h \
util/printf.h \
util/output.h \
@ -55,6 +56,7 @@ headers += \
sources += \
util/alfg.c \
util/argv.c \
util/cmd_line.c \
util/error.c \
util/printf.c \
util/output.c \

1406
opal/mca/pmix/pmix3x/pmix/src/util/cmd_line.c Обычный файл

Разница между файлами не показана из-за своего большого размера Загрузить разницу

622
opal/mca/pmix/pmix3x/pmix/src/util/cmd_line.h Обычный файл
Просмотреть файл

@ -0,0 +1,622 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* 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-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 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2016-2017 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/**
* @file
*
* General command line parsing facility for use throughout Open MPI.
*
* This scheme is inspired by the GNU getopt package. Command line
* options are registered. Each option can have up to three different
* matching tokens: a "short" name, a "single dash" name, and a "long"
* name. Each option can also take 0 or more arguments. Finally,
* each option can be repeated on the command line an arbitrary number
* of times.
*
* The "short" name can only be a single letter, and will be found
* after a single dash (e.g., "-a"). Multiple "short" names can be
* combined into a single command line argument (e.g., "-abc" can be
* equivalent to "-a -b -c").
*
* The "single dash" name is a multi-character name that only
* requires a single dash. This only exists to provide backwards
* compatibility for some well-known command line options in prior
* MPI implementations (e.g., "mpirun -np 3"). It should be used
* sparingly.
*
* The "long" name is a multi-character name that is found after a
* pair of dashes. For example, "--some-option-name".
*
* A command line option is a combination of 1 or more of a short
* name, single dash name, and a long name. Any of the names may be
* used on the command line; they are treated as synonyms. For
* example, say the following was used in for an executable named
* "foo":
*
* \code
* pmix_cmd_line_make_opt3(cmd, 'a', NULL, 'add', 1, "Add a user");
* \endcode
*
* In this case, the following command lines are exactly equivalent:
*
* \verbatim
* shell$ foo -a jsmith
* shell$ foo --add jsmith
* \endverbatim
*
* Note that this interface can also track multiple invocations of the
* same option. For example, the following is both legal and able to
* be retrieved through this interface:
*
* \verbatim
* shell$ foo -a jsmith -add bjones
* \endverbatim
*
* The caller to this interface creates a command line handle
* (pmix_cmd_line_t) with OBJ_NEW() and then uses it to register the
* desired parameters via pmix_cmd_line_make_opt3(). Once all the
* parameters have been registered, the user invokes
* pmix_cmd_line_parse() with the command line handle and the argv/argc
* pair to be parsed (typically the arguments from main()). The parser
* will examine the argv and find registered options and parameters.
* It will stop parsing when it runs into an recognized string token or
* the special "--" token.
*
* After the parse has occurred, various accessor functions can be
* used to determine which options were selected, what parameters were
* passed to them, etc.:
*
* - pmix_cmd_line_get_usage_msg() returns a string suitable for "help"
* kinds of messages.
* - pmix_cmd_line_is_taken() returns a true or false indicating
* whether a given command line option was found on the command
* line.
* - pmix_cmd_line_get_argc() returns the number of tokens parsed on
* the handle.
* - pmix_cmd_line_get_argv() returns any particular string from the
* original argv.
* - pmix_cmd_line_get_ninsts() returns the number of times a
* particular option was found on a command line.
* - pmix_cmd_line_get_param() returns the Nth parameter in the Mth
* instance of a given parameter.
* - pmix_cmd_line_get_tail() returns an array of tokens not parsed
* (i.e., if the parser ran into "--" or an unrecognized token).
*
* Note that a shortcut to creating a large number of options exists
* -- one can make a table of pmix_cmd_line_init_t instances and the
* table to pmix_cmd_line_create(). This creates an pmix_cmd_line_t
* handle that is pre-seeded with all the options from the table
* without the need to repeatedly invoke pmix_cmd_line_make_opt3() (or
* equivalent). This pmix_cmd_line_t instance is just like any other;
* it is still possible to add more options via
* pmix_cmd_line_make_opt3(), etc.
*/
#ifndef PMIX_CMD_LINE_H
#define PMIX_CMD_LINE_H
#include "pmix_config.h"
#include "src/class/pmix_object.h"
#include "src/class/pmix_list.h"
#include "src/threads/mutex.h"
BEGIN_C_DECLS
/**
* \internal
*
* Main top-level handle. This interface should not be used by users!
*/
struct pmix_cmd_line_t {
/** Make this an OBJ handle */
pmix_object_t super;
/** Thread safety */
pmix_recursive_mutex_t lcl_mutex;
/** List of ompi_cmd_line_option_t's (defined internally) */
pmix_list_t lcl_options;
/** Duplicate of argc from pmix_cmd_line_parse() */
int lcl_argc;
/** Duplicate of argv from pmix_cmd_line_parse() */
char **lcl_argv;
/** Parsed output; list of ompi_cmd_line_param_t's (defined internally) */
pmix_list_t lcl_params;
/** List of tail (unprocessed) arguments */
int lcl_tail_argc;
/** List of tail (unprocessed) arguments */
char **lcl_tail_argv;
};
/**
* \internal
*
* Convenience typedef
*/
typedef struct pmix_cmd_line_t pmix_cmd_line_t;
/**
* Data types supported by the parser
*/
enum pmix_cmd_line_type_t {
PMIX_CMD_LINE_TYPE_NULL,
PMIX_CMD_LINE_TYPE_STRING,
PMIX_CMD_LINE_TYPE_INT,
PMIX_CMD_LINE_TYPE_SIZE_T,
PMIX_CMD_LINE_TYPE_BOOL,
PMIX_CMD_LINE_TYPE_MAX
};
/**
* \internal
*
* Convenience typedef
*/
typedef enum pmix_cmd_line_type_t pmix_cmd_line_type_t;
/**
* Command line option type, for use in
* mpirun --help output.
*/
enum pmix_cmd_line_otype_t {
PMIX_CMD_LINE_OTYPE_GENERAL,
PMIX_CMD_LINE_OTYPE_DEBUG,
PMIX_CMD_LINE_OTYPE_OUTPUT,
PMIX_CMD_LINE_OTYPE_INPUT,
PMIX_CMD_LINE_OTYPE_MAPPING,
PMIX_CMD_LINE_OTYPE_RANKING,
PMIX_CMD_LINE_OTYPE_BINDING,
PMIX_CMD_LINE_OTYPE_DEVEL,
PMIX_CMD_LINE_OTYPE_COMPAT, /* Backwards compatibility */
PMIX_CMD_LINE_OTYPE_LAUNCH,
PMIX_CMD_LINE_OTYPE_DVM,
PMIX_CMD_LINE_OTYPE_UNSUPPORTED,
PMIX_CMD_LINE_OTYPE_PARSABLE,
PMIX_CMD_LINE_OTYPE_NULL
};
/**
* \internal
*
* Convenience typedef
*/
typedef enum pmix_cmd_line_otype_t pmix_cmd_line_otype_t;
/**
* Datatype used to construct a command line handle; see
* pmix_cmd_line_create().
*/
struct pmix_cmd_line_init_t {
/** If want to set an MCA parameter, set its parameter name
here. */
const char *ocl_mca_param_name;
/** "Short" name (i.e., "-X", where "X" is a single letter) */
char ocl_cmd_short_name;
/** "Single dash" name (i.e., "-foo"). The use of these are
discouraged. */
const char *ocl_cmd_single_dash_name;
/** Long name (i.e., "--foo"). */
const char *ocl_cmd_long_name;
/** Number of parameters that this option takes */
int ocl_num_params;
/** If this parameter is encountered, its *first* parameter it
saved here. If the parameter is encountered again, the
value is overwritten. */
void *ocl_variable_dest;
/** If an ocl_variable_dest is given, its datatype must be
supplied as well. */
pmix_cmd_line_type_t ocl_variable_type;
/** Description of the command line option, to be used with
pmix_cmd_line_get_usage_msg(). */
const char *ocl_description;
/** Category for mpirun --help output */
pmix_cmd_line_otype_t ocl_otype;
};
/**
* \internal
*
* Convenience typedef
*/
typedef struct pmix_cmd_line_init_t pmix_cmd_line_init_t;
/**
* Top-level command line handle.
*
* This handle is used for accessing all command line functionality
* (i.e., all pmix_cmd_line*() functions). Multiple handles can be
* created and simultaneously processed; each handle is independant
* from others.
*
* The pmix_cmd_line_t handles are [simplisticly] thread safe;
* processing is guaranteed to be mutually exclusive if multiple
* threads invoke functions on the same handle at the same time --
* access will be serialized in an unspecified order.
*
* Once finished, handles should be released with OBJ_RELEASE(). The
* destructor for pmix_cmd_line_t handles will free all memory
* associated with the handle.
*/
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_cmd_line_t);
/**
* Make a command line handle from a table of initializers.
*
* @param cmd PMIX command line handle.
* @param table Table of pmix_cmd_line_init_t instances for all
* the options to be included in the resulting command line
* handler.
*
* @retval PMIX_SUCCESS Upon success.
*
* This function takes a table of pmix_cmd_line_init_t instances
* to pre-seed an PMIX command line handle. The last instance in
* the table must have '\0' for the short name and NULL for the
* single-dash and long names. The handle is expected to have
* been OBJ_NEW'ed or OBJ_CONSTRUCT'ed already.
*
* Upon return, the command line handle is just like any other. A
* sample using this syntax:
*
* \code
* pmix_cmd_line_init_t cmd_line_init[] = {
* { NULL, NULL, NULL, 'h', NULL, "help", 0,
* &orterun_globals.help, PMIX_CMD_LINE_TYPE_BOOL,
* "This help message" },
*
* { NULL, NULL, NULL, '\0', NULL, "wd", 1,
* &orterun_globals.wd, PMIX_CMD_LINE_TYPE_STRING,
* "Set the working directory of the started processes" },
*
* { NULL, NULL, NULL, '\0', NULL, NULL, 0,
* NULL, PMIX_CMD_LINE_TYPE_NULL, NULL }
* };
* \endcode
*/
PMIX_EXPORT int pmix_cmd_line_create(pmix_cmd_line_t *cmd,
pmix_cmd_line_init_t *table);
/* Add a table of pmix_cmd_line_init_t instances
* to an existing PMIX command line handle.
*
* Multiple calls to pmix_cmd_line_add are permitted - each
* subsequent call will simply append new options to the existing
* handle. Note that any duplicates will return an error.
*/
PMIX_EXPORT int pmix_cmd_line_add(pmix_cmd_line_t *cmd,
pmix_cmd_line_init_t *table);
/**
* Create a command line option.
*
* @param cmd PMIX command line handle.
* @param entry Command line entry to add to the command line.
*
* @retval PMIX_SUCCESS Upon success.
*
*/
PMIX_EXPORT int pmix_cmd_line_make_opt_mca(pmix_cmd_line_t *cmd,
pmix_cmd_line_init_t entry);
/**
* Create a command line option.
*
* @param cmd PMIX command line handle.
* @param short_name "Short" name of the command line option.
* @param sd_name "Single dash" name of the command line option.
* @param long_name "Long" name of the command line option.
* @param num_params How many parameters this option takes.
* @param dest Short string description of this option.
*
* @retval PMIX_ERR_OUT_OF_RESOURCE If out of memory.
* @retval PMIX_ERR_BAD_PARAM If bad parameters passed.
* @retval PMIX_SUCCESS Upon success.
*
* Adds a command line option to the list of options that an PMIX
* command line handle will accept. The short_name may take the
* special value '\0' to not have a short name. Likewise, the
* sd_name and long_name may take the special value NULL to not have
* a single dash or long name, respectively. However, one of the
* three must have a name.
*
* num_params indicates how many parameters this option takes. It
* must be greater than or equal to 0.
*
* Finally, desc is a short string description of this option. It is
* used to generate the output from pmix_cmd_line_get_usage_msg().
*
*/
PMIX_EXPORT int pmix_cmd_line_make_opt3(pmix_cmd_line_t *cmd,
char short_name,
const char *sd_name,
const char *long_name,
int num_params,
const char *desc);
/**
* Parse a command line according to a pre-built PMIX command line
* handle.
*
* @param cmd PMIX command line handle.
* @param ignore_unknown Whether to print an error message upon
* finding an unknown token or not
* @param ignore_unknown_option Whether to print an error message upon
* finding an unknown option or not
* @param argc Length of the argv array.
* @param argv Array of strings from the command line.
*
* @retval PMIX_SUCCESS Upon success.
* @retval PMIX_ERR_SILENT If an error message was printed. This
* value will only be returned if the command line was not
* successfully parsed.
*
* Parse a series of command line tokens according to the option
* descriptions from a PMIX command line handle. The PMIX command line
* handle can then be queried to see what options were used, what
* their parameters were, etc.
*
* If an unknown token is found in the command line (i.e., a token
* that is not a parameter or a registered option), the parsing will
* stop (see below). If ignore_unknown is false, an error message
* is displayed. If ignore_unknown is true, the error message is
* not displayed.
*
* Error messages are always displayed regardless of the value
* of ignore_unknown (to stderr, and PMIX_ERR_SILENT is
* returned) if:
*
* 1. A token was encountered that required N parameters, but <N
* parameters were found (e.g., "cmd --param foo", but --param was
* registered to require 2 option tokens).
*
* 2. An unknown token beginning with "-" is encountered. For
* example, if "--fo" is specified, and no "fo" option is
* registered (e.g., perhaps the user meant to type "--foo"), an
* error message is always printed, UNLESS this unknown token
* happens after a "--" token (see below).
*
* The contents of argc and argv are not changed during parsing.
* argv[0] is assumed to be the executable name, and is ignored during
* parsing, except when printing error messages.
*
* Parsing will stop in the following conditions:
*
* - all argv tokens are processed
* - the token "--" is found
* - an unrecognized token is found
* - a parameter registered with an integer type option finds a
* non-integer option token
* - a parameted registered N option tokens, but finds less then
* <N tokens available
*
* Upon any of these conditions, any remaining tokens will be placed
* in the "tail" (and therefore not examined by the parser),
* regardless of the value of ignore_unknown. The set of tail
* tokens is available from the pmix_cmd_line_get_tail() function.
*
* Note that "--" is ignored if it is found in the middle an expected
* number of arguments. For example, if "--foo" is expected to have 3
* arguments, and the command line is:
*
* executable --foo a b -- other arguments
*
* This will result in an error, because "--" will be parsed as the
* third parameter to the first instance of "foo", and "other" will be
* an unrecognized option.
*
* Note that -- can be used to allow unknown tokens that begin
* with "-". For example, if a user wants to mpirun an executable
* named "-my-mpi-program", the "usual" way:
*
* mpirun -my-mpi-program
*
* will cause an error, because mpirun won't find single-letter
* options registered for some/all of those letters. But two
* workarounds are possible:
*
* mpirun -- -my-mpi-program
* or
* mpirun ./-my-mpi-program
*
* Finally, note that invoking this function multiple times on
* different sets of argv tokens is safe, but will erase any
* previous parsing results.
*/
PMIX_EXPORT int pmix_cmd_line_parse(pmix_cmd_line_t *cmd,
bool ignore_unknown,
bool ignore_unknown_option,
int argc, char **argv);
/**
* Return a consolidated "usage" message for a PMIX command line handle.
*
* @param cmd PMIX command line handle.
*
* @retval str Usage message.
*
* Returns a formatted string suitable for printing that lists the
* expected usage message and a short description of each option on
* the PMIX command line handle. Options that passed a NULL
* description to pmix_cmd_line_make_opt3() will not be included in the
* display (to allow for undocumented options).
*
* This function is typically only invoked internally by the
* pmix_show_help() function.
*
* This function should probably be fixed up to produce prettier
* output.
*
* The returned string must be freed by the caller.
*/
PMIX_EXPORT char *pmix_cmd_line_get_usage_msg(pmix_cmd_line_t *cmd) __pmix_attribute_malloc__ __pmix_attribute_warn_unused_result__;
/**
* Test if a given option was taken on the parsed command line.
*
* @param cmd PMIX command line handle.
* @param opt Short or long name of the option to check for.
*
* @retval true If the command line option was found during
* pmix_cmd_line_parse().
*
* @retval false If the command line option was not found during
* pmix_cmd_line_parse(), or pmix_cmd_line_parse() was not invoked on
* this handle.
*
* This function should only be called after pmix_cmd_line_parse().
*
* The function will return true if the option matching opt was found
* (either by its short or long name) during token parsing.
* Otherwise, it will return false.
*/
PMIX_EXPORT bool pmix_cmd_line_is_taken(pmix_cmd_line_t *cmd,
const char *opt) __pmix_attribute_nonnull__(1) __pmix_attribute_nonnull__(2);
/**
* Return the number of arguments parsed on a PMIX command line handle.
*
* @param cmd A pointer to the PMIX command line handle.
*
* @retval PMIX_ERROR If cmd is NULL.
* @retval argc Number of arguments previously added to the handle.
*
* Arguments are added to the handle via the pmix_cmd_line_parse()
* function.
*/
PMIX_EXPORT int pmix_cmd_line_get_argc(pmix_cmd_line_t *cmd) __pmix_attribute_unused__;
/**
* Return a string argument parsed on a PMIX command line handle.
*
* @param cmd A pointer to the PMIX command line handle.
* @param index The nth argument from the command line (0 is
* argv[0], etc.).
*
* @retval NULL If cmd is NULL or index is invalid
* @retval argument String of original argv[index]
*
* This function returns a single token from the arguments parsed
* on this handle. Arguments are added bia the
* pmix_cmd_line_parse() function.
*
* What is returned is a pointer to the actual string that is on
* the handle; it should not be modified or freed.
*/
PMIX_EXPORT char *pmix_cmd_line_get_argv(pmix_cmd_line_t *cmd,
int index);
/**
* Return the number of instances of an option found during parsing.
*
* @param cmd PMIX command line handle.
* @param opt Short or long name of the option to check for.
*
* @retval num Number of instances (to include 0) of a given potion
* found during pmix_cmd_line_parse().
*
* @retval PMIX_ERR If the command line option was not found during
* pmix_cmd_line_parse(), or pmix_cmd_line_parse() was not invoked on
* this handle.
*
* This function should only be called after pmix_cmd_line_parse().
*
* The function will return the number of instances of a given option
* (either by its short or long name) -- to include 0 -- or PMIX_ERR if
* either the option was not specified as part of the PMIX command line
* handle, or pmix_cmd_line_parse() was not invoked on this handle.
*/
PMIX_EXPORT int pmix_cmd_line_get_ninsts(pmix_cmd_line_t *cmd,
const char *opt) __pmix_attribute_nonnull__(1) __pmix_attribute_nonnull__(2);
/**
* Return a specific parameter for a specific instance of a option
* from the parsed command line.
*
* @param cmd PMIX command line handle.
* @param opt Short or long name of the option to check for.
* @param instance_num Instance number of the option to query.
* @param param_num Which parameter to return.
*
* @retval param String of the parameter.
* @retval NULL If any of the input values are invalid.
*
* This function should only be called after pmix_cmd_line_parse().
*
* This function returns the Nth parameter for the Ith instance of a
* given option on the parsed command line (both N and I are
* zero-indexed). For example, on the command line:
*
* executable --foo bar1 bar2 --foo bar3 bar4
*
* The call to pmix_cmd_line_get_param(cmd, "foo", 1, 1) would return
* "bar4". pmix_cmd_line_get_param(cmd, "bar", 0, 0) would return
* NULL, as would pmix_cmd_line_get_param(cmd, "foo", 2, 2);
*
* The returned string should \em not be modified or freed by the
* caller.
*/
PMIX_EXPORT char *pmix_cmd_line_get_param(pmix_cmd_line_t *cmd,
const char *opt,
int instance_num,
int param_num);
/**
* Return the entire "tail" of unprocessed argv from a PMIX
* command line handle.
*
* @param cmd A pointer to the PMIX command line handle.
* @param tailc Pointer to the output length of the null-terminated
* tail argv array.
* @param tailv Pointer to the output null-terminated argv of all
* unprocessed arguments from the command line.
*
* @retval PMIX_ERROR If cmd is NULL or otherwise invalid.
* @retval PMIX_SUCCESS Upon success.
*
* The "tail" is all the arguments on the command line that were
* not processed for some reason. Reasons for not processing
* arguments include:
*
* \sa The argument was not recognized
* \sa The argument "--" was seen, and therefore all arguments
* following it were not processed
*
* The output tailc parameter will be filled in with the integer
* length of the null-terminated tailv array (length including the
* final NULL entry). The output tailv parameter will be a copy
* of the tail parameters, and must be freed (likely with a call
* to pmix_argv_free()) by the caller.
*/
PMIX_EXPORT int pmix_cmd_line_get_tail(pmix_cmd_line_t *cmd, int *tailc,
char ***tailv);
END_C_DECLS
#endif /* PMIX_CMD_LINE_H */

Просмотреть файл

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2016 Intel, Inc. All rights reserved
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -26,7 +26,7 @@
BEGIN_C_DECLS
extern int pmix_util_keyval_parse_lineno;
PMIX_EXPORT extern int pmix_util_keyval_parse_lineno;
/**
* Callback triggered for each key = value pair
@ -46,14 +46,14 @@ typedef void (*pmix_keyval_parse_fn_t)(const char *key, const char *value);
* called exactly once. In a multithreaded context, calls to
* pmix_util_keyval_parse() will serialize multiple calls.
*/
int pmix_util_keyval_parse(const char *filename,
pmix_keyval_parse_fn_t callback);
PMIX_EXPORT int pmix_util_keyval_parse(const char *filename,
pmix_keyval_parse_fn_t callback);
int pmix_util_keyval_parse_init(void);
PMIX_EXPORT int pmix_util_keyval_parse_init(void);
int pmix_util_keyval_parse_finalize(void);
PMIX_EXPORT int pmix_util_keyval_parse_finalize(void);
int pmix_util_keyval_save_internal_envars(pmix_keyval_parse_fn_t callback);
PMIX_EXPORT int pmix_util_keyval_save_internal_envars(pmix_keyval_parse_fn_t callback);
END_C_DECLS

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2017 The University of Tennessee and The University
* Copyright (c) 2004-2008 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,

Просмотреть файл

@ -76,8 +76,8 @@ static pmix_status_t spawn_fn(const pmix_proc_t *proc,
pmix_spawn_cbfunc_t cbfunc, void *cbdata);
static pmix_status_t connect_fn(const pmix_proc_t procs[], size_t nprocs,
const pmix_info_t info[], size_t ninfo,
pmix_op_cbfunc_t cbfunc, void *cbdata);
static pmix_status_t disconnect_fn(const pmix_proc_t procs[], size_t nprocs,
pmix_connect_cbfunc_t cbfunc, void *cbdata);
static pmix_status_t disconnect_fn(const char nspace[],
const pmix_info_t info[], size_t ninfo,
pmix_op_cbfunc_t cbfunc, void *cbdata);
static pmix_status_t register_event_fn(pmix_status_t *codes, size_t ncodes,
@ -783,25 +783,30 @@ static pmix_status_t spawn_fn(const pmix_proc_t *proc,
return PMIX_SUCCESS;
}
static int numconnects = 0;
static pmix_status_t connect_fn(const pmix_proc_t procs[], size_t nprocs,
const pmix_info_t info[], size_t ninfo,
pmix_op_cbfunc_t cbfunc, void *cbdata)
pmix_connect_cbfunc_t cbfunc, void *cbdata)
{
pmix_output(0, "SERVER: CONNECT");
char nspace[PMIX_MAX_NSLEN+1];
/* in practice, we would pass this request to the local
* resource manager for handling */
(void)snprintf(nspace, PMIX_MAX_NSLEN, "NEW%d", numconnects);
numconnects++;
if (NULL != cbfunc) {
cbfunc(PMIX_SUCCESS, cbdata);
cbfunc(PMIX_SUCCESS, nspace, 0, cbdata);
}
return PMIX_SUCCESS;
}
static pmix_status_t disconnect_fn(const pmix_proc_t procs[], size_t nprocs,
static pmix_status_t disconnect_fn(const char nspace[],
const pmix_info_t info[], size_t ninfo,
pmix_op_cbfunc_t cbfunc, void *cbdata)
{