Skip to content

v3.1.x: Sync to PMIx v2.1.1 #4831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2018
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
12 changes: 12 additions & 0 deletions opal/mca/pmix/pmix2x/pmix/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ 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.1 -- 23 Feb 2018
----------------------
- Fix direct modex when receiving new nspace
- Resolve direct modex of job-level info
- Fix a bug in attribute configuration checks
- Fix a couple of bugs in unpacking of direct modex job-level data
- Correcly handle application setup data during "instant on" launch
- add a PMIX_BYTE_OBJECT_LOAD convenience macro
- Fix two early "free" bugs
- Add an example PMI-1 client program


2.1.0 -- 1 Feb 2018
----------------------
**** NOTE: This release contains the first implementation of cross-version
Expand Down
8 changes: 4 additions & 4 deletions opal/mca/pmix/pmix2x/pmix/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

major=2
minor=1
release=0
release=1

# 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
Expand All @@ -30,7 +30,7 @@ greek=
# command, or with the date (if "git describe" fails) in the form of
# "date<date>".

repo_rev=git79b2db3
repo_rev=git30cbf9f

# 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="Feb 01, 2018"
date="Feb 18, 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="Feb 01, 2018"
# Version numbers are described in the Libtool current:revision:age
# format.

libpmix_so_version=3:10:1
libpmix_so_version=3:11:1
libpmi_so_version=1:0:0
libpmi2_so_version=1:0:0
25 changes: 23 additions & 2 deletions opal/mca/pmix/pmix2x/pmix/config/pmix_check_attributes.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- shell-script -*-
# PMIx copyrights:
# Copyright (c) 2013 Intel, Inc. All rights reserved
# Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
#
#########################
#
Expand All @@ -15,7 +15,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
# Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2010-2018 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
# Copyright (c) 2015 Intel, Inc. All rights reserved.
Expand Down Expand Up @@ -170,6 +170,8 @@ AC_DEFUN([PMIX_CHECK_ATTRIBUTES], [
pmix_cv___attribute__visibility=0
pmix_cv___attribute__warn_unused_result=0
pmix_cv___attribute__destructor=0
pmix_cv___attribute__optnone=0
pmix_cv___attribute__extension=0
else
AC_MSG_RESULT([yes])

Expand Down Expand Up @@ -486,6 +488,21 @@ AC_DEFUN([PMIX_CHECK_ATTRIBUTES], [
],
[],
[])

_PMIX_CHECK_SPECIFIC_ATTRIBUTE([optnone],
[
void __attribute__ ((__optnone__)) foo(void);
void foo(void) { return ; }
],
[],
[])

_PMIX_CHECK_SPECIFIC_ATTRIBUTE([extension],
[
int i = __extension__ 3;
],
[],
[])
fi

# Now that all the values are set, define them
Expand Down Expand Up @@ -536,4 +553,8 @@ AC_DEFUN([PMIX_CHECK_ATTRIBUTES], [
[Whether your compiler has __attribute__ weak alias or not])
AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_DESTRUCTOR, [$pmix_cv___attribute__destructor],
[Whether your compiler has __attribute__ destructor or not])
AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_OPTNONE, [$pmix_cv___attribute__optnone],
[Whether your compiler has __attribute__ optnone or not])
AC_DEFINE_UNQUOTED(PMIX_HAVE_ATTRIBUTE_EXTENSION, [$pmix_cv___attribute__extension],
[Whether your compiler has __attribute__ extension or not])
])
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.0
Version: 2.1.1
Release: 1%{?dist}
License: BSD
Group: Development/Libraries
Expand Down
1 change: 0 additions & 1 deletion opal/mca/pmix/pmix2x/pmix/contrib/pmix_jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -395,4 +395,3 @@ if [ -n "$JENKINS_RUN_TESTS" -a "$JENKINS_RUN_TESTS" -ne "0" ]; then
set -e
fi
fi

22 changes: 22 additions & 0 deletions opal/mca/pmix/pmix2x/pmix/include/pmix_common.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,20 @@ typedef struct pmix_byte_object {
char *bytes;
size_t size;
} pmix_byte_object_t;
#define PMIX_BYTE_OBJECT_CREATE(m, n) \
do { \
(m) = (pmix_byte_object_t*)malloc((n) * sizeof(pmix_byte_object_t)); \
if (NULL != (m)) { \
memset((m), 0, (n)*sizeof(pmix_byte_object_t)); \
} \
} while(0)

#define PMIX_BYTE_OBJECT_CONSTRUCT(m) \
do { \
(m)->bytes = NULL; \
(m)->size = 0; \
} while(0)

