Skip to content

Commit 9c1df3f

Browse files
author
Ralph Castain
authored
Merge pull request #3615 from rhc54/topic/sigh
Roll in latest PMIx updates
2 parents 6ff2780 + 26d9606 commit 9c1df3f

File tree

7 files changed

+155
-74
lines changed

7 files changed

+155
-74
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=git1ce71dd
33+
repo_rev=gitd5e4801
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="May 28, 2017"
47+
date="May 30, 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/autogen.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
my $exclude_list;
5656

5757
# Minimum versions
58-
my $pmix_automake_version = "1.15.0";
58+
my $pmix_automake_version = "1.13.4";
5959
my $pmix_autoconf_version = "2.69";
60-
my $pmix_libtool_version = "2.4.6";
60+
my $pmix_libtool_version = "2.4.2";
6161

6262
# Search paths
6363
my $pmix_autoconf_search = "autoconf";

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ dnl Copyright (c) 2004-2006 The Regents of the University of California.
1212
dnl All rights reserved.
1313
dnl Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved.
1414
dnl Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved.
15-
dnl Copyright (c) 2012 Los Alamos National Security, LLC. All rights
15+
dnl Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
1616
dnl reserved.
1717
dnl Copyright (c) 2015 Research Organization for Information Science
1818
dnl and Technology (RIST). All rights reserved.
19-
dnl Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
19+
dnl Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
2020
dnl $COPYRIGHT$
2121
dnl
2222
dnl Additional copyrights may follow
@@ -38,7 +38,6 @@ AC_DEFUN([PMIX_SETUP_CC],[
3838
AC_REQUIRE([AM_PROG_CC_C_O])
3939

4040
# We require a C99 compiant compiler
41-
AC_PROG_CC_C99
4241
# The result of AC_PROG_CC_C99 is stored in ac_cv_prog_cc_c99
4342
if test "x$ac_cv_prog_cc_c99" = xno ; then
4443
AC_MSG_WARN([PMIx requires a C99 compiler])
@@ -322,7 +321,7 @@ AC_DEFUN([_PMIX_PROG_CC],[
322321
#
323322
PMIX_VAR_SCOPE_PUSH([pmix_cflags_save dummy pmix_cc_arvgv0])
324323
pmix_cflags_save="$CFLAGS"
325-
AC_PROG_CC
324+
AC_PROG_CC_C99
326325
BASECC="`basename $CC`"
327326
CFLAGS="$pmix_cflags_save"
328327
AC_DEFINE_UNQUOTED(PMIX_CC, "$CC", [PMIx underlying C compiler])

opal/mca/pmix/pmix2x/pmix/configure.ac

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# All rights reserved.
1313
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
1414
# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
15-
# Copyright (c) 2006-2011 Los Alamos National Security, LLC. All rights
15+
# Copyright (c) 2006-2017 Los Alamos National Security, LLC. All rights
1616
# reserved.
1717
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
1818
# Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved.
@@ -63,9 +63,9 @@ pmix_show_title "Configuring PMIx"
6363
AC_CANONICAL_TARGET
6464

6565
# Init automake
66-
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define 1.12.2 -Wall -Werror])
66+
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define 1.13.4 -Wall -Werror])
6767

68-
# SILENT_RULES is new in AM 1.11, but we require 1.11 or higher via
68+
# SILENT_RULES is new in AM 1.11, but we require 1.13.4 or higher via
6969
# autogen. Limited testing shows that calling SILENT_RULES directly
7070
# works in more cases than adding "silent-rules" to INIT_AUTOMAKE
7171
# (even though they're supposed to be identical). Shrug.
@@ -179,10 +179,6 @@ PMIX_DO_AM_CONDITIONALS
179179
# Setup C compiler
180180
####################################################################
181181

