Skip to content

Commit 3660ced

Browse files
author
Ralph Castain
authored
Merge pull request #4305 from rhc54/topic/pup
Update to track PMIx master
2 parents be7b0af + 073eff5 commit 3660ced

File tree

17 files changed

+95
-109
lines changed

17 files changed

+95
-109
lines changed

opal/mca/pmix/pmix2x/pmix/VERSION

Lines changed: 2 additions & 2 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=git6ab9c8d
33+
repo_rev=git0de7b68
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 03, 2017"
47+
date="Oct 05, 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/include/pmix_common.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ typedef uint32_t pmix_rank_t;
164164
// MCA param select the active transport
165165

166166
/* attributes for TCP connections */
167-
#define PMIX_TCP_URI "pmix.tcp.uri" // (char*) URI of server to connect to
167+
#define PMIX_TCP_REPORT_URI "pmix.tcp.repuri" // (char*) output URI - '-' => stdout, '+' => stderr, or filename
168+
#define PMIX_TCP_URI "pmix.tcp.uri" // (char*) URI of server to connect to, or file:<name of file containing it>
168169
#define PMIX_TCP_IF_INCLUDE "pmix.tcp.ifinclude" // (char*) comma-delimited list of devices and/or CIDR notation
169170
#define PMIX_TCP_IF_EXCLUDE "pmix.tcp.ifexclude" // (char*) comma-delimited list of devices and/or CIDR notation
170171
#define PMIX_TCP_IPV4_PORT "pmix.tcp.ipv4" // (int) IPv4 port to be used
@@ -1170,6 +1171,14 @@ struct pmix_info_t {
11701171
pmix_list_append((l), &_kv->super); \
11711172
} \
11721173
} while(0)
1174+
/* define a special macro for checking if a boolean
1175+
* info is true - when info structs are provided, a
1176+
* type of PMIX_UNDEF is taken to imply a boolean "true"
1177+
* as the presence of the key defaults to indicating
1178+
* "true" */
1179+
#define PMIX_INFO_TRUE(m) \
1180+
(PMIX_UNDEF == (m)->value.type || (PMIX_BOOL == (m)->value.type && (m)->value.data.flag)) ? true : false
1181+
11731182

