Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opal/mca/pmix/pmix2x/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ AC_DEFUN([MCA_opal_pmix_pmix2x_CONFIG],[
opal_pmix_pmix2x_timing_flag=--disable-pmix-timing
fi

opal_pmix_pmix2x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX2X_ $opal_pmix_pmix2x_sm_flag $opal_pmix_pmix2x_timing_flag --without-tests-examples --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\""
opal_pmix_pmix2x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX2X_ $opal_pmix_pmix2x_sm_flag $opal_pmix_pmix2x_timing_flag --without-tests-examples --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_pmix2x_args="--enable-debug $opal_pmix_pmix2x_args"
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"],
Expand Down
6 changes: 3 additions & 3 deletions opal/mca/pmix/pmix2x/pmix/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ release=0
# The only requirement is that it must be entirely printable ASCII
# characters and have no white space.

greek=a1
greek=

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

repo_rev=gitc442ba8
repo_rev=git198a2b0

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

# The date when this release was created

date="Apr 02, 2017"
date="Apr 12, 2017"

# The shared library version of each of PMIx's public libraries.
# These versions are maintained in accordance with the "Library
Expand Down
18 changes: 17 additions & 1 deletion opal/mca/pmix/pmix2x/pmix/config/pmix.m4
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ AC_MSG_RESULT([$with_ident_string])
AC_MSG_CHECKING([if want developer-level timing support])
AC_ARG_ENABLE(pmix-timing,
AC_HELP_STRING([--enable-pmix-timing],
[enable developer-level timing code (default: disabled)]))
[enable PMIx developer-level timing code (default: disabled)]))
if test "$enable_pmix_timing" = "yes"; then
AC_MSG_RESULT([yes])
WANT_PMIX_TIMING=1
Expand All @@ -979,6 +979,21 @@ else
WANT_INSTALL_HEADERS=0
fi

#
# Install backward compatibility support for PMI-1 and PMI-2
#
AC_MSG_CHECKING([if want backward compatibility for PMI-1 and PMI-2])
AC_ARG_ENABLE(pmix-backward-compatibility,
AC_HELP_STRING([--enable-pmix-backward-compatibility],
[enable PMIx support for PMI-1 and PMI-2 (default: enabled)]))
if test "$enable_pmix_backward_compatibility" = "no"; then
AC_MSG_RESULT([no])
WANT_PMIX_BACKWARD=0
else
AC_MSG_RESULT([yes])
WANT_PMIX_BACKWARD=1
fi

AM_CONDITIONAL([WANT_INSTALL_HEADERS], [test $WANT_INSTALL_HEADERS -eq 1])
])dnl

Expand All @@ -994,6 +1009,7 @@ AC_DEFUN([PMIX_DO_AM_CONDITIONALS],[
AM_CONDITIONAL([WANT_DSTORE], [test "x$enable_dstore" != "xno"])
AM_CONDITIONAL([WANT_PRIMARY_HEADERS], [test "x$pmix_install_primary_headers" = "xyes"])
AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1)
AM_CONDITIONAL(WANT_PMIX_BACKWARD, test "$WANT_PMIX_BACKWARD" = 1)
])
pmix_did_am_conditionals=yes
])dnl
3 changes: 1 addition & 2 deletions opal/mca/pmix/pmix2x/pmix/examples/debugger.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* 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-2016 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Mellanox Technologies, Inc. All rights reserved.
* $COPYRIGHT$
*
Expand Down Expand Up @@ -430,7 +430,6 @@ static void infocbfunc(pmix_status_t status,
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;
Expand Down
8 changes: 6 additions & 2 deletions opal/mca/pmix/pmix2x/pmix/include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ include_HEADERS = \
pmix.h \
pmix_common.h \
pmix_server.h \
pmi.h \
pmi2.h \
pmix_tool.h

if WANT_PMIX_BACKWARD
include_HEADERS += \
pmi.h \
pmi2.h
endif

nodist_include_HEADERS = \
pmix_version.h \
pmix_rename.h
Expand Down
4 changes: 2 additions & 2 deletions opal/mca/pmix/pmix2x/pmix/src/client/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- makefile -*-
#
# Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
# Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
# Copyright (c) 2014 Artem Y. Polyakov <artpol84@gmail.com>.
# All rights reserved.
# Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
Expand All @@ -22,7 +22,7 @@ sources += \
client/pmix_client_spawn.c \
client/pmix_client_connect.c

if !PMIX_EMBEDDED_MODE
if WANT_PMIX_BACKWARD
sources += \
client/pmi1.c \
client/pmi2.c
Expand Down
2 changes: 1 addition & 1 deletion opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ static void _getnbfn(int fd, short flags, void *cbdata)
rc = pmix_hash_fetch(&nptr->modex, pmix_globals.myid.rank, cb->key, &val);
if( PMIX_SUCCESS != rc ){
rc = PMIX_ERR_NOT_FOUND;
goto respond;
}
goto respond;
}