182-
CFLAGS_save="$CFLAGS"
183-
AC_PROG_CC
184-
CFLAGS="$CFLAGS_save"
185-
186182
AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
187183
AS_IF([test -z "$CC_FOR_BUILD"],[
188184
AC_SUBST([CC_FOR_BUILD], [$CC])

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

Lines changed: 136 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ static pmix_status_t notify_server_of_event(pmix_status_t status,
157157
PMIX_INFO_XFER(&chain->info[n], &info[n]);
158158
}
159159
}
160-
/* put the evhandler name tag in the next-to-last element - we
160+
/* add the evhandler name tag - we
161161
* will fill it in as each handler is called */
162162
PMIX_INFO_LOAD(&chain->info[chain->ninfo-2], PMIX_EVENT_HDLR_NAME, NULL, PMIX_STRING);
163-
/* now put the callback object tag in the last element */
163+
/* now add the callback object tag */
164164
PMIX_INFO_LOAD(&chain->info[chain->ninfo-1], PMIX_EVENT_RETURN_OBJECT, NULL, PMIX_POINTER);
165165

166166
/* we need to cache this event so we can pass it into
@@ -324,15 +324,27 @@ static void progress_local_event_hdlr(pmix_status_t status,
324324
if (nxt->codes[0] == chain->status &&
325325
check_range(&nxt->rng, &chain->source)) {
326326
chain->evhdlr = nxt;
327-
/* add the handler name in case they want to reference it */
328-
if (NULL != chain->info[chain->ninfo-2].value.data.string) {
329-
free(chain->info[chain->ninfo-2].value.data.string);
327+
/* update the handler name in case they want to reference it */
328+
for (n=0; n < chain->ninfo; n++) {
329+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_HDLR_NAME, PMIX_MAX_KEYLEN)) {
330+
if (NULL != chain->info[n].value.data.string) {
331+
free(chain->info[n].value.data.string);
332+
}
333+
if (NULL != chain->evhdlr->name) {
334+
chain->info[n].value.data.string = strdup(chain->evhdlr->name);
335+
}
336+
break;
337+
}
330338
}
331-
if (NULL != chain->evhdlr->name) {
332-
chain->info[chain->ninfo-2].value.data.string = strdup(chain->evhdlr->name);
339+
/* update the evhdlr cbobject */
340+
for (n=0; n < chain->ninfo; n++) {
341+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_RETURN_OBJECT, PMIX_MAX_KEYLEN)) {
342+
if (NULL != chain->evhdlr->name) {
343+
chain->info[n].value.data.ptr = chain->evhdlr->cbobject;
344+
}
345+
break;
346+
}
333347
}
334-
/* add any cbobject - the info struct for it is at the end */
335-
chain->info[chain->ninfo-1].value.data.ptr = nxt->cbobject;
336348
nxt->evhdlr(nxt->index,
337349
chain->status, &chain->source,
338350
chain->info, chain->ninfo,
@@ -364,15 +376,27 @@ static void progress_local_event_hdlr(pmix_status_t status,
364376
* the source fits within it */
365377
if (nxt->codes[n] == chain->status) {
366378
chain->evhdlr = nxt;
367-
/* add the handler name in case they want to reference it */
368-
if (NULL != chain->info[chain->ninfo-2].value.data.string) {
369-
free(chain->info[chain->ninfo-2].value.data.string);
379+
/* update the handler name in case they want to reference it */
380+
for (n=0; n < chain->ninfo; n++) {
381+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_HDLR_NAME, PMIX_MAX_KEYLEN)) {
382+
if (NULL != chain->info[n].value.data.string) {
383+
free(chain->info[n].value.data.string);
384+
}
385+
if (NULL != chain->evhdlr->name) {
386+
chain->info[n].value.data.string = strdup(chain->evhdlr->name);
387+
}
388+
break;
389+
}
370390
}
371-
if (NULL != chain->evhdlr->name) {
372-
chain->info[chain->ninfo-2].value.data.string = strdup(chain->evhdlr->name);
391+
/* update the evhdlr cbobject */
392+
for (n=0; n < chain->ninfo; n++) {
393+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_RETURN_OBJECT, PMIX_MAX_KEYLEN)) {
394+
if (NULL != chain->evhdlr->name) {
395+
chain->info[n].value.data.ptr = chain->evhdlr->cbobject;
396+
}
397+
break;
398+
}
373399
}
374-
/* add any cbobject - the info struct for it is at the end */
375-
chain->info[chain->ninfo-1].value.data.ptr = nxt->cbobject;
376400
nxt->evhdlr(nxt->index,
377401
chain->status, &chain->source,
378402
chain->info, chain->ninfo,
@@ -398,15 +422,27 @@ static void progress_local_event_hdlr(pmix_status_t status,
398422
* the source fits within it */
399423
if (check_range(&nxt->rng, &chain->source)) {
400424
chain->evhdlr = nxt;
401-
/* add the handler name in case they want to reference it */
402-
if (NULL != chain->info[chain->ninfo-2].value.data.string) {
403-
free(chain->info[chain->ninfo-2].value.data.string);
425+
/* update the handler name in case they want to reference it */
426+
for (n=0; n < chain->ninfo; n++) {
427+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_HDLR_NAME, PMIX_MAX_KEYLEN)) {
428+
if (NULL != chain->info[n].value.data.string) {
429+
free(chain->info[n].value.data.string);
430+
}
431+
if (NULL != chain->evhdlr->name) {
432+
chain->info[n].value.data.string = strdup(chain->evhdlr->name);
433+
}
434+
break;
435+
}
404436
}
405-
if (NULL != chain->evhdlr->name) {
406-
chain->info[chain->ninfo-2].value.data.string = strdup(chain->evhdlr->name);
437+
/* update the evhdlr cbobject */
438+
for (n=0; n < chain->ninfo; n++) {
439+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_RETURN_OBJECT, PMIX_MAX_KEYLEN)) {
440+
if (NULL != chain->evhdlr->name) {
441+
chain->info[n].value.data.ptr = chain->evhdlr->cbobject;
442+
}
443+
break;
444+
}
407445
}
408-
/* add any cbobject - the info struct for it is at the end */
409-
chain->info[chain->ninfo-1].value.data.ptr = nxt->cbobject;
410446
nxt->evhdlr(nxt->index,
411447
chain->status, &chain->source,
412448
chain->info, chain->ninfo,
@@ -425,15 +461,27 @@ static void progress_local_event_hdlr(pmix_status_t status,
425461
if (1 == pmix_globals.events.last->ncodes &&
426462
pmix_globals.events.last->codes[0] == chain->status) {
427463
chain->evhdlr = pmix_globals.events.last;
428-
/* add the handler name in case they want to reference it */
429-
if (NULL != chain->info[chain->ninfo-2].value.data.string) {
430-
free(chain->info[chain->ninfo-2].value.data.string);
464+
/* update the handler name in case they want to reference it */
465+
for (n=0; n < chain->ninfo; n++) {
466+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_HDLR_NAME, PMIX_MAX_KEYLEN)) {
467+
if (NULL != chain->info[n].value.data.string) {
468+
free(chain->info[n].value.data.string);
469+
}
470+
if (NULL != chain->evhdlr->name) {
471+
chain->info[n].value.data.string = strdup(chain->evhdlr->name);
472+
}
473+
break;
474+
}
431475
}
432-
if (NULL != chain->evhdlr->name) {
433-
chain->info[chain->ninfo-2].value.data.string = strdup(chain->evhdlr->name);
476+
/* update the evhdlr cbobject */
477+
for (n=0; n < chain->ninfo; n++) {
478+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_RETURN_OBJECT, PMIX_MAX_KEYLEN)) {
479+
if (NULL != chain->evhdlr->name) {
480+
chain->info[n].value.data.ptr = chain->evhdlr->cbobject;
481+
}
482+
break;
483+
}
434484
}
435-
/* add any cbobject - the info struct for it is at the end */
436-
chain->info[chain->ninfo-1].value.data.ptr = pmix_globals.events.last->cbobject;
437485
chain->evhdlr->evhdlr(chain->evhdlr->index,
438486
chain->status, &chain->source,
439487
chain->info, chain->ninfo,
@@ -445,15 +493,27 @@ static void progress_local_event_hdlr(pmix_status_t status,
445493
for (n=0; n < pmix_globals.events.last->ncodes; n++) {
446494
if (pmix_globals.events.last->codes[n] == chain->status) {
447495
chain->evhdlr = pmix_globals.events.last;
448-
/* add the handler name in case they want to reference it */
449-
if (NULL != chain->info[chain->ninfo-2].value.data.string) {
450-
free(chain->info[chain->ninfo-2].value.data.string);
496+
/* update the handler name in case they want to reference it */
497+
for (n=0; n < chain->ninfo; n++) {
498+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_HDLR_NAME, PMIX_MAX_KEYLEN)) {
499+
if (NULL != chain->info[n].value.data.string) {
500+
free(chain->info[n].value.data.string);
501+
}
502+
if (NULL != chain->evhdlr->name) {
503+
chain->info[n].value.data.string = strdup(chain->evhdlr->name);
504+
}
505+
break;
506+
}
451507
}
452-
if (NULL != chain->evhdlr->name) {
453-
chain->info[chain->ninfo-2].value.data.string = strdup(chain->evhdlr->name);
508+
/* update the evhdlr cbobject */
509+
for (n=0; n < chain->ninfo; n++) {
510+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_RETURN_OBJECT, PMIX_MAX_KEYLEN)) {
511+
if (NULL != chain->evhdlr->name) {
512+
chain->info[n].value.data.ptr = chain->evhdlr->cbobject;
513+
}
514+
break;
515+
}
454516
}
455-
/* add any cbobject - the info struct for it is at the end */
456-
chain->info[chain->ninfo-1].value.data.ptr = pmix_globals.events.last->cbobject;
457517
chain->evhdlr->evhdlr(chain->evhdlr->index,
458518
chain->status, &chain->source,
459519
chain->info, chain->ninfo,
@@ -465,15 +525,27 @@ static void progress_local_event_hdlr(pmix_status_t status,
465525
} else {
466526
/* gets run for all codes */
467527
chain->evhdlr = pmix_globals.events.last;
468-
/* add the handler name in case they want to reference it */
469-
if (NULL != chain->info[chain->ninfo-2].value.data.string) {
470-
free(chain->info[chain->ninfo-2].value.data.string);
528+
/* update the handler name in case they want to reference it */
529+
for (n=0; n < chain->ninfo; n++) {
530+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_HDLR_NAME, PMIX_MAX_KEYLEN)) {
531+
if (NULL != chain->info[n].value.data.string) {
532+
free(chain->info[n].value.data.string);
533+
}
534+
if (NULL != chain->evhdlr->name) {
535+
chain->info[n].value.data.string = strdup(chain->evhdlr->name);
536+
}
537+
break;
538+
}
471539
}
472-
if (NULL != chain->evhdlr->name) {
473-
chain->info[chain->ninfo-2].value.data.string = strdup(chain->evhdlr->name);
540+
/* update the evhdlr cbobject */
541+
for (n=0; n < chain->ninfo; n++) {
542+
if (0 == strncmp(chain->info[n].key, PMIX_EVENT_RETURN_OBJECT, PMIX_MAX_KEYLEN)) {
543+
if (NULL != chain->evhdlr->name) {
544+
chain->info[n].value.data.ptr = chain->evhdlr->cbobject;
545+
}
546+
break;
547+
}
474548
}
475-
/* add any cbobject - the info struct for it is at the end */
476-
chain->info[chain->ninfo-1].value.data.ptr = pmix_globals.events.last->cbobject;
477549
chain->evhdlr->evhdlr(chain->evhdlr->index,
478550
chain->status, &chain->source,
479551
chain->info, chain->ninfo,
@@ -642,15 +714,28 @@ void pmix_invoke_local_event_hdlr(pmix_event_chain_t *chain)
642714

643715

644716
invk:
645-
/* invoke the handler */
646-
/* add the handler name in case they want to reference it */
647-
if (NULL != chain->info[chain->ninfo-2].value.data.string) {
648-
free(chain->info[chain->ninfo-2].value.data.string);
717+
/* update the handler name in case they want to reference it */
718+
for (i=0; i < chain->ninfo; i++) {
719+
if (0 == strncmp(chain->info[i].key, PMIX_EVENT_HDLR_NAME, PMIX_MAX_KEYLEN)) {
720+
if (NULL != chain->info[i].value.data.string) {
721+
free(chain->info[i].value.data.string);
722+
}
723+
if (NULL != chain->evhdlr->name) {
724+
chain->info[i].value.data.string = strdup(chain->evhdlr->name);
725+
}
726+
break;
727+
}
649728
}
650-
if (NULL != chain->evhdlr->name) {
651-
chain->info[chain->ninfo-2].value.data.string = strdup(chain->evhdlr->name);
729+
/* update the evhdlr cbobject */
730+
for (i=0; i < chain->ninfo; i++) {
731+
if (0 == strncmp(chain->info[i].key, PMIX_EVENT_RETURN_OBJECT, PMIX_MAX_KEYLEN)) {
732+
if (NULL != chain->evhdlr->name) {
733+
chain->info[i].value.data.ptr = chain->evhdlr->cbobject;
734+
}
735+
break;
736+
}
652737
}
653-
chain->info[chain->ninfo-1].value.data.ptr = chain->evhdlr->cbobject;
738+
/* invoke the handler */
654739
pmix_output_verbose(2, pmix_globals.debug_output,
655740
"[%s:%d] INVOKING EVHDLR %s", __FILE__, __LINE__,
656741
(NULL == chain->evhdlr->name) ?

opal/mca/pmix/pmix2x/pmix/test/simple/simpft.c

Lines changed: 8 additions & 7 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-2016 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2015 Mellanox Technologies, Inc. All rights reserved.
1818
* $COPYRIGHT$
1919
*
@@ -114,13 +114,14 @@ int main(int argc, char **argv)
114114
PMIx_Abort(PMIX_ERR_OUT_OF_RESOURCE, "Eat rocks",
115115
&proc, 1);
116116
pmix_output(0, "Client ns %s rank %d: Abort called", myproc.nspace, myproc.rank);
117-
}
117+
} else {
118118
/* everyone simply waits */
119-
while (!completed) {
120-
struct timespec ts;
121-
ts.tv_sec = 0;
122-
ts.tv_nsec = 100000;
123-
nanosleep(&ts, NULL);
119+
while (!completed) {
120+
struct timespec ts;
121+
ts.tv_sec = 0;
122+
ts.tv_nsec = 100000;
123+
nanosleep(&ts, NULL);
124+
}
124125
}
125126

126127
done:

opal/mca/pmix/pmix2x/pmix/test/simple/simptest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static void model_callback(size_t evhdlr_registration_id,
216216
/* just let us know it was received */
217217
fprintf(stderr, "Model event handler called with status %d(%s)\n", status, PMIx_Error_string(status));
218218
for (n=0; n < ninfo; n++) {
219-
if (PMIX_STRING == info[n].value.type) {
219+
if (0 == strncmp(info[n].key, PMIX_EVENT_HDLR_NAME, PMIX_MAX_KEYLEN)) {
220220
fprintf(stderr, "\t%s:\t%s\n", info[n].key, info[n].value.data.string);
221221
}
222222
}

0 commit comments

Comments
 (0)