Skip to content

Commit 867b586

Browse files
authored
Merge pull request #5690 from rhc54/cmr31/pmix214
v3.1.x: Update to PMIx v2.1.4
2 parents f9b6e5f + 9411a27 commit 867b586

File tree

25 files changed

+813
-367
lines changed

25 files changed

+813
-367
lines changed

opal/mca/pmix/pmix2x/pmix/NEWS

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,24 @@ example, a bug might be fixed in the master, and then moved to the
2121
current release as well as the "stable" bug fix release branch.
2222

2323

24-
2.1.3 -- TBD
24+
2.1.4 -- 18 Sep 2018
25+
----------------------
26+
- Updated configury to silence warnings on older compilers
27+
- Implement job control and sensor APIs
28+
- Update sensor support
29+
- Fix a few bugs in the event notification system and provide some
30+
missing implementation (support for specifying target procs to
31+
receive the event).
32+
- Add PMIX_PROC_TERMINATED constant
33+
- Properly deal with EOPNOTSUPP from getsockopt() on ARM
34+
35+
36+
2.1.3 -- 23 Aug 2018
2537
----------------------
2638
- Fixed memory corruption bug in event notification
2739
system due to uninitialized variable
2840
- Add numeric version definition
41+
- Transfer all cached data to client dstore upon first connect
2942

3043

3144
2.1.2 -- 6 July 2018

opal/mca/pmix/pmix2x/pmix/VERSION

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515

1616
major=2
1717
minor=1
18-
release=3
18+
release=4
1919

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

26-
greek=rc1
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=git1b0b577
33+
repo_rev=git1d605654
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="Jul 19, 2018"
47+
date="Sep 18, 2018"
4848

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

78-
libpmix_so_version=3:13:1
78+
libpmix_so_version=3:14:1
7979
libpmi_so_version=1:0:0
8080
libpmi2_so_version=1:0:0

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

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,52 +25,44 @@ dnl $HEADER$
2525
dnl
2626

2727
AC_DEFUN([PMIX_CC_HELPER],[
28-
PMIX_VAR_SCOPE_PUSH([pmix_prog_cc_c11_helper_tmp])
28+
PMIX_VAR_SCOPE_PUSH([pmix_cc_helper_result])
2929
AC_MSG_CHECKING([$1])
3030

31-
pmix_prog_cc_c11_helper_tmp=0
31+
AC_LINK_IFELSE([AC_LANG_PROGRAM([$3],[$4])],
32+
[$2=1
33+
pmix_cc_helper_result=yes],
34+
[$2=0
35+
pmix_cc_helper_result=no])
3236

33-
AC_LINK_IFELSE([AC_LANG_PROGRAM([$3],[$4])],[
34-
$2=yes
35-
pmix_prog_cc_c11_helper_tmp=1], [$2=no])
36-
37-
AC_DEFINE_UNQUOTED([$5], [$pmix_prog_cc_c11_helper_tmp], [$6])
38-
39-
AC_MSG_RESULT([$$2])
37+
AC_MSG_RESULT([$pmix_cc_helper_result])
4038
PMIX_VAR_SCOPE_POP
4139
])
4240

4341