/* otherwise, the data must be something they "put" */
Expand Down
4 changes: 2 additions & 2 deletions opal/mca/pmix/pmix2x/pmix/src/event/pmix_event_notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static void progress_local_event_hdlr(pmix_status_t status,
* as this indicates that info struct should be removed */
nsave = 0;
for (n=0; n < chain->nresults; n++) {
if (NULL != chain->results[n].key) {
if (0 < strlen(chain->results[n].key)) {
++nsave;
}
}
Expand All @@ -217,7 +217,7 @@ static void progress_local_event_hdlr(pmix_status_t status,
/* transfer over the prior data */
cnt = 0;
for (n=0; n < chain->nresults; n++) {
if (NULL != chain->results[n].key) {
if (0 < strlen(chain->results[n].key)) {
PMIX_INFO_XFER(&newinfo[cnt], &chain->results[n]);
++cnt;
}
Expand Down
119 changes: 64 additions & 55 deletions opal/mca/pmix/pmix2x/pmix/src/event/pmix_event_registration.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,18 @@ static void reg_event_hdlr(int sd, short args, void *cbdata)
break;
}
}
/* if the handler wasn't found, then it may show up later - so
* for now just prepend it to the list */
/* if the handler wasn't found, then we return an error. At some
* future time, we may change this behavior and cache this handler
* until the reference one has been registered. However, this could
* turn out to be a laborious search procedure as the reference
* event handler may in turn be dependent on another handler, etc. */
if (!found) {
pmix_list_prepend(cd->list, &evhdlr->super);
/* this is an error */
--pmix_globals.events.nhdlrs;
rc = PMIX_ERR_EVENT_REGISTRATION;
index = UINT_MAX;
PMIX_RELEASE(evhdlr);
goto ack;
}
}
if (PMIX_ERR_WOULD_BLOCK == rc) {
Expand Down Expand Up @@ -710,57 +718,54 @@ static void dereg_event_hdlr(int sd, short args, void *cbdata)
}

/* check the first and last locations */
if (NULL != pmix_globals.events.first ||
NULL != pmix_globals.events.last) {
if (pmix_globals.events.first->index == cd->ref ||
pmix_globals.events.last->index == cd->ref) {
/* found it */
if (pmix_globals.events.first->index == cd->ref) {
ev = pmix_globals.events.first;
} else {
ev = pmix_globals.events.last;
}
if (NULL != msg) {
/* if this is a default handler, see if any other default
* handlers remain */
if (NULL == ev->codes) {
if (0 == pmix_list_get_size(&pmix_globals.events.default_events)) {
/* tell the server to dereg our default handler */
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &wildcard, 1, PMIX_STATUS))) {
PMIX_RELEASE(msg);
goto cleanup;
}
if ((NULL != pmix_globals.events.first && pmix_globals.events.first->index == cd->ref) ||
(NULL != pmix_globals.events.last && pmix_globals.events.last->index == cd->ref)) {
/* found it */
if (NULL != pmix_globals.events.first && pmix_globals.events.first->index == cd->ref) {
ev = pmix_globals.events.first;
} else {
ev = pmix_globals.events.last;
}
if (NULL != msg) {
/* if this is a default handler, see if any other default
* handlers remain */
if (NULL == ev->codes) {
if (0 == pmix_list_get_size(&pmix_globals.events.default_events)) {
/* tell the server to dereg our default handler */
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &wildcard, 1, PMIX_STATUS))) {
PMIX_RELEASE(msg);
goto cleanup;
}
} else {
for (n=0; n < ev->ncodes; n++) {
/* see if this is the last registration we have for this code */
PMIX_LIST_FOREACH(active, &pmix_globals.events.actives, pmix_active_code_t) {
if (active->code == ev->codes[n]) {
--active->nregs;
if (0 == active->nregs) {
pmix_list_remove_item(&pmix_globals.events.actives, &active->super);
/* tell the server to dereg this code */
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
PMIX_RELEASE(active);
PMIX_RELEASE(msg);
goto cleanup;
}
}
} else {
for (n=0; n < ev->ncodes; n++) {
/* see if this is the last registration we have for this code */
PMIX_LIST_FOREACH(active, &pmix_globals.events.actives, pmix_active_code_t) {
if (active->code == ev->codes[n]) {
--active->nregs;
if (0 == active->nregs) {
pmix_list_remove_item(&pmix_globals.events.actives, &active->super);
/* tell the server to dereg this code */
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
PMIX_RELEASE(active);
PMIX_RELEASE(msg);
goto cleanup;
}
break;
PMIX_RELEASE(active);
}
break;
}
}
}
}
if (pmix_globals.events.first->index == cd->ref) {
pmix_globals.events.first = NULL;
} else {
pmix_globals.events.last = NULL;
}
PMIX_RELEASE(ev);
goto cleanup;
}
if (ev == pmix_globals.events.first) {
pmix_globals.events.first = NULL;
} else {
pmix_globals.events.last = NULL;
}
PMIX_RELEASE(ev);
goto cleanup;
}

/* the registration can be in any of three places, so check each of them */
Expand Down Expand Up @@ -793,11 +798,13 @@ static void dereg_event_hdlr(int sd, short args, void *cbdata)
--active->nregs;
if (0 == active->nregs) {
pmix_list_remove_item(&pmix_globals.events.actives, &active->super);
/* tell the server to dereg this code */
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
PMIX_RELEASE(active);
PMIX_RELEASE(msg);
goto cleanup;
if (NULL != msg) {
/* tell the server to dereg this code */
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
PMIX_RELEASE(active);
PMIX_RELEASE(msg);
goto cleanup;
}
}
PMIX_RELEASE(active);
}
Expand All @@ -820,11 +827,13 @@ static void dereg_event_hdlr(int sd, short args, void *cbdata)
--active->nregs;
if (0 == active->nregs) {
pmix_list_remove_item(&pmix_globals.events.actives, &active->super);
/* tell the server to dereg this code */
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
PMIX_RELEASE(active);
PMIX_RELEASE(msg);
goto cleanup;
if (NULL != msg) {
/* tell the server to dereg this code */
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
PMIX_RELEASE(active);
PMIX_RELEASE(msg);
goto cleanup;
}
}
PMIX_RELEASE(active);
}
Expand Down
4 changes: 2 additions & 2 deletions opal/mca/pmix/pmix2x/pmix/src/util/compress.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

BEGIN_C_DECLS

/* define a limit of 128k for raw strings */
#define PMIX_STRING_LIMIT 131072
/* define a limit for storing raw strings */
#define PMIX_STRING_LIMIT 512

/* define a macro for quickly checking if a string exceeds the
* compression limit */
Expand Down
11 changes: 9 additions & 2 deletions opal/mca/pmix/pmix2x/pmix/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# All rights reserved.
# Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -32,7 +32,12 @@ headers = test_common.h cli_stages.h server_callbacks.h utils.h test_fence.h \
AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_builddir)/src/include -I$(top_builddir)/src/api

noinst_SCRIPTS = pmix_client_otheruser.sh
noinst_PROGRAMS = pmi_client pmi2_client
noinst_PROGRAMS =

if WANT_PMIX_BACKWARD
noinst_PROGRAMS += pmi_client pmi2_client
endif

if !WANT_HIDDEN
noinst_PROGRAMS += pmix_test pmix_client pmix_regex
endif
Expand All @@ -43,6 +48,7 @@ pmix_test_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
pmix_test_LDADD = \
$(top_builddir)/src/libpmix.la

if WANT_PMIX_BACKWARD
pmi_client_SOURCES = $(headers) \
pmi_client.c
pmi_client_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
Expand All @@ -54,6 +60,7 @@ pmi2_client_SOURCES = $(headers) \
pmi2_client_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
pmi2_client_LDADD = \
$(top_builddir)/src/libpmix.la
endif

pmix_client_SOURCES = $(headers) \
pmix_client.c test_fence.c test_common.c test_publish.c test_spawn.c \
Expand Down