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
63 changes: 32 additions & 31 deletions config/opal_check_pmi.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
# reserved.
# Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
# Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
# Copyright (c) 2014-2018 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
Expand Down Expand Up @@ -253,7 +253,8 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
AS_IF([test -z "$with_pmix" || test "$with_pmix" = "yes" || test "$with_pmix" = "internal"],
[AC_MSG_RESULT([no])
opal_external_pmix_happy=no
opal_prun_happy=yes],
opal_prun_happy=yes
opal_external_pmix_version=internal],

[AC_MSG_RESULT([yes])
# check for external pmix lib */
Expand All @@ -272,23 +273,29 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
[AC_MSG_CHECKING([libpmix.* in $with_pmix_libdir/lib64])
files=`ls $with_pmix_libdir/lib64/libpmix.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt 0],
[pmix_ext_install_libdir=$with_pmix_libdir/lib64],
[AC_MSG_CHECKING([libpmix.* in $with_pmix_libdir/lib])
[AC_MSG_RESULT([found])
pmix_ext_install_libdir=$with_pmix_libdir/lib64],
[AC_MSG_RESULT([not found])
AC_MSG_CHECKING([libpmix.* in $with_pmix_libdir/lib])
files=`ls $with_pmix_libdir/lib/libpmix.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt 0],
[pmix_ext_install_libdir=$with_pmix_libdir/lib],
[AC_MSG_RESULT([found])
pmix_ext_install_libdir=$with_pmix_libdir/lib],
[AC_MSG_RESULT([not found])
AC_MSG_ERROR([Cannot continue])])])])],
[# check for presence of lib64 directory - if found, see if the
# desired library is present and matches our build requirements
AC_MSG_CHECKING([libpmix.* in $pmix_ext_install_dir/lib64])
files=`ls $pmix_ext_install_dir/lib64/libpmix.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt 0],
[pmix_ext_install_libdir=$pmix_ext_install_dir/lib64],
[AC_MSG_CHECKING([libpmix.* in $pmix_ext_install_dir/lib])
[AC_MSG_RESULT([found])
pmix_ext_install_libdir=$pmix_ext_install_dir/lib64],
[AC_MSG_RESULT([not found])
AC_MSG_CHECKING([libpmix.* in $pmix_ext_install_dir/lib])
files=`ls $pmix_ext_install_dir/lib/libpmix.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt 0],
[pmix_ext_install_libdir=$pmix_ext_install_dir/lib],
[AC_MSG_RESULT([found])
pmix_ext_install_libdir=$pmix_ext_install_dir/lib],
[AC_MSG_RESULT([not found])
AC_MSG_ERROR([Cannot continue])])])])

Expand All @@ -303,33 +310,22 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
CPPFLAGS="-I$pmix_ext_install_dir/include $CPPFLAGS"
AS_IF([test "x`ls $pmix_ext_install_dir/include/pmix_version.h 2> /dev/null`" = "x"],
[AC_MSG_RESULT([version file not found - assuming v1.1.4])
opal_external_pmix_version_found=1
opal_external_pmix_version=114
opal_external_have_pmix1=1],
# we don't support anything earlier than 1.2.x
AC_MSG_WARN([External PMIx support requested, but version])
AC_MSG_WARN([of the external lib is less than the minimum])
AC_MSG_WARN([v1.2.x required by Open MPI.])
AC_MSG_ERROR([cannot continue])],
[AC_MSG_RESULT([version file found])
opal_external_pmix_version_found=0])

# if it does exist, then we need to parse it to find
# the actual release series
AS_IF([test "$opal_external_pmix_version_found" = "0"],
[AC_MSG_CHECKING([version 3x])
[AC_MSG_CHECKING([version 2x or above])
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
#include <pmix_version.h>
#if (PMIX_VERSION_MAJOR != 3L)
#error "not version 3"
#endif
], [])],
[AC_MSG_RESULT([found])
opal_external_pmix_version=3x
opal_external_pmix_version_found=1],
[AC_MSG_RESULT([not found])])])