4442
AC_DEFUN([PMIX_PROG_CC_C11_HELPER],[
45-
PMIX_VAR_SCOPE_PUSH([pmix_prog_cc_c11_helper_CFLAGS_save pmix_prog_cc_c11_helper__Thread_local_available pmix_prog_cc_c11_helper_atomic_var_available pmix_prog_cc_c11_helper__Atomic_available pmix_prog_cc_c11_helper__static_assert_available pmix_prog_cc_c11_helper__Generic_available])
43+
PMIX_VAR_SCOPE_PUSH([pmix_prog_cc_c11_helper_CFLAGS_save])
4644

4745
pmix_prog_cc_c11_helper_CFLAGS_save=$CFLAGS
4846
CFLAGS="$CFLAGS $1"
4947

5048
PMIX_CC_HELPER([if $CC $1 supports C11 _Thread_local], [pmix_prog_cc_c11_helper__Thread_local_available],
51-
[],[[static _Thread_local int foo = 1;++foo;]], [PMIX_C_HAVE__THREAD_LOCAL],
52-
[Whether C compiler supports __Thread_local])
49+
[],[[static _Thread_local int foo = 1;++foo;]])
5350

5451
PMIX_CC_HELPER([if $CC $1 supports C11 atomic variables], [pmix_prog_cc_c11_helper_atomic_var_available],
55-
[[#include <stdatomic.h>]], [[static atomic_long foo = 1;++foo;]], [PMIX_C_HAVE_ATOMIC_CONV_VAR],
56-
[Whether C compiler support atomic convenience variables in stdatomic.h])
52+
[[#include <stdatomic.h>]], [[static atomic_long foo = 1;++foo;]])
5753

5854
PMIX_CC_HELPER([if $CC $1 supports C11 _Atomic keyword], [pmix_prog_cc_c11_helper__Atomic_available],
59-
[[#include <stdatomic.h>]],[[static _Atomic long foo = 1;++foo;]], [PMIX_C_HAVE__ATOMIC],
60-
[Whether C compiler supports __Atomic keyword])
55+
[[#include <stdatomic.h>]],[[static _Atomic long foo = 1;++foo;]])
6156

6257
PMIX_CC_HELPER([if $CC $1 supports C11 _Generic keyword], [pmix_prog_cc_c11_helper__Generic_available],
63-
[[#define FOO(x) (_Generic (x, int: 1))]], [[static int x, y; y = FOO(x);]], [PMIX_C_HAVE__GENERIC],
64-
[Whether C compiler supports __Generic keyword])
58+
[[#define FOO(x) (_Generic (x, int: 1))]], [[static int x, y; y = FOO(x);]])
6559

6660
PMIX_CC_HELPER([if $CC $1 supports C11 _Static_assert], [pmix_prog_cc_c11_helper__static_assert_available],
67-
[[#include <stdint.h>]],[[_Static_assert(sizeof(int64_t) == 8, "WTH");]], [PMIX_C_HAVE__STATIC_ASSERT],
68-
[Whether C compiler support _Static_assert keyword])
61+
[[#include <stdint.h>]],[[_Static_assert(sizeof(int64_t) == 8, "WTH");]])
6962

70-
dnl At this time Open MPI only needs thread local and the atomic convenience types for C11 support. These
71-
dnl will likely be required in the future.
72-
AS_IF([test "x$pmix_prog_cc_c11_helper__Thread_local_available" = "xyes" && test "x$pmix_prog_cc_c11_helper_atomic_var_available" = "xyes"],
73-
[$2], [$3])
63+
AS_IF([test $pmix_prog_cc_c11_helper__Thread_local_available -eq 1 && test $pmix_prog_cc_c11_helper_atomic_var_available -eq 1],
64+
[$2],
65+
[$3])
7466

7567
CFLAGS=$pmix_prog_cc_c11_helper_CFLAGS_save
7668

@@ -136,6 +128,8 @@ AC_DEFUN([PMIX_SETUP_CC],[
136128
AC_REQUIRE([_PMIX_PROG_CC])
137129
AC_REQUIRE([AM_PROG_CC_C_O])
138130

131+
PMIX_VAR_SCOPE_PUSH([pmix_prog_cc_c11_helper__Thread_local_available pmix_prog_cc_c11_helper_atomic_var_available pmix_prog_cc_c11_helper__Atomic_available pmix_prog_cc_c11_helper__static_assert_available pmix_prog_cc_c11_helper__Generic_available pmix_prog_cc__thread_available])
132+
139133
PMIX_PROG_CC_C11
140134

141135
if test $pmix_cv_c11_supported = no ; then
@@ -157,11 +151,32 @@ AC_DEFUN([PMIX_SETUP_CC],[
157151
fi
158152

159153
# Check if compiler support __thread
160-
PMIX_VAR_SCOPE_PUSH([pmix_prog_cc__thread_available])
161154
PMIX_CC_HELPER([if $CC $1 supports __thread], [pmix_prog_cc__thread_available],
162-
[],[[static __thread int foo = 1;++foo;]], [PMIX_C_HAVE___THREAD],
163-
[Whether C compiler supports __thread])
164-
PMIX_VAR_SCOPE_POP
155+
[],[[static __thread int foo = 1;++foo;]])
156+
157+
158+
PMIX_CC_HELPER([if $CC $1 supports C11 _Thread_local], [pmix_prog_cc_c11_helper__Thread_local_available],
159+
[],[[static _Thread_local int foo = 1;++foo;]])
160+
161+
dnl At this time, PMIx only needs thread local and the atomic convenience tyes for C11 suport. These
162+
dnl will likely be required in the future.
163+
AC_DEFINE_UNQUOTED([PMIX_C_HAVE__THREAD_LOCAL], [$pmix_prog_cc_c11_helper__Thread_local_available],
164+
[Whether C compiler supports __Thread_local])
165+
166+
AC_DEFINE_UNQUOTED([PMIX_C_HAVE_ATOMIC_CONV_VAR], [$pmix_prog_cc_c11_helper_atomic_var_available],
167+
[Whether C compiler supports atomic convenience variables in stdatomic.h])
168+
169+
AC_DEFINE_UNQUOTED([PMIX_C_HAVE__ATOMIC], [$pmix_prog_cc_c11_helper__Atomic_available],
170+
[Whether C compiler supports __Atomic keyword])
171+
172+
AC_DEFINE_UNQUOTED([PMIX_C_HAVE__GENERIC], [$pmix_prog_cc_c11_helper__Generic_available],
173+
[Whether C compiler supports __Generic keyword])
174+
175+
AC_DEFINE_UNQUOTED([PMIX_C_HAVE__STATIC_ASSERT], [$pmix_prog_cc_c11_helper__static_assert_available],
176+
[Whether C compiler supports _Static_assert keyword])
177+
178+
AC_DEFINE_UNQUOTED([PMIX_C_HAVE___THREAD], [$pmix_prog_cc__thread_available],
179+
[Whether C compiler supports __thread])
165180

166181
PMIX_C_COMPILER_VENDOR([pmix_c_vendor])
167182

@@ -456,6 +471,7 @@ AC_DEFUN([PMIX_SETUP_CC],[
456471
PMIX_ENSURE_CONTAINS_OPTFLAGS(["$CFLAGS"])
457472
AC_MSG_RESULT([$co_result])
458473
CFLAGS="$co_result"
474+
PMIX_VAR_SCOPE_POP
459475
])
460476

461477

opal/mca/pmix/pmix2x/pmix/contrib/pmix.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192

193193
Summary: An extended/exascale implementation of PMI
194194
Name: %{?_name:%{_name}}%{!?_name:pmix}
195-
Version: 2.1.3rc1
195+
Version: 2.1.4
196196
Release: 1%{?dist}
197197
License: BSD
198198
Group: Development/Libraries

opal/mca/pmix/pmix2x/pmix/include/pmix_common.h.in

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ typedef int pmix_status_t;
591591
/* monitoring */
592592
#define PMIX_MONITOR_HEARTBEAT_ALERT (PMIX_ERR_V2X_BASE - 9)
593593
#define PMIX_MONITOR_FILE_ALERT (PMIX_ERR_V2X_BASE - 10)
594+
#define PMIX_PROC_TERMINATED (PMIX_ERR_V2X_BASE - 11)
594595

595596
/* define a starting point for operational error constants so
596597
* we avoid renumbering when making additions */
@@ -602,6 +603,9 @@ typedef int pmix_status_t;
602603
#define PMIX_ERR_UPDATE_ENDPOINTS (PMIX_ERR_OP_BASE - 16)
603604
#define PMIX_MODEL_DECLARED (PMIX_ERR_OP_BASE - 17)
604605
#define PMIX_GDS_ACTION_COMPLETE (PMIX_ERR_OP_BASE - 18)
606+
/* gap created by v3 definitions */
607+
#define PMIX_OPERATION_SUCCEEDED (PMIX_ERR_OP_BASE - 27)
608+
/* gap for group codes */
605609

606610
/* define a starting point for system error constants so
607611
* we avoid renumbering when making additions */
@@ -750,6 +754,19 @@ typedef uint8_t pmix_alloc_directive_t;
750754
#define PMIX_ALLOC_EXTERNAL 128
751755

752756

757+
/* declare a convenience macro for checking keys */
758+
#define PMIX_CHECK_KEY(a, b) \
759+
(0 == strncmp((a)->key, (b), PMIX_MAX_KEYLEN))
760+
761+
/* define a convenience macro for checking nspaces */
762+
#define PMIX_CHECK_NSPACE(a, b) \
763+
(0 == strncmp((a), (b), PMIX_MAX_NSLEN))
764+
765+
/* define a convenience macro for checking names */
766+
#define PMIX_CHECK_PROCID(a, b) \
767+
(PMIX_CHECK_NSPACE((a)->nspace, (b)->nspace) && ((a)->rank == (b)->rank || (PMIX_RANK_WILDCARD == (a)->rank || PMIX_RANK_WILDCARD == (b)->rank)))
768+
769+
753770
/**** PMIX BYTE OBJECT ****/
754771
typedef struct pmix_byte_object {
755772
char *bytes;
@@ -1086,11 +1103,11 @@ struct pmix_info_t {
10861103
(void)strncpy((m)->key, (k), PMIX_MAX_KEYLEN); \
10871104
pmix_value_load(&((m)->value), (v), (t)); \
10881105
} while (0)
1089-
#define PMIX_INFO_XFER(d, s) \
1090-
do { \
1091-
(void)strncpy((d)->key, (s)->key, PMIX_MAX_KEYLEN); \
1092-
(d)->flags = (s)->flags; \
1093-
pmix_value_xfer(&(d)->value, &(s)->value); \
1106+
#define PMIX_INFO_XFER(d, s) \
1107+
do { \
1108+
(void)strncpy((d)->key, (s)->key, PMIX_MAX_KEYLEN); \
1109+
(d)->flags = (s)->flags; \
1110+
pmix_value_xfer(&(d)->value, (pmix_value_t*)&(s)->value); \
10941111
} while(0)
10951112

10961113
#define PMIX_INFO_REQUIRED(m) \

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,9 @@ static void pmix_client_notify_recv(struct pmix_peer_t *peer,
167167
PMIX_RELEASE(chain);
168168
goto error;
169169
}
170-
/* check for non-default flag */
171-
for (cnt=0; cnt < (int)ninfo; cnt++) {
172-
if (0 == strncmp(chain->info[cnt].key, PMIX_EVENT_NON_DEFAULT, PMIX_MAX_KEYLEN)) {
173-
chain->nondefault = PMIX_INFO_TRUE(&chain->info[cnt]);
174-
break;
175-
}
176-
}
177170
}
171+
/* prep the chain for processing */
172+
pmix_prep_event_chain(chain, chain->info, ninfo, false);
178173

179174
pmix_output_verbose(2, pmix_globals.debug_output,
180175
"[%s:%d] pmix:client_notify_recv - processing event %d, calling errhandler",

opal/mca/pmix/pmix2x/pmix/src/common/pmix_control.c

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
3+
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
44
* Copyright (c) 2016 Mellanox Technologies, Inc.
55
* All rights reserved.
66
* Copyright (c) 2016 IBM Corporation. All rights reserved.
@@ -84,7 +84,7 @@ static void query_cbfunc(struct pmix_peer_t *peer,
8484
/* unpack any returned data */
8585
cnt = 1;
8686
PMIX_BFROPS_UNPACK(rc, peer, buf, &results->ninfo, &cnt, PMIX_SIZE);
87-
if (PMIX_SUCCESS != rc) {
87+
if (PMIX_SUCCESS != rc && PMIX_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) {
8888
PMIX_ERROR_LOG(rc);
8989
goto complete;
9090
}
@@ -127,16 +127,10 @@ PMIX_EXPORT pmix_status_t PMIx_Job_control_nb(const pmix_proc_t targets[], size_
127127
return PMIX_ERR_INIT;
128128
}
129129

130-
/* if we aren't connected, don't attempt to send */
131-
if (!PMIX_PROC_IS_SERVER(pmix_globals.mypeer) && !pmix_globals.connected) {
132-
PMIX_RELEASE_THREAD(&pmix_global_lock);
133-
return PMIX_ERR_UNREACH;
134-
}
135-
PMIX_RELEASE_THREAD(&pmix_global_lock);
136-
137130
/* if we are the server, then we just issue the request and
138131
* return the response */
139132
if (PMIX_PROC_IS_SERVER(pmix_globals.mypeer)) {
133+
PMIX_RELEASE_THREAD(&pmix_global_lock);
140134
if (NULL == pmix_host_server.job_control) {
141135
/* nothing we can do */
142136
return PMIX_ERR_NOT_SUPPORTED;
@@ -150,6 +144,13 @@ PMIX_EXPORT pmix_status_t PMIx_Job_control_nb(const pmix_proc_t targets[], size_
150144
return rc;
151145
}
152146

147+
/* we need to send, so check for connection */
148+
if (!pmix_globals.connected) {
149+
PMIX_RELEASE_THREAD(&pmix_global_lock);
150+
return PMIX_ERR_UNREACH;
151+
}
152+
PMIX_RELEASE_THREAD(&pmix_global_lock);
153+
153154
/* if we are a client, then relay this request to the server */
154155
msg = PMIX_NEW(pmix_buffer_t);
155156
/* pack the cmd */
@@ -171,7 +172,7 @@ PMIX_EXPORT pmix_status_t PMIx_Job_control_nb(const pmix_proc_t targets[], size_
171172
}
172173
/* remember, the targets can be NULL to indicate that the operation
173174
* is to be done against all members of our nspace */
174-
if (0 < ntargets) {
175+
if (NULL != targets && 0 < ntargets) {
175176
/* pack the targets */
176177
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
177178
msg, targets, ntargets, PMIX_PROC);
@@ -190,7 +191,7 @@ PMIX_EXPORT pmix_status_t PMIx_Job_control_nb(const pmix_proc_t targets[], size_
190191
PMIX_RELEASE(msg);
191192
return rc;
192193
}
193-
if (0 < ndirs) {
194+
if (NULL != directives && 0 < ndirs) {
194195
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
195196
msg, directives, ndirs, PMIX_INFO);
196197
if (PMIX_SUCCESS != rc) {
@@ -237,16 +238,16 @@ PMIX_EXPORT pmix_status_t PMIx_Process_monitor_nb(const pmix_info_t *monitor, pm
237238
return PMIX_ERR_INIT;
238239
}
239240

240-
/* if we aren't connected, don't attempt to send */
241-
if (!PMIX_PROC_IS_SERVER(pmix_globals.mypeer) && !pmix_globals.connected) {
241+
/* sanity check */
242+
if (NULL == monitor) {
242243
PMIX_RELEASE_THREAD(&pmix_global_lock);
243-
return PMIX_ERR_UNREACH;
244+
return PMIX_ERR_BAD_PARAM;
244245
}
245-
PMIX_RELEASE_THREAD(&pmix_global_lock);
246246

247247
/* if we are the server, then we just issue the request and
248248
* return the response */
249249
if (PMIX_PROC_IS_SERVER(pmix_globals.mypeer)) {
250+
PMIX_RELEASE_THREAD(&pmix_global_lock);
250251
if (NULL == pmix_host_server.monitor) {
251252
/* nothing we can do */
252253
return PMIX_ERR_NOT_SUPPORTED;
@@ -258,6 +259,26 @@ PMIX_EXPORT pmix_status_t PMIx_Process_monitor_nb(const pmix_info_t *monitor, pm
258259
return rc;
259260
}
260261

262+
/* we need to send, so check for connection */
263+
if (!pmix_globals.connected) {
264+
PMIX_RELEASE_THREAD(&pmix_global_lock);
265+
return PMIX_ERR_UNREACH;
266+
}
267+
PMIX_RELEASE_THREAD(&pmix_global_lock);
268+
269+
/* if the monitor is PMIX_SEND_HEARTBEAT, then send it */
270+
if (0 == strncmp(monitor->key, PMIX_SEND_HEARTBEAT, PMIX_MAX_KEYLEN)) {
271+
msg = PMIX_NEW(pmix_buffer_t);
272+
if (NULL == msg) {
273+
return PMIX_ERR_NOMEM;
274+
}
275+
PMIX_PTL_SEND_ONEWAY(rc, pmix_client_globals.myserver, msg, PMIX_PTL_TAG_HEARTBEAT);
276+
if (PMIX_SUCCESS != rc) {
277+
PMIX_RELEASE(msg);
278+
}
279+
return rc;
280+
}
281+
261282
/* if we are a client, then relay this request to the server */
262283
msg = PMIX_NEW(pmix_buffer_t);
263284
/* pack the cmd */

0 commit comments

Comments
 (0)