#define PMIX_BYTE_OBJECT_DESTRUCT(m) \
do { \
if (NULL != (m)->bytes) { \
Expand All @@ -773,6 +787,14 @@ typedef struct pmix_byte_object {
free((m)); \
} while(0)

#define PMIX_BYTE_OBJECT_LOAD(b, d, s) \
do { \
(b)->bytes = (d); \
(d) = NULL; \
(b)->size = (s); \
(s) = 0; \
} while(0)


/**** PMIX DATA BUFFER ****/
typedef struct pmix_data_buffer {
Expand Down
14 changes: 7 additions & 7 deletions opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_pub.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) 2014-2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014 Artem Y. Polyakov <[email protected]>.
Expand Down Expand Up @@ -564,15 +564,19 @@ static void wait_lookup_cbfunc(struct pmix_peer_t *pr,
pmix_cb_t *cb = (pmix_cb_t*)cbdata;
pmix_status_t rc, ret;
int32_t cnt;
pmix_pdata_t *pdata = NULL;
size_t ndata = 0;
pmix_pdata_t *pdata;
size_t ndata;

PMIX_ACQUIRE_OBJECT(cb);

pmix_output_verbose(2, pmix_globals.debug_output,
"pmix:client recv callback activated with %d bytes",
(NULL == buf) ? -1 : (int)buf->bytes_used);

/* set the defaults */
pdata = NULL;
ndata = 0;

if (NULL == cb->cbfunc.lookupfn) {
/* nothing we can do with this */
PMIX_RELEASE(cb);
Expand All @@ -589,10 +593,6 @@ static void wait_lookup_cbfunc(struct pmix_peer_t *pr,
goto report;
}

/* set the defaults */
pdata = NULL;
ndata = 0;

/* unpack the returned status */
cnt = 1;
PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver,
Expand Down
2 changes: 2 additions & 0 deletions opal/mca/pmix/pmix2x/pmix/src/include/pmix_globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ BEGIN_C_DECLS

/* internal-only attributes */
#define PMIX_BFROPS_MODULE "pmix.bfrops.mod" // (char*) name of bfrops plugin in-use by a given nspace
#define PMIX_PNET_SETUP_APP "pmix.pnet.setapp" // (pmix_byte_object_t) blob containing info to be given to
// pnet framework on remote nodes

/* define an internal-only process name that has
* a dynamically-sized nspace field to save memory */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2016 Intel, Inc. All rights reserved
* Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -315,7 +315,7 @@ int pmix_mca_base_var_group_component_register (const pmix_mca_base_component_t
const char *description)
{
/* 1.7 components do not store the project */
return group_register (NULL, component->pmix_mca_type_name,
return group_register (component->pmix_mca_project_name, component->pmix_mca_type_name,
component->pmix_mca_component_name, description);
}

Expand Down
27 changes: 9 additions & 18 deletions opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/gds_dstore.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
* Copyright (c) 2016 IBM Corporation. All rights reserved.
* Copyright (c) 2016-2017 Mellanox Technologies, Inc.
* All rights reserved.
Expand Down Expand Up @@ -2995,44 +2995,35 @@ static pmix_status_t dstore_store_modex(struct pmix_nspace_t *nspace,
pmix_byte_object_t *bo)
{
pmix_nspace_t *ns = (pmix_nspace_t*)nspace;
pmix_server_caddy_t *scd;
pmix_status_t rc = PMIX_SUCCESS;
int32_t cnt;
pmix_buffer_t pbkt;
pmix_proc_t proc;
pmix_kval_t *kv;
pmix_peer_t *peer;

pmix_output_verbose(2, pmix_gds_base_framework.framework_output,
"[%s:%d] gds:dstore:store_modex for nspace %s",
pmix_globals.myid.nspace, pmix_globals.myid.rank,
ns->nspace);

/* NOTE: THE BYTE OBJECT DELIVERED HERE WAS CONSTRUCTED
* BY A SERVER, AND IS THEREFORE PACKED USING THE SERVER'S
* PEER OBJECT (WHICH IS REQUIRED TO BE THE SAME AS OUR OWN) */

/* this is data returned via the PMIx_Fence call when
* data collection was requested, so it only contains
* REMOTE/GLOBAL data. The byte object contains
* the rank followed by pmix_kval_t's. The list of callbacks
* contains all local participants. */
peer = NULL;
PMIX_LIST_FOREACH(scd, cbs, pmix_server_caddy_t) {
if (scd->peer->nptr == ns) {
peer = scd->peer;
break;
}
}
if (NULL == peer) {
/* we can ignore this one */
return PMIX_SUCCESS;
}

/* setup the byte object for unpacking */
PMIX_CONSTRUCT(&pbkt, pmix_buffer_t);
/* the next step unfortunately NULLs the byte object's
* entries, so we need to ensure we restore them! */
PMIX_LOAD_BUFFER(peer, &pbkt, bo->bytes, bo->size);
PMIX_LOAD_BUFFER(pmix_globals.mypeer, &pbkt, bo->bytes, bo->size);
/* unload the proc that provided this data */
cnt = 1;
PMIX_BFROPS_UNPACK(rc, peer, &pbkt, &proc, &cnt, PMIX_PROC);
PMIX_BFROPS_UNPACK(rc, pmix_globals.mypeer, &pbkt, &proc, &cnt, PMIX_PROC);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
bo->bytes = pbkt.base_ptr;
Expand All @@ -3052,7 +3043,7 @@ static pmix_status_t dstore_store_modex(struct pmix_nspace_t *nspace,
/* unpack the remaining values until we hit the end of the buffer */
cnt = 1;
kv = PMIX_NEW(pmix_kval_t);
PMIX_BFROPS_UNPACK(rc, peer, &pbkt, kv, &cnt, PMIX_KVAL);
PMIX_BFROPS_UNPACK(rc, pmix_globals.mypeer, &pbkt, kv, &cnt, PMIX_KVAL);
while (PMIX_SUCCESS == rc) {
/* store this in the hash table */
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer, &proc, PMIX_REMOTE, kv);
Expand All @@ -3071,7 +3062,7 @@ static pmix_status_t dstore_store_modex(struct pmix_nspace_t *nspace,
/* continue along */
kv = PMIX_NEW(pmix_kval_t);
cnt = 1;
PMIX_BFROPS_UNPACK(rc, peer, &pbkt, kv, &cnt, PMIX_KVAL);
PMIX_BFROPS_UNPACK(rc, pmix_globals.mypeer, &pbkt, kv, &cnt, PMIX_KVAL);
}
PMIX_RELEASE(kv); // maintain accounting
if (PMIX_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ static pmix_status_t resolve_nodes(const char *nspace,
pmix_proc_t proc;

cb = PMIX_NEW(pmix_cb_t);
cb->pname.nspace = (char*)nspace;
cb->pname.nspace = strdup(nspace);

PMIX_THREADSHIFT(cb, _resolve_nodes);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ void pmix_ptl_base_lost_connection(pmix_peer_t *peer, pmix_status_t err)
}
/* reduce the number of local procs */
--peer->nptr->nlocalprocs;
/* now decrease the refcount - might actually free the object */
PMIX_RELEASE(peer->info);

/* remove this client from our array */
pmix_pointer_array_set_item(&pmix_server_globals.clients,
peer->index, NULL);
Expand All @@ -148,6 +147,10 @@ void pmix_ptl_base_lost_connection(pmix_peer_t *peer, pmix_status_t err)
* an event. If not, then we do */
PMIX_REPORT_EVENT(err, peer, PMIX_RANGE_NAMESPACE, _notify_complete);
}
/* now decrease the refcount - might actually free the object */
PMIX_RELEASE(peer->info);

/* Release peer info */
PMIX_RELEASE(peer);
} else {
/* if I am a client, there is only
Expand Down
29 changes: 20 additions & 9 deletions opal/mca/pmix/pmix2x/pmix/src/server/pmix_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,11 +1256,12 @@ static void _setup_op(pmix_status_t rc, void *cbdata)
static void _setup_app(int sd, short args, void *cbdata)
{
pmix_setup_caddy_t *cd = (pmix_setup_caddy_t*)cbdata;
pmix_buffer_t buffer;
pmix_byte_object_t blob;
pmix_setup_caddy_t *fcd = NULL;
pmix_status_t rc;
pmix_list_t ilist;
pmix_kval_t *kv;
size_t n;

PMIX_ACQUIRE_OBJECT(cd);

Expand All @@ -1279,21 +1280,31 @@ static void _setup_app(int sd, short args, void *cbdata)
goto depart;
}

/* if anything came back, construct the info array */
if (0 < (fcd->ninfo = pmix_list_get_size(&ilist))) {
PMIX_INFO_CREATE(fcd->info, fcd->ninfo);
n = 0;
/* if anything came back, construct the blob */
if (0 < pmix_list_get_size(&ilist)) {
PMIX_CONSTRUCT(&buffer, pmix_buffer_t);
PMIX_LIST_FOREACH(kv, &ilist, pmix_kval_t) {
(void)strncpy(fcd->info[n].key, kv->key, PMIX_MAX_KEYLEN);
PMIX_BFROPS_VALUE_XFER(rc, pmix_globals.mypeer,
&fcd->info[n].value, kv->value);
PMIX_BFROPS_PACK(rc, pmix_globals.mypeer, &buffer, kv, 1, PMIX_KVAL);
if (PMIX_SUCCESS != rc) {
PMIX_INFO_FREE(fcd->info, fcd->ninfo);
PMIX_DESTRUCT(&blob);
PMIX_RELEASE(fcd);
fcd = NULL;
goto depart;
}
}
PMIX_INFO_CREATE(fcd->info, 1);
if (NULL == fcd->info) {
PMIX_DESTRUCT(&blob);
PMIX_RELEASE(fcd);
fcd = NULL;
goto depart;
}
fcd->ninfo = 1;
PMIX_BYTE_OBJECT_CONSTRUCT(&blob);
PMIX_BYTE_OBJECT_LOAD(&blob, buffer.base_ptr, buffer.bytes_used);
PMIX_DESTRUCT(&buffer);
PMIX_INFO_LOAD(&fcd->info[0], PMIX_PNET_SETUP_APP, &blob, PMIX_BYTE_OBJECT);
PMIX_BYTE_OBJECT_DESTRUCT(&blob);
}

depart:
Expand Down
Loading