11741183
/**** PMIX LOOKUP RETURN STRUCT ****/
11751184
typedef struct pmix_pdata {

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -664,15 +664,7 @@ PMIX_EXPORT pmix_status_t PMIx_Finalize(const pmix_info_t info[], size_t ninfo)
664664
if (NULL != info && 0 < ninfo) {
665665
for (n=0; n < ninfo; n++) {
666666
if (0 == strcmp(PMIX_EMBED_BARRIER, info[n].key)) {
667-
/* did they specify a value? */
668-
if (PMIX_BOOL == info[n].value.type) {
669-
if (info[n].value.data.flag) {
670-
/* they do want the barrier */
671-
PMIx_Fence(NULL, 0, NULL, 0);
672-
}
673-
} else {
674-
/* providing this attribute is considered
675-
* to be "true" by default */
667+
if (PMIX_INFO_TRUE(&info[n])) {
676668
PMIx_Fence(NULL, 0, NULL, 0);
677669
}
678670
break;

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -492,15 +492,9 @@ static void _getnbfn(int fd, short flags, void *cbdata)
492492
if (NULL != cb->info) {
493493
for (n=0; n < cb->ninfo; n++) {
494494
if (0 == strncmp(cb->info[n].key, PMIX_OPTIONAL, PMIX_MAX_KEYLEN)) {
495-
if (PMIX_UNDEF == cb->info[n].value.type ||
496-
cb->info[n].value.data.flag) {
497-
optional = true;
498-
}
495+
optional = PMIX_INFO_TRUE(&cb->info[n]);
499496
} else if (0 == strncmp(cb->info[n].key, PMIX_IMMEDIATE, PMIX_MAX_KEYLEN)) {
500-
if (PMIX_UNDEF == cb->info[n].value.type ||
501-
cb->info[n].value.data.flag) {
502-
immediate = true;
503-
}
497+
immediate = PMIX_INFO_TRUE(&cb->info[n]);
504498
} else if (0 == strncmp(cb->info[n].key, PMIX_TIMEOUT, PMIX_MAX_KEYLEN)) {
505499
/* set a timer to kick us out if we don't
506500
* have an answer within their window */

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -813,11 +813,8 @@ static void _notify_client_event(int sd, short args, void *cbdata)
813813
/* check for caching instructions */
814814
for (n=0; n < cd->ninfo; n++) {
815815
if (0 == strncmp(cd->info[n].key, PMIX_EVENT_DO_NOT_CACHE, PMIX_MAX_KEYLEN)) {
816-
if (PMIX_UNDEF == cd->info[n].value.type ||
817-
cd->info[n].value.data.flag) {
818-
holdcd = false;
819-
break;
820-
}
816+
holdcd = PMIX_INFO_TRUE(&cd->info[n]);
817+
break;
821818
}
822819
}
823820
}

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

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -443,45 +443,32 @@ static void reg_event_hdlr(int sd, short args, void *cbdata)
443443
for (n=0; n < cd->ninfo; n++) {
444444
if (0 == strncmp(cd->info[n].key, PMIX_EVENT_HDLR_FIRST, PMIX_MAX_KEYLEN)) {
445445
/* flag if they asked to put this one first overall */
446-
if (PMIX_UNDEF == cd->info[n].value.type ||
447-
cd->info[n].value.data.flag) {
448-
firstoverall = true;
449-
}
446+
firstoverall = PMIX_INFO_TRUE(&cd->info[n]);
450447
} else if (0 == strncmp(cd->info[n].key, PMIX_EVENT_HDLR_LAST, PMIX_MAX_KEYLEN)) {
451448
/* flag if they asked to put this one last overall */
452-
if (PMIX_UNDEF == cd->info[n].value.type ||
453-
cd->info[n].value.data.flag) {
454-
lastoverall = true;
455-
}
449+
lastoverall = PMIX_INFO_TRUE(&cd->info[n]);
456450
} else if (0 == strncmp(cd->info[n].key, PMIX_EVENT_HDLR_PREPEND, PMIX_MAX_KEYLEN)) {
457451
/* flag if they asked to prepend this handler */
458-
if (PMIX_UNDEF == cd->info[n].value.type ||
459-
cd->info[n].value.data.flag) {
452+
if (PMIX_INFO_TRUE(&cd->info[n])) {
460453
location = PMIX_EVENT_ORDER_PREPEND;
461454
}
462455
} else if (0 == strncmp(cd->info[n].key, PMIX_EVENT_HDLR_APPEND, PMIX_MAX_KEYLEN)) {
463456
/* flag if they asked to append this handler */
464-
if (PMIX_UNDEF == cd->info[n].value.type ||
465-
cd->info[n].value.data.flag) {
457+
if (PMIX_INFO_TRUE(&cd->info[n])) {
466458
location = PMIX_EVENT_ORDER_APPEND;
467459
}
468460
} else if (0 == strncmp(cd->info[n].key, PMIX_EVENT_HDLR_NAME, PMIX_MAX_KEYLEN)) {
469461
name = cd->info[n].value.data.string;
470462
} else if (0 == strncmp(cd->info[n].key, PMIX_EVENT_ENVIRO_LEVEL, PMIX_MAX_KEYLEN)) {
471-
if (PMIX_UNDEF == cd->info[n].value.type ||
472-
cd->info[n].value.data.flag) {
473-
cd->enviro = true;
474-
}
463+
cd->enviro = PMIX_INFO_TRUE(&cd->info[n]);
475464
} else if (0 == strncmp(cd->info[n].key, PMIX_EVENT_RETURN_OBJECT, PMIX_MAX_KEYLEN)) {
476465
cbobject = cd->info[n].value.data.ptr;
477466
} else if (0 == strncmp(cd->info[n].key, PMIX_EVENT_HDLR_FIRST_IN_CATEGORY, PMIX_MAX_KEYLEN)) {
478-
if (PMIX_UNDEF == cd->info[n].value.type ||
479-
cd->info[n].value.data.flag) {
467+
if (PMIX_INFO_TRUE(&cd->info[n])) {
480468
location = PMIX_EVENT_ORDER_FIRST;
481469
}
482470
} else if (0 == strncmp(cd->info[n].key, PMIX_EVENT_HDLR_LAST_IN_CATEGORY, PMIX_MAX_KEYLEN)) {
483-
if (PMIX_UNDEF == cd->info[n].value.type ||
484-
cd->info[n].value.data.flag) {
471+
if (PMIX_INFO_TRUE(&cd->info[n])) {
485472
location = PMIX_EVENT_ORDER_LAST;
486473
}
487474
} else if (0 == strncmp(cd->info[n].key, PMIX_EVENT_HDLR_BEFORE, PMIX_MAX_KEYLEN)) {

opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/gds_dstore.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2754,7 +2754,9 @@ static pmix_status_t dstore_del_nspace(const char* nspace)
27542754
PMIX_ERROR_LOG(rc);
27552755
goto exit;
27562756
}
2757-
PMIX_DESTRUCT(trk);
2757+
if (true == trk->in_use) {
2758+
PMIX_DESTRUCT(trk);
2759+
}
27582760
}
27592761

27602762
/* A lot of nspaces may be using same session info

opal/mca/pmix/pmix2x/pmix/src/mca/gds/gds.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,9 @@ typedef pmix_status_t (*pmix_gds_base_module_add_nspace_fn_t)(const char *nspace
354354
pmix_gds_base_active_module_t *_g; \
355355
pmix_status_t _s = PMIX_SUCCESS; \
356356
(s) = PMIX_SUCCESS; \
357+
pmix_output_verbose(1, pmix_gds_base_output, \
358+
"[%s:%d] GDS ADD NSPACE %s", \
359+
__FILE__, __LINE__, (n)); \
357360
PMIX_LIST_FOREACH(_g, &pmix_gds_globals.actives, \
358361
pmix_gds_base_active_module_t) { \
359362
if (NULL != _g->module->add_nspace) { \
@@ -381,6 +384,9 @@ typedef pmix_status_t (*pmix_gds_base_module_del_nspace_fn_t)(const char* nspace
381384
pmix_gds_base_active_module_t *_g; \
382385
pmix_status_t _s = PMIX_SUCCESS; \
383386
(s) = PMIX_SUCCESS; \
387+
pmix_output_verbose(1, pmix_gds_base_output, \
388+
"[%s:%d] GDS DEL NSPACE %s", \
389+
__FILE__, __LINE__, (n)); \
384390
PMIX_LIST_FOREACH(_g, &pmix_gds_globals.actives, \
385391
pmix_gds_base_active_module_t) { \
386392
if (NULL != _g->module->del_nspace) { \

opal/mca/pmix/pmix2x/pmix/src/mca/psensor/file/psensor_file.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,11 @@ static pmix_status_t start(pmix_peer_t *requestor, pmix_status_t error,
199199
/* check the directives to see if what they want monitored */
200200
for (n=0; n < ndirs; n++) {
201201
if (0 == strcmp(directives[n].key, PMIX_MONITOR_FILE_SIZE)) {
202-
ft->file_size = directives[n].value.data.flag;
202+
ft->file_size = PMIX_INFO_TRUE(&directives[n]);
203203
} else if (0 == strcmp(directives[n].key, PMIX_MONITOR_FILE_ACCESS)) {
204-
ft->file_access = directives[n].value.data.flag;
204+
ft->file_access = PMIX_INFO_TRUE(&directives[n]);
205205
} else if (0 == strcmp(directives[n].key, PMIX_MONITOR_FILE_MODIFY)) {
206-
ft->file_mod = directives[n].value.data.flag;
206+
ft->file_mod = PMIX_INFO_TRUE(&directives[n]);
207207
} else if (0 == strcmp(directives[n].key, PMIX_MONITOR_FILE_DROPS)) {
208208
ft->ndrops = directives[n].value.data.uint32;
209209
} else if (0 == strcmp(directives[n].key, PMIX_MONITOR_FILE_CHECK_TIME)) {

opal/mca/pmix/pmix2x/pmix/src/mca/ptl/base/ptl_base_listener.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ static pmix_status_t setup_listeners(pmix_info_t *info, size_t ninfo, bool *need
7979
/* scan the directives to see if they want only one listener setup */
8080
if (NULL != info) {
8181
for (n=0; n < ninfo; n++) {
82-
if (0 == strncmp(info[n].key, PMIX_SINGLE_LISTENER, PMIX_MAX_KEYLEN) &&
83-
(PMIX_UNDEF == info[n].value.type || info[n].value.data.flag)) {
84-
single = true;
82+
if (0 == strncmp(info[n].key, PMIX_SINGLE_LISTENER, PMIX_MAX_KEYLEN)) {
83+
single = PMIX_INFO_TRUE(&info[n]);
8584
break;
8685
}
8786
}

0 commit comments

Comments
 (0)