AS_IF([test "$opal_external_pmix_version_found" = "0"],
[AC_MSG_CHECKING([version 2x])
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
#include <pmix_version.h>
#if (PMIX_VERSION_MAJOR != 2L)
#error "not version 2"
#if (PMIX_VERSION_MAJOR < 2L)
#error "not version 2 or above"
#endif
], [])],
[AC_MSG_RESULT([found])
Expand All @@ -342,8 +338,8 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
[AC_MSG_CHECKING([version 1x])
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
#include <pmix_version.h>
#if (PMIX_VERSION_MAJOR != 1L)
#error "not version 1"
#if (PMIX_VERSION_MAJOR != 1L && PMIX_VERSION_MINOR != 2L)
#error "not version 1.2.x"
#endif
], [])],
[AC_MSG_RESULT([found])
Expand All @@ -354,8 +350,8 @@ AC_DEFUN([OPAL_CHECK_PMIX],[

AS_IF([test "x$opal_external_pmix_version" = "x"],
[AC_MSG_WARN([External PMIx support requested, but version])
AC_MSG_WARN([information of the external lib could not])
AC_MSG_WARN([be detected])
AC_MSG_WARN([of the external lib is less than the minimum])
AC_MSG_WARN([v1.2.x required by Open MPI])
AC_MSG_ERROR([cannot continue])])

CPPFLAGS=$opal_external_pmix_save_CPPFLAGS
Expand All @@ -371,5 +367,10 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
AC_DEFINE_UNQUOTED([OPAL_PMIX_V1],[$opal_external_have_pmix1],
[Whether the external PMIx library is v1])
AM_CONDITIONAL([OPAL_WANT_PRUN], [test "$opal_prun_happy" = "yes"])

AS_IF([test "$opal_external_pmix_version" = "1x"],
[OPAL_SUMMARY_ADD([[Miscellaneous]],[[PMIx support]], [opal_pmix], [1.2.x: WARNING - DYNAMIC OPS NOT SUPPORTED])],
[OPAL_SUMMARY_ADD([[Miscellaneous]],[[PMIx support]], [opal_pmix], [$opal_external_pmix_version])])

OPAL_VAR_SCOPE_POP
])
7 changes: 7 additions & 0 deletions opal/mca/pmix/pmix2x/pmix/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ example, a bug might be fixed in the master, and then moved to the
current release as well as the "stable" bug fix release branch.


2.1.3 -- TBD
----------------------
- Fixed memory corruption bug in event notification
system due to uninitialized variable
- Add numeric version definition


2.1.2 -- 6 July 2018
----------------------
- Added PMIX_VERSION_RELEASE string to pmix_version.h
Expand Down
10 changes: 5 additions & 5 deletions opal/mca/pmix/pmix2x/pmix/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@

major=2
minor=1
release=2
release=3

# greek is used for alpha or beta release tags. If it is non-empty,
# it will be appended to the version number. It does not have to be
# numeric. Common examples include a1 (alpha release 1), b1 or (beta release 1).
# The only requirement is that it must be entirely printable ASCII
# characters and have no white space.

greek=
greek=rc1

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

repo_rev=git8b0bc1f
repo_rev=git1b0b577

# 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="Jul 06, 2018"
date="Jul 19, 2018"

# The shared library version of each of PMIx's public libraries.
# These versions are maintained in accordance with the "Library
Expand Down Expand Up @@ -75,6 +75,6 @@ date="Jul 06, 2018"
# Version numbers are described in the Libtool current:revision:age
# format.

libpmix_so_version=3:12:1
libpmix_so_version=3:13:1
libpmi_so_version=1:0:0
libpmi2_so_version=1:0:0
2 changes: 1 addition & 1 deletion opal/mca/pmix/pmix2x/pmix/contrib/pmix.spec
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@

Summary: An extended/exascale implementation of PMI
Name: %{?_name:%{_name}}%{!?_name:pmix}
Version: 2.1.2
Version: 2.1.3rc1
Release: 1%{?dist}
License: BSD
Group: Development/Libraries
Expand Down
4 changes: 4 additions & 0 deletions opal/mca/pmix/pmix2x/pmix/include/pmix_version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) 2016 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2018 IBM Corporation. All rights reserved.
* Copyright (c) 2018 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -17,4 +18,7 @@
#define PMIX_VERSION_MAJOR @pmixmajor@
#define PMIX_VERSION_MINOR @pmixminor@
#define PMIX_VERSION_RELEASE @pmixrelease@

#define PMIX_NUMERIC_VERSION 0x00020103

#endif
10 changes: 5 additions & 5 deletions opal/mca/pmix/pmix2x/pmix/src/event/pmix_event_notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ static pmix_status_t notify_server_of_event(pmix_status_t status,
for (n=0; n < cd->ninfo; n++) {
PMIX_INFO_XFER(&cd->info[n], &chain->info[n]);
if (0 == strncmp(cd->info[n].key, PMIX_EVENT_NON_DEFAULT, PMIX_MAX_KEYLEN)) {
cd->nondefault = true;
chain->nondefault = true;
cd->nondefault = PMIX_INFO_TRUE(&info[n]);
chain->nondefault = cd->nondefault;
} else if (0 == strncmp(cd->info[n].key, PMIX_EVENT_CUSTOM_RANGE, PMIX_MAX_KEYLEN)) {
/* provides an array of pmix_proc_t identifying the procs
* that are to receive this notification, or a single pmix_proc_t */
Expand Down Expand Up @@ -972,8 +972,8 @@ static void _notify_client_event(int sd, short args, void *cbdata)
for (n=0; n < cd->ninfo; n++) {
PMIX_INFO_XFER(&chain->info[n], &cd->info[n]);
if (0 == strncmp(cd->info[n].key, PMIX_EVENT_NON_DEFAULT, PMIX_MAX_KEYLEN)) {
cd->nondefault = true;
chain->nondefault = true;
cd->nondefault = PMIX_INFO_TRUE(&cd->info[n]);
chain->nondefault = cd->nondefault;
} else if (0 == strncmp(cd->info[n].key, PMIX_EVENT_CUSTOM_RANGE, PMIX_MAX_KEYLEN)) {
/* provides an array of pmix_proc_t identifying the procs
* that are to receive this notification, or a single pmix_proc_t */
Expand Down Expand Up @@ -1087,7 +1087,7 @@ pmix_status_t pmix_server_notify_client_of_event(pmix_status_t status,
if (NULL != info) {
for (n=0; n < ninfo; n++) {
if (0 == strncmp(info[n].key, PMIX_EVENT_NON_DEFAULT, PMIX_MAX_KEYLEN)) {
cd->nondefault = true;
cd->nondefault = PMIX_INFO_TRUE(&info[n]);
} else if (0 == strncmp(info[n].key, PMIX_EVENT_CUSTOM_RANGE, PMIX_MAX_KEYLEN)) {
/* provides an array of pmix_proc_t identifying the procs
* that are to receive this notification, or a single pmix_proc_t */
Expand Down
10 changes: 5 additions & 5 deletions opal/mca/pmix/pmix2x/pmix/src/event/pmix_event_registration.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
Expand Down Expand Up @@ -391,11 +391,11 @@ static void check_cached_events(pmix_rshift_caddy_t *cd)
chain->status = ncd->status;
(void)strncpy(chain->source.nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN);
chain->source.rank = pmix_globals.myid.rank;
/* we already left space for evhandler name plus
* a callback object when we cached the notification */
chain->ninfo = ncd->ninfo;
PMIX_INFO_CREATE(chain->info, chain->ninfo);
/* we always leave space for event hdlr name and a callback object */
chain->nallocated = ncd->ninfo + 2;
PMIX_INFO_CREATE(chain->info, chain->nallocated);
if (0 < cd->ninfo) {
chain->ninfo = ncd->ninfo;
/* need to copy the info */
for (n=0; n < ncd->ninfo; n++) {
PMIX_INFO_XFER(&chain->info[n], &ncd->info[n]);
Expand Down
7 changes: 5 additions & 2 deletions opal/mca/pmix/pmix2x/pmix2x.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,16 @@ void pmix2x_event_hdlr(size_t evhdlr_registration_id,
}

/* convert the array of info */
if (NULL != info) {
if (NULL != info && 0 < ninfo) {
cd->info = OBJ_NEW(opal_list_t);
for (n=0; n < ninfo; n++) {
iptr = OBJ_NEW(opal_value_t);
/* ensure that this key is NULL terminated */
info[n].key[PMIX_MAX_KEYLEN] = '\0';
iptr->key = strdup(info[n].key);
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) {
OPAL_ERROR_LOG(rc);
opal_output(0, "KEY %s FAILED VALUE TRANSLATION", info[n].key);
OBJ_RELEASE(iptr);
continue;
}
Expand All @@ -332,7 +335,7 @@ void pmix2x_event_hdlr(size_t evhdlr_registration_id,
}

/* convert the array of prior results */
if (NULL != results) {
if (NULL != results && 0 < nresults) {
for (n=0; n < nresults; n++) {
iptr = OBJ_NEW(opal_value_t);
iptr->key = strdup(results[n].key);
Expand Down
20 changes: 20 additions & 0 deletions orte/orted/pmix/pmix_server_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,17 @@ void pmix_server_notify(int status, orte_process_name_t* sender,
}
}

/* protect against infinite loops by marking that this notification was
* passed down to the server by me */
if (NULL == cd->info) {
cd->info = OBJ_NEW(opal_list_t);
}
val = OBJ_NEW(opal_value_t);
val->key = strdup("orte.notify.donotloop");
val->type = OPAL_BOOL;
val->data.flag = true;
opal_list_append(cd->info, &val->super);

opal_output_verbose(2, orte_pmix_server_globals.output,
"%s NOTIFYING PMIX SERVER OF STATUS %d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ret);
Expand All @@ -382,6 +393,14 @@ int pmix_server_notify_event(int code, opal_process_name_t *source,
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ORTE_NAME_PRINT(source), code);

/* check to see if this is one we sent down */
OPAL_LIST_FOREACH(val, info, opal_value_t) {
if (0 == strcmp(val->key, "orte.notify.donotloop")) {
/* yep - do not process */
goto done;
}
}

/* a local process has generated an event - we need to xcast it
* to all the daemons so it can be passed down to their local
* procs */
Expand Down Expand Up @@ -448,6 +467,7 @@ int pmix_server_notify_event(int code, opal_process_name_t *source,
/* maintain accounting */
OBJ_RELEASE(sig);

done:
/* execute the callback */
if (NULL != cbfunc) {
cbfunc(ORTE_SUCCESS, cbdata);
Expand Down