Skip to content

Commit 9f73974

Browse files
author
Ralph Castain
committed
Update to latest PMIx master, including disabling the pmi-1 and pmi-2 backward compatibility as these interfere with the s1,s2 components
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
1 parent 539f71d commit 9f73974

File tree

11 files changed

+108
-73
lines changed

11 files changed

+108
-73
lines changed

opal/mca/pmix/pmix2x/configure.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ AC_DEFUN([MCA_opal_pmix_pmix2x_CONFIG],[
6161
opal_pmix_pmix2x_timing_flag=--disable-pmix-timing
6262
fi
6363

64-
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\\\""
64+
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\\\""
6565
AS_IF([test "$enable_debug" = "yes"],
6666
[opal_pmix_pmix2x_args="--enable-debug $opal_pmix_pmix2x_args"
6767
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"],

opal/mca/pmix/pmix2x/pmix/VERSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ release=0
2323
# The only requirement is that it must be entirely printable ASCII
2424
# characters and have no white space.
2525

26-
greek=a1
26+
greek=
2727

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

33-
repo_rev=gitc442ba8
33+
repo_rev=git198a2b0
3434

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

4545
# The date when this release was created
4646

47-
date="Apr 02, 2017"
47+
date="Apr 12, 2017"
4848

4949
# The shared library version of each of PMIx's public libraries.
5050
# These versions are maintained in accordance with the "Library

opal/mca/pmix/pmix2x/pmix/config/pmix.m4

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ AC_MSG_RESULT([$with_ident_string])
952952
AC_MSG_CHECKING([if want developer-level timing support])
953953
AC_ARG_ENABLE(pmix-timing,
954954
AC_HELP_STRING([--enable-pmix-timing],
955-
[enable developer-level timing code (default: disabled)]))
955+
[enable PMIx developer-level timing code (default: disabled)]))
956956
if test "$enable_pmix_timing" = "yes"; then
957957
AC_MSG_RESULT([yes])
958958
WANT_PMIX_TIMING=1
@@ -979,6 +979,21 @@ else
979979
WANT_INSTALL_HEADERS=0
980980
fi
981981

982+
#
983+
# Install backward compatibility support for PMI-1 and PMI-2
984+
#
985+
AC_MSG_CHECKING([if want backward compatibility for PMI-1 and PMI-2])
986+
AC_ARG_ENABLE(pmix-backward-compatibility,
987+
AC_HELP_STRING([--enable-pmix-backward-compatibility],
988+
[enable PMIx support for PMI-1 and PMI-2 (default: enabled)]))
989+
if test "$enable_pmix_backward_compatibility" = "no"; then
990+
AC_MSG_RESULT([no])
991+
WANT_PMIX_BACKWARD=0
992+
else
993+
AC_MSG_RESULT([yes])
994+
WANT_PMIX_BACKWARD=1
995+
fi
996+
982997
AM_CONDITIONAL([WANT_INSTALL_HEADERS], [test $WANT_INSTALL_HEADERS -eq 1])
983998
])dnl
984999

@@ -994,6 +1009,7 @@ AC_DEFUN([PMIX_DO_AM_CONDITIONALS],[
9941009
AM_CONDITIONAL([WANT_DSTORE], [test "x$enable_dstore" != "xno"])
9951010
AM_CONDITIONAL([WANT_PRIMARY_HEADERS], [test "x$pmix_install_primary_headers" = "xyes"])
9961011
AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1)
1012+
AM_CONDITIONAL(WANT_PMIX_BACKWARD, test "$WANT_PMIX_BACKWARD" = 1)
9971013
])
9981014
pmix_did_am_conditionals=yes
9991015
])dnl

