Skip to content

Commit b6e825f

Browse files
authored
Merge pull request #4746 from karasevb/pmix21_update
Sync to PMIx v2.1.0
2 parents ed0b35e + 2fc5713 commit b6e825f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1026
-357
lines changed

opal/mca/pmix/pmix2x/pmix/NEWS

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
1+
Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
22
Copyright (c) 2017 IBM Corporation. All rights reserved.
33
$COPYRIGHT$
44

@@ -21,7 +21,7 @@ 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.0 -- 26 Oct 2017
24+
2.1.0 -- 1 Feb 2018
2525
----------------------
2626
**** NOTE: This release contains the first implementation of cross-version
2727
**** support. Servers using v2.1.0 are capable of supporting clients using
@@ -32,6 +32,30 @@ current release as well as the "stable" bug fix release branch.
3232
- Enable support for remote tool connections (PR #540, #542)
3333
- Cleanup libevent configure logi to support default install paths (PR #541)
3434
- Debounce "unreachable" notifications for tools when they disconnect (PR #544)
35+
- Enable the regex generator to support node names that include multiple
36+
sets of numbers
37+
38+
39+
2.0.3 -- 1 Feb 2018
40+
----------------------
41+
- Fix event notification so all sides of multi-library get notified
42+
of other library's existence
43+
- Update syslog protection to support Mac High Sierra OS
44+
- Remove usock component - unable to support v1.x clients due
45+
to datatype differences
46+
- Cleanup security handshake
47+
- Cleanup separation of PMI-1/2 libraries and PMIx symbols
48+
- Protect against overly-large messages
49+
- Update data buffer APIs to support cross-version operations
50+
- Protect receive callbacks from NULL and/or empty buffers as this
51+
can occur when the peer on a connection disappears.
52+
- Fix tool connection search so it properly descends into the directory
53+
tree while searching for the server's contact file.
54+
- Fix store_local so it doesn't reject a new nspace as that can happen
55+
when working with tools
56+
- Ensure we always complete PMIx_Finalize - don't return if something
57+
goes wrong in the middle of the procedure
58+
- Fix several tool connection issues
3559

3660

3761
2.0.2 -- 19 Oct 2017
@@ -115,6 +139,14 @@ current release as well as the "stable" bug fix release branch.
115139
and to themselves
116140

117141

142+
1.2.5 -- 1 Feb 2018
143+
----------------------
144+
- Fix cross-version issue when v1.2 client interacts with v2.1 server (PR #564)
145+
- Update client connection for cross-version support (PR #591)
146+
- Fix write memory barrier ASM for PowerPC (PR #606)
147+
- Add protection from overly-large messages
148+
149+
118150
1.2.4 -- 13 Oct. 2017
119151
----------------------
120152
- Silence some unnecessary warning messages (PR #487)

opal/mca/pmix/pmix2x/pmix/VERSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ greek=
3030
# command, or with the date (if "git describe" fails) in the form of
3131
# "date<date>".
3232

33-
repo_rev=git1617e76
33+
repo_rev=git79b2db3
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="Oct 31, 2017"
47+
date="Feb 01, 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="Oct 31, 2017"
7575
# Version numbers are described in the Libtool current:revision:age
7676
# format.
7777

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

opal/mca/pmix/pmix2x/pmix/etc/pmix-mca-params.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Copyright (c) 2004-2005 The Regents of the University of California.
1111
# All rights reserved.
1212
# Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved
13-
# Copyright (c) 2017 Intel, Inc. All rights reserved.
13+
# Copyright (c) 2017-2018 Intel, Inc. All rights reserved.
1414
# $COPYRIGHT$
1515
#
1616
# Additional copyrights may follow
@@ -53,7 +53,7 @@
5353
# directory. For example:
5454

5555
# Change component loading path
56-
# component_path = /usr/local/lib/pmix:~/my_pmix_components
56+
# mca_base_component_path = /usr/local/lib/pmix:~/my_pmix_components
5757

5858
# See "pinfo --param all all --level 9" for a full listing of PMIx
5959
# MCA parameters available and their default values.

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

Lines changed: 86 additions & 43 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-2017 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2015 Mellanox Technologies, Inc. All rights reserved.
1818
* $COPYRIGHT$
1919
*
@@ -97,11 +97,11 @@ int main(int argc, char **argv)
9797
int rc;
9898
pmix_value_t value;
9999
pmix_value_t *val = &value;
100-
char *tmp;
100+
char *tmp, *ptr, *p;
101101
pmix_proc_t proc;
102-
uint32_t nprocs, n;
102+
uint32_t nprocs, m, n, local_cnt, *localpeers;
103103
pmix_info_t *info;
104-
bool flag;
104+
bool flag, local;
105105
volatile int active;
106106
pmix_status_t dbg = PMIX_ERR_DEBUGGER_RELEASE;
107107

@@ -196,7 +196,7 @@ int main(int argc, char **argv)
196196
value.type = PMIX_UINT64;
197197
value.data.uint64 = 1234;
198198
if (PMIX_SUCCESS != (rc = PMIx_Put(PMIX_LOCAL, tmp, &value))) {
199-
fprintf(stderr, "Client ns %s rank %d: PMIx_Put internal failed: %d\n", myproc.nspace, myproc.rank, rc);
199+
fprintf(stderr, "Client ns %s rank %d: PMIx_Put local failed: %d\n", myproc.nspace, myproc.rank, rc);
200200
goto done;
201201
}
202202
free(tmp);
@@ -207,7 +207,7 @@ int main(int argc, char **argv)
207207
value.type = PMIX_STRING;
208208
value.data.string = "1234";
209209
if (PMIX_SUCCESS != (rc = PMIx_Put(PMIX_REMOTE, tmp, &value))) {
210-
fprintf(stderr, "Client ns %s rank %d: PMIx_Put internal failed: %d\n", myproc.nspace, myproc.rank, rc);
210+
fprintf(stderr, "Client ns %s rank %d: PMIx_Put remote failed: %d\n", myproc.nspace, myproc.rank, rc);
211211
goto done;
212212
}
213213
free(tmp);
@@ -230,53 +230,96 @@ int main(int argc, char **argv)
230230
}
231231
PMIX_INFO_FREE(info, 1);
232232

233+
/* get the number of local peers */
234+
if (PMIX_SUCCESS != (rc = PMIx_Get(&proc, PMIX_LOCAL_SIZE, NULL, 0, &val))) {
235+
fprintf(stderr, "Client ns %s rank %d: PMIx_Get PMIX_LOCAL_SIZE failed: %d", myproc.nspace, myproc.rank, rc);
236+
goto done;
237+
}
238+
local_cnt = val->data.uint32;
239+
PMIX_VALUE_RELEASE(val);
240+
241+
/* create an array for the peers */
242+
localpeers = (uint32_t*)malloc(local_cnt * sizeof(int));
243+
244+
/* get the list of local peers */
245+
if (PMIX_SUCCESS != (rc = PMIx_Get(&proc, PMIX_LOCAL_PEERS, NULL, 0, &val))) {
246+
fprintf(stderr, "Client ns %s rank %d: PMIx_Get PMIX_LOCAL_PEERS failed: %d", myproc.nspace, myproc.rank, rc);
247+
goto done;
248+
}
249+
ptr = strdup(val->data.string);
250+
PMIX_VALUE_RELEASE(val);
251+
252+
/* populate the peers array */
253+
p = strtok(ptr, ",");
254+
localpeers[0] = strtoul(p, NULL, 10);
255+
for (n=1; n < local_cnt; n++) {
256+
p = strtok(NULL, ",");
257+
localpeers[n] = strtoul(p, NULL, 10);
258+
}
259+
free(ptr);
260+
233261
/* check the returned data */
234262
for (n=0; n < nprocs; n++) {
235-
if (0 > asprintf(&tmp, "%s-%d-local", myproc.nspace, myproc.rank)) {
236-
exit(1);
263+
if (n == myproc.rank) {
264+
continue;
237265
}
238-
if (PMIX_SUCCESS != (rc = PMIx_Get(&myproc, tmp, NULL, 0, &val))) {
239-
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s failed: %d\n", myproc.nspace, myproc.rank, tmp, rc);
240-
goto done;
241-
}
242-
if (PMIX_UINT64 != val->type) {
243-
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned wrong type: %d\n", myproc.nspace, myproc.rank, tmp, val->type);
244-
PMIX_VALUE_RELEASE(val);
245-
free(tmp);
246-
goto done;
266+
proc.rank = n;
267+
local = false;
268+
for (m=0; m < local_cnt; m++) {
269+
if (localpeers[m] == proc.rank) {
270+
local = true;
271+
break;
272+
}
247273
}
248-
if (1234 != val->data.uint64) {
249-
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned wrong value: %d\n", myproc.nspace, myproc.rank, tmp, (int)val->data.uint64);
274+
if (local) {
275+
if (0 > asprintf(&tmp, "%s-%d-local", proc.nspace, proc.rank)) {
276+
exit(1);
277+
}
278+
if (PMIX_SUCCESS != (rc = PMIx_Get(&proc, tmp, NULL, 0, &val))) {
279+
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s failed: %d\n", myproc.nspace, myproc.rank, tmp, rc);
280+
goto done;
281+
}
282+
if (PMIX_UINT64 != val->type) {
283+
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned wrong type: %d\n", myproc.nspace, myproc.rank, tmp, val->type);
284+
PMIX_VALUE_RELEASE(val);
285+
free(tmp);
286+
goto done;
287+
}
288+
if (1234 != val->data.uint64) {
289+
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned wrong value: %d\n", myproc.nspace, myproc.rank, tmp, (int)val->data.uint64);
290+
PMIX_VALUE_RELEASE(val);
291+
free(tmp);
292+
goto done;
293+
}
294+
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned correct\n", myproc.nspace, myproc.rank, tmp);
250295
PMIX_VALUE_RELEASE(val);
251296
free(tmp);
252-
goto done;
253-
}
254-
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned correct\n", myproc.nspace, myproc.rank, tmp);
255-
PMIX_VALUE_RELEASE(val);
256-
free(tmp);
257-
if (0 > asprintf(&tmp, "%s-%d-remote", myproc.nspace, myproc.rank)) {
258-
exit(1);
259-
}
260-
if (PMIX_SUCCESS != (rc = PMIx_Get(&myproc, tmp, NULL, 0, &val))) {
261-
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s failed: %d\n", myproc.nspace, myproc.rank, tmp, rc);
262-
goto done;
263-
}
264-
if (PMIX_STRING != val->type) {
265-
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned wrong type: %d\n", myproc.nspace, myproc.rank, tmp, val->type);
266-
PMIX_VALUE_RELEASE(val);
267-
free(tmp);
268-
goto done;
269-
}
270-
if (0 != strcmp(val->data.string, "1234")) {
271-
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned wrong value: %s\n", myproc.nspace, myproc.rank, tmp, val->data.string);
297+
} else {
298+
if (0 > asprintf(&tmp, "%s-%d-remote", proc.nspace, proc.rank)) {
299+
exit(1);
300+
}
301+
if (PMIX_SUCCESS != (rc = PMIx_Get(&proc, tmp, NULL, 0, &val))) {
302+
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s failed: %d\n", myproc.nspace, myproc.rank, tmp, rc);
303+
goto done;
304+
}
305+
if (PMIX_STRING != val->type) {
306+
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned wrong type: %d\n", myproc.nspace, myproc.rank, tmp, val->type);
307+
PMIX_VALUE_RELEASE(val);
308+
free(tmp);
309+
goto done;
310+
}
311+
if (0 != strcmp(val->data.string, "1234")) {
312+
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned wrong value: %s\n", myproc.nspace, myproc.rank, tmp, val->data.string);
313+
PMIX_VALUE_RELEASE(val);
314+
free(tmp);
315+
goto done;
316+
}
317+
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned correct\n", myproc.nspace, myproc.rank, tmp);
272318
PMIX_VALUE_RELEASE(val);
273319
free(tmp);
274-
goto done;
275320
}
276-
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned correct\n", myproc.nspace, myproc.rank, tmp);
277-
PMIX_VALUE_RELEASE(val);
278-
free(tmp);
279321
}
322+
free(localpeers);
280323

281324
done:
282325
/* finalize us */

opal/mca/pmix/pmix2x/pmix/include/pmi.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,8 @@
4848
#ifndef PMI_H
4949
#define PMI_H
5050

51-
#ifdef PMIX_HAVE_VISIBILITY
52-
#define PMIX_EXPORT __attribute__((__visibility__("default")))
53-
#else
54-
#define PMIX_EXPORT
55-
#endif
51+
/* Structure and constant definitions */
52+
#include <pmix_common.h>
5653

5754
/* prototypes for the PMI interface in MPICH2 */
5855

opal/mca/pmix/pmix2x/pmix/include/pmi2.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77
#ifndef PMI2_H_INCLUDED
88
#define PMI2_H_INCLUDED
99

10-
#ifdef PMIX_HAVE_VISIBILITY
11-
#define PMIX_EXPORT __attribute__((__visibility__("default")))
12-
#else
13-
#define PMIX_EXPORT
14-
#endif
10+
/* Structure and constant definitions */
11+
#include <pmix_common.h>
1512

1613
#define PMI2_MAX_KEYLEN 64
1714
#define PMI2_MAX_VALLEN 1024

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

Lines changed: 27 additions & 4 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) 2013-2017 Intel, Inc. All rights reserved.
3+
* Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
44
* Copyright (c) 2016-2017 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
66
* Copyright (c) 2016 IBM Corporation. All rights reserved.
@@ -1675,7 +1675,6 @@ PMIX_EXPORT const char* PMIx_Get_version(void);
16751675
PMIX_EXPORT pmix_status_t PMIx_Store_internal(const pmix_proc_t *proc,
16761676
const char *key, pmix_value_t *val);
16771677

1678-
16791678
/**
16801679
* Top-level interface function to pack one or more values into a
16811680
* buffer.
@@ -1694,6 +1693,17 @@ PMIX_EXPORT pmix_status_t PMIx_Store_internal(const pmix_proc_t *proc,
16941693
* will return an error code (generated upon unpacking) -
16951694
* the error cannot be detected during packing.
16961695
*
1696+
* The identity of the intended recipient of the packed buffer (i.e., the
1697+
* process that will be unpacking it) is used solely to resolve any data type
1698+
* differences between PMIx versions. The recipient must, therefore, be
1699+
* known to the user prior to calling the pack function so that the
1700+
* PMIx library is aware of the version the recipient is using.
1701+
*
1702+
* @param *target Pointer to a pmix_proc_t structure containing the
1703+
* nspace/rank of the process that will be unpacking the final buffer.
1704+
* A NULL value may be used to indicate that the target is based on
1705+
* the same PMIx version as the caller.
1706+
*
16971707
* @param *buffer A pointer to the buffer into which the value is to
16981708
* be packed.
16991709
*
@@ -1727,7 +1737,8 @@ PMIX_EXPORT pmix_status_t PMIx_Store_internal(const pmix_proc_t *proc,
17271737
* status_code = PMIx_Data_pack(buffer, &src, 1, PMIX_INT32);
17281738
* @endcode
17291739
*/
1730-
PMIX_EXPORT pmix_status_t PMIx_Data_pack(pmix_data_buffer_t *buffer,
1740+
PMIX_EXPORT pmix_status_t PMIx_Data_pack(const pmix_proc_t *target,
1741+
pmix_data_buffer_t *buffer,
17311742
void *src, int32_t num_vals,
17321743
pmix_data_type_t type);
17331744

@@ -1774,6 +1785,17 @@ PMIX_EXPORT pmix_status_t PMIx_Data_pack(pmix_data_buffer_t *buffer,
17741785
* will return an error code generated upon unpacking - these errors
17751786
* cannot be detected during packing.
17761787
*
1788+
* The identity of the source of the packed buffer (i.e., the
1789+
* process that packed it) is used solely to resolve any data type
1790+
* differences between PMIx versions. The source must, therefore, be
1791+
* known to the user prior to calling the unpack function so that the
1792+
* PMIx library is aware of the version the source used.
1793+
*
1794+
* @param *source Pointer to a pmix_proc_t structure containing the
1795+
* nspace/rank of the process that packed the provided buffer.
1796+
* A NULL value may be used to indicate that the source is based on
1797+
* the same PMIx version as the caller.
1798+
*
17771799
* @param *buffer A pointer to the buffer from which the value will be
17781800
* extracted.
17791801
*
@@ -1823,7 +1845,8 @@ PMIX_EXPORT pmix_status_t PMIx_Data_pack(pmix_data_buffer_t *buffer,
18231845
*
18241846
* @endcode
18251847
*/
1826-
PMIX_EXPORT pmix_status_t PMIx_Data_unpack(pmix_data_buffer_t *buffer, void *dest,
1848+
PMIX_EXPORT pmix_status_t PMIx_Data_unpack(const pmix_proc_t *source,
1849+
pmix_data_buffer_t *buffer, void *dest,
18271850
int32_t *max_num_values,
18281851
pmix_data_type_t type);
18291852

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

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016 Intel, Inc. All rights reserved
2+
* Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
33
* Copyright (c) 2016 Research Organization for Information Science
44
* and Technology (RIST). All rights reserved.
55
* $COPYRIGHT$

0 commit comments

Comments
 (0)