opal/mca/pmix/pmix2x/pmix/examples/debugger.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* All rights reserved.
1414
* Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
1515
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
16-
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2015 Mellanox Technologies, Inc. All rights reserved.
1818
* $COPYRIGHT$
1919
*
@@ -430,7 +430,6 @@ static void infocbfunc(pmix_status_t status,
430430
static int attach_to_running_job(char *nspace)
431431
{
432432
pmix_status_t rc;
433-
pmix_proc_t myproc;
434433
pmix_query_t *query;
435434
size_t nq;
436435
mydbug_query_t *q;

opal/mca/pmix/pmix2x/pmix/include/Makefile.am

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ include_HEADERS = \
1515
pmix.h \
1616
pmix_common.h \
1717
pmix_server.h \
18-
pmi.h \
19-
pmi2.h \
2018
pmix_tool.h
2119

20+
if WANT_PMIX_BACKWARD
21+
include_HEADERS += \
22+
pmi.h \
23+
pmi2.h
24+
endif
25+
2226
nodist_include_HEADERS = \
2327
pmix_version.h \
2428
pmix_rename.h

opal/mca/pmix/pmix2x/pmix/src/client/Makefile.include

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- makefile -*-
22
#
3-
# Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
3+
# Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
44
# Copyright (c) 2014 Artem Y. Polyakov <artpol84@gmail.com>.
55
# All rights reserved.
66
# Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
@@ -22,7 +22,7 @@ sources += \
2222
client/pmix_client_spawn.c \
2323
client/pmix_client_connect.c
2424

25-
if !PMIX_EMBEDDED_MODE
25+
if WANT_PMIX_BACKWARD
2626
sources += \
2727
client/pmi1.c \
2828
client/pmi2.c

opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_get.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,8 +633,8 @@ static void _getnbfn(int fd, short flags, void *cbdata)
633633
rc = pmix_hash_fetch(&nptr->modex, pmix_globals.myid.rank, cb->key, &val);
634634
if( PMIX_SUCCESS != rc ){
635635
rc = PMIX_ERR_NOT_FOUND;
636-
goto respond;
637636
}
637+
goto respond;
638638
}
639639

640640
/* otherwise, the data must be something they "put" */

opal/mca/pmix/pmix2x/pmix/src/event/pmix_event_notification.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static void progress_local_event_hdlr(pmix_status_t status,
202202
* as this indicates that info struct should be removed */
203203
nsave = 0;
204204
for (n=0; n < chain->nresults; n++) {
205-
if (NULL != chain->results[n].key) {
205+
if (0 < strlen(chain->results[n].key)) {
206206
++nsave;
207207
}
208208
}
@@ -217,7 +217,7 @@ static void progress_local_event_hdlr(pmix_status_t status,
217217
/* transfer over the prior data */
218218
cnt = 0;
219219
for (n=0; n < chain->nresults; n++) {
220-
if (NULL != chain->results[n].key) {
220+
if (0 < strlen(chain->results[n].key)) {
221221
PMIX_INFO_XFER(&newinfo[cnt], &chain->results[n]);
222222
++cnt;
223223
}

opal/mca/pmix/pmix2x/pmix/src/event/pmix_event_registration.c

Lines changed: 64 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -641,10 +641,18 @@ static void reg_event_hdlr(int sd, short args, void *cbdata)
641641
break;
642642
}
643643
}
644-
/* if the handler wasn't found, then it may show up later - so
645-
* for now just prepend it to the list */
644+
/* if the handler wasn't found, then we return an error. At some
645+
* future time, we may change this behavior and cache this handler
646+
* until the reference one has been registered. However, this could
647+
* turn out to be a laborious search procedure as the reference
648+
* event handler may in turn be dependent on another handler, etc. */
646649
if (!found) {
647-
pmix_list_prepend(cd->list, &evhdlr->super);
650+
/* this is an error */
651+
--pmix_globals.events.nhdlrs;
652+
rc = PMIX_ERR_EVENT_REGISTRATION;
653+
index = UINT_MAX;
654+
PMIX_RELEASE(evhdlr);
655+
goto ack;
648656
}
649657
}
650658
if (PMIX_ERR_WOULD_BLOCK == rc) {
@@ -710,57 +718,54 @@ static void dereg_event_hdlr(int sd, short args, void *cbdata)
710718
}
711719

712720
/* check the first and last locations */
713-
if (NULL != pmix_globals.events.first ||
714-
NULL != pmix_globals.events.last) {
715-
if (pmix_globals.events.first->index == cd->ref ||
716-
pmix_globals.events.last->index == cd->ref) {
717-
/* found it */
718-
if (pmix_globals.events.first->index == cd->ref) {
719-
ev = pmix_globals.events.first;
720-
} else {
721-
ev = pmix_globals.events.last;
722-
}
723-
if (NULL != msg) {
724-
/* if this is a default handler, see if any other default
725-
* handlers remain */
726-
if (NULL == ev->codes) {
727-
if (0 == pmix_list_get_size(&pmix_globals.events.default_events)) {
728-
/* tell the server to dereg our default handler */
729-
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &wildcard, 1, PMIX_STATUS))) {
730-
PMIX_RELEASE(msg);
731-
goto cleanup;
732-
}
721+
if ((NULL != pmix_globals.events.first && pmix_globals.events.first->index == cd->ref) ||
722+
(NULL != pmix_globals.events.last && pmix_globals.events.last->index == cd->ref)) {
723+
/* found it */
724+
if (NULL != pmix_globals.events.first && pmix_globals.events.first->index == cd->ref) {
725+
ev = pmix_globals.events.first;
726+
} else {
727+
ev = pmix_globals.events.last;
728+
}
729+
if (NULL != msg) {
730+
/* if this is a default handler, see if any other default
731+
* handlers remain */
732+
if (NULL == ev->codes) {
733+
if (0 == pmix_list_get_size(&pmix_globals.events.default_events)) {
734+
/* tell the server to dereg our default handler */
735+
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &wildcard, 1, PMIX_STATUS))) {
736+
PMIX_RELEASE(msg);
737+
goto cleanup;
733738
}
734-
} else {
735-
for (n=0; n < ev->ncodes; n++) {
736-
/* see if this is the last registration we have for this code */
737-
PMIX_LIST_FOREACH(active, &pmix_globals.events.actives, pmix_active_code_t) {
738-
if (active->code == ev->codes[n]) {
739-
--active->nregs;
740-
if (0 == active->nregs) {
741-
pmix_list_remove_item(&pmix_globals.events.actives, &active->super);
742-
/* tell the server to dereg this code */
743-
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
744-
PMIX_RELEASE(active);
745-
PMIX_RELEASE(msg);
746-
goto cleanup;
747-
}
739+
}
740+
} else {
741+
for (n=0; n < ev->ncodes; n++) {
742+
/* see if this is the last registration we have for this code */
743+
PMIX_LIST_FOREACH(active, &pmix_globals.events.actives, pmix_active_code_t) {
744+
if (active->code == ev->codes[n]) {
745+
--active->nregs;
746+
if (0 == active->nregs) {
747+
pmix_list_remove_item(&pmix_globals.events.actives, &active->super);
748+
/* tell the server to dereg this code */
749+
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
748750
PMIX_RELEASE(active);
751+
PMIX_RELEASE(msg);
752+
goto cleanup;
749753
}
750-
break;
754+
PMIX_RELEASE(active);
751755
}
756+
break;
752757
}
753758
}
754759
}
755760
}
756-
if (pmix_globals.events.first->index == cd->ref) {
757-
pmix_globals.events.first = NULL;
758-
} else {
759-
pmix_globals.events.last = NULL;
760-
}
761-
PMIX_RELEASE(ev);
762-
goto cleanup;
763761
}
762+
if (ev == pmix_globals.events.first) {
763+
pmix_globals.events.first = NULL;
764+
} else {
765+
pmix_globals.events.last = NULL;
766+
}
767+
PMIX_RELEASE(ev);
768+
goto cleanup;
764769
}
765770

766771
/* the registration can be in any of three places, so check each of them */
@@ -793,11 +798,13 @@ static void dereg_event_hdlr(int sd, short args, void *cbdata)
793798
--active->nregs;
794799
if (0 == active->nregs) {
795800
pmix_list_remove_item(&pmix_globals.events.actives, &active->super);
796-
/* tell the server to dereg this code */
797-
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
798-
PMIX_RELEASE(active);
799-
PMIX_RELEASE(msg);
800-
goto cleanup;
801+
if (NULL != msg) {
802+
/* tell the server to dereg this code */
803+
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
804+
PMIX_RELEASE(active);
805+
PMIX_RELEASE(msg);
806+
goto cleanup;
807+
}
801808
}
802809
PMIX_RELEASE(active);
803810
}
@@ -820,11 +827,13 @@ static void dereg_event_hdlr(int sd, short args, void *cbdata)
820827
--active->nregs;
821828
if (0 == active->nregs) {
822829
pmix_list_remove_item(&pmix_globals.events.actives, &active->super);
823-
/* tell the server to dereg this code */
824-
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
825-
PMIX_RELEASE(active);
826-
PMIX_RELEASE(msg);
827-
goto cleanup;
830+
if (NULL != msg) {
831+
/* tell the server to dereg this code */
832+
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(msg, &active->code, 1, PMIX_STATUS))) {
833+
PMIX_RELEASE(active);
834+
PMIX_RELEASE(msg);
835+
goto cleanup;
836+
}
828837
}
829838
PMIX_RELEASE(active);
830839
}

opal/mca/pmix/pmix2x/pmix/src/util/compress.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131

3232
BEGIN_C_DECLS
3333

34-
/* define a limit of 128k for raw strings */
35-
#define PMIX_STRING_LIMIT 131072
34+
/* define a limit for storing raw strings */
35+
#define PMIX_STRING_LIMIT 512
3636

3737
/* define a macro for quickly checking if a string exceeds the
3838
* compression limit */

0 commit comments

Comments
 (0)