Skip to content

Commit 7d0e023

Browse files
author
Ralph Castain
authored
Merge pull request #4836 from rhc54/topic/pmix
Sync to PMIx master
2 parents 271fc6a + 60e6440 commit 7d0e023

File tree

6 files changed

+88
-54
lines changed

6 files changed

+88
-54
lines changed

opal/mca/pmix/pmix3x/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=gitefa7fe7
33+
repo_rev=gitf47bda5
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="Feb 07, 2018"
47+
date="Feb 19, 2018"
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/pmix3x/pmix/config/pmix_check_package.m4

Lines changed: 63 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# All rights reserved.
1313
# Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved.
1414
# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
15-
# Copyright (c) 2014 Intel, Inc. All rights reserved.
15+
# Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
1616
# Copyright (c) 2017 Research Organization for Information Science
1717
# and Technology (RIST). All rights reserved.
1818
# $COPYRIGHT$
@@ -36,9 +36,14 @@ AC_DEFUN([_PMIX_CHECK_PACKAGE_HEADER], [
3636
# of header includes without killing off the cache variable and trying
3737
# again...
3838
unset pmix_Header
39-
4039
pmix_check_package_header_happy="no"
41-
AS_IF([test "$3" = "/usr" || test "$3" = "/usr/local"],
40+
41+
# get rid of the trailing slash(es)
42+
hdir_prefix=$(echo $3 | sed -e 'sX/*$XXg')
43+
44+
AS_IF([test "$hdir_prefix" = "" || \
45+
test "$hdir_prefix" = "/usr" || \
46+
test "$hdir_prefix" = "/usr/local"],
4247
[ # try as is...
4348
AC_VERBOSE([looking for header without includes])
4449
AC_CHECK_HEADERS([$2], [pmix_check_package_header_happy="yes"], [])
@@ -47,12 +52,21 @@ AC_DEFUN([_PMIX_CHECK_PACKAGE_HEADER], [
4752
unset pmix_Header])])
4853

4954
AS_IF([test "$pmix_check_package_header_happy" = "no"],
50-
[AS_IF([test "$3" != ""],
51-
[$1_CPPFLAGS="$$1_CPPFLAGS -I$3/include"
52-
CPPFLAGS="$CPPFLAGS -I$3/include"])
53-
AC_CHECK_HEADERS([$2], [pmix_check_package_header_happy="yes"], [], [$6])
54-
AS_IF([test "$pmix_check_package_header_happy" = "yes"], [$4], [$5])],
55-
[$4])
55+
[AS_IF([test "$hdir_prefix" != ""],
56+
[$1_CPPFLAGS="$$1_CPPFLAGS -I$hdir_prefix"
57+
CPPFLAGS="$CPPFLAGS -I$hdir_prefix"
58+
AC_VERBOSE([looking for header in $hdir_prefix])
59+
AC_CHECK_HEADERS([$2], [pmix_check_package_header_happy="yes"], [], [$6])
60+
AS_IF([test "$pmix_check_package_header_happy" = "no"],
61+
[unset pmix_Header
62+
$1_CPPFLAGS="$$1_CPPFLAGS -I$hdir_prefix/include"
63+
CPPFLAGS="$CPPFLAGS -I$hdir_prefix/include"
64+
AC_VERBOSE([looking for header in $hdir_prefix/include])
65+
AC_CHECK_HEADERS([$2], [pmix_check_package_header_happy="yes"], [], [$6])])])])
66+
67+
AS_IF([test "$pmix_check_package_header_happy" = "yes"],
68+
[$4], [$5])
69+
5670
unset pmix_check_package_header_happy
5771

5872
AS_VAR_POPDEF([pmix_Header])dnl
@@ -74,10 +88,14 @@ AC_DEFUN([_PMIX_CHECK_PACKAGE_LIB], [
7488
# see comment above
7589
unset pmix_Lib
7690
pmix_check_package_lib_happy="no"
77-
AS_IF([test "$6" != ""],
78-
[ # libdir was specified - search only there
79-
$1_LDFLAGS="$$1_LDFLAGS -L$6"
80-
LDFLAGS="$LDFLAGS -L$6"
91+
92+
# get rid of the trailing slash(es)
93+
libdir_prefix=$(echo $6 | sed -e 'sX/*$XXg')
94+
95+
AS_IF([test "$libdir_prefix" != ""],
96+
[# libdir was specified - search only there
97+
$1_LDFLAGS="$$1_LDFLAGS -L$libdir_prefix"
98+
LDFLAGS="$LDFLAGS -L$libdir_prefix"
8199
AC_SEARCH_LIBS([$3], [$2],
82100
[pmix_check_package_lib_happy="yes"],
83101
[pmix_check_package_lib_happy="no"], [$4])
@@ -86,24 +104,30 @@ AC_DEFUN([_PMIX_CHECK_PACKAGE_LIB], [
86104
$1_LDFLAGS="$pmix_check_package_$1_orig_LDFLAGS"
87105
unset pmix_Lib])],
88106
[ # libdir was not specified - go through search path
89-
pmix_check_package_libdir="$5"
90-
AS_IF([test "$pmix_check_package_libdir" = "" || test "$pmix_check_package_libdir" = "/usr" || test "$pmix_check_package_libdir" = "/usr/local"],
91-
[ # try as is...
92-
AC_VERBOSE([looking for library without search path])
93-
AC_SEARCH_LIBS([$3], [$2],
94-
[pmix_check_package_lib_happy="yes"],
95-
[pmix_check_package_lib_happy="no"], [$4])
96-
AS_IF([test "$pmix_check_package_lib_happy" = "no"],
97-
[ # no go on the as is.. see what happens later...
98-
LDFLAGS="$pmix_check_package_$1_save_LDFLAGS"
99-
$1_LDFLAGS="$pmix_check_package_$1_orig_LDFLAGS"
100-
unset pmix_Lib])])
107+
# get rid of the trailing slash(es)
108+
libdir_prefix=$(echo $5 | sed -e 'sX/*$XXg')
109+
110+
# first try standard locations as otherwise our
111+
# searches with libdir_prefix locations might come
112+
# back positive and unnecessarily add an LDFLAG
113+
AC_VERBOSE([looking for library without search path])
114+
AC_SEARCH_LIBS([$3], [$2],
115+
[pmix_check_package_lib_happy="yes"],
116+
[pmix_check_package_lib_happy="no"], [$4])
117+
AS_IF([test "$pmix_check_package_lib_happy" = "no"],
118+
[ # no go on the as is.. see what happens later...
119+
LDFLAGS="$pmix_check_package_$1_save_LDFLAGS"
120+
$1_LDFLAGS="$pmix_check_package_$1_orig_LDFLAGS"
121+
unset pmix_Lib])
101122

102123
AS_IF([test "$pmix_check_package_lib_happy" = "no"],
103-
[AS_IF([test "$pmix_check_package_libdir" != ""],
104-
[$1_LDFLAGS="$$1_LDFLAGS -L$pmix_check_package_libdir/lib"
105-
LDFLAGS="$LDFLAGS -L$pmix_check_package_libdir/lib"
106-
AC_VERBOSE([looking for library in lib])
124+
# if we didn't find it, check the libdir_prefix/lib64 directory
125+
[AS_IF([test "$libdir_prefix" != "" && \
126+
test "$libdir_prefix" != "/usr" && \
127+
test "$libdir_prefix" != "/usr/local"],
128+
[$1_LDFLAGS="$$1_LDFLAGS -L$libdir_prefix/lib64"
129+
LDFLAGS="$LDFLAGS -L$libdir_prefix/lib64"
130+
AC_VERBOSE([looking for library in $libdir_prefix/lib64])
107131
AC_SEARCH_LIBS([$3], [$2],
108132
[pmix_check_package_lib_happy="yes"],
109133
[pmix_check_package_lib_happy="no"], [$4])
@@ -114,18 +138,23 @@ AC_DEFUN([_PMIX_CHECK_PACKAGE_LIB], [
114138
unset pmix_Lib])])])
115139

116140
AS_IF([test "$pmix_check_package_lib_happy" = "no"],
117-
[AS_IF([test "$pmix_check_package_libdir" != ""],
118-
[$1_LDFLAGS="$$1_LDFLAGS -L$pmix_check_package_libdir/lib64"
119-
LDFLAGS="$LDFLAGS -L$pmix_check_package_libdir/lib64"
120-
AC_VERBOSE([looking for library in lib64])
141+
# if we still haven't found it, check the libdir_prefix/lib directory
142+
[AS_IF([test "$libdir_prefix" != "" && \
143+
test "$libdir_prefix" != "/usr" && \
144+
test "$libdir_prefix" != "/usr/local"],
145+
[$1_LDFLAGS="$$1_LDFLAGS -L$libdir_prefix/lib"
146+
LDFLAGS="$LDFLAGS -L$libdir_prefix/lib"
147+
AC_VERBOSE([looking for library in $libdir_prefix/lib])
121148
AC_SEARCH_LIBS([$3], [$2],
122149
[pmix_check_package_lib_happy="yes"],
123150
[pmix_check_package_lib_happy="no"], [$4])
124151
AS_IF([test "$pmix_check_package_lib_happy" = "no"],
125152
[ # no go on the as is.. see what happens later...
126153
LDFLAGS="$pmix_check_package_$1_save_LDFLAGS"
127154
$1_LDFLAGS="$pmix_check_package_$1_orig_LDFLAGS"
128-
unset pmix_Lib])])])])
155+
unset pmix_Lib])])])
156+
])
157+
129158

130159
AS_IF([test "$pmix_check_package_lib_happy" = "yes"],
131160
[$1_LIBS="-l$2 $4"

opal/mca/pmix/pmix3x/pmix/config/pmix_setup_libevent.m4

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
44
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
5-
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
5+
# Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
66
# Copyright (c) 2017 Research Organization for Information Science
77
# and Technology (RIST). All rights reserved.
88
# $COPYRIGHT$
@@ -65,18 +65,22 @@ AC_DEFUN([_PMIX_LIBEVENT_EXTERNAL],[
6565
[AC_HELP_STRING([--with-libevent-libdir=DIR],
6666
[Search for libevent libraries in DIR ])])
6767

68+
# get rid of the trailing slash(es)
69+
libevent_prefix=$(echo $with_libevent | sed -e 'sX/*$XXg')
70+
libeventdir_prefix=$(echo $with_libevent_libdir | sed -e 'sX/*$XXg')
71+
6872
AC_MSG_CHECKING([for libevent in])
69-
if test ! -z "$with_libevent" && test "$with_libevent" != "yes"; then
73+
if test ! -z "$libevent_prefix" && test "$libevent_prefix" != "yes"; then
7074
pmix_event_defaults=no
71-
pmix_event_dir=$with_libevent
72-
if test -d $with_libevent/lib; then
73-
pmix_event_libdir=$with_libevent/lib
74-
elif test -d $with_libevent/lib64; then
75-
pmix_event_libdir=$with_libevent/lib64
76-
elif test -d $with_libevent; then
77-
pmix_event_libdir=$with_libevent
75+
pmix_event_dir=$libevent_prefix
76+
if test -d $libevent_prefix/lib; then
77+
pmix_event_libdir=$libevent_prefix/lib
78+
elif test -d $libevent_prefix/lib64; then
79+
pmix_event_libdir=$libevent_prefix/lib64
80+
elif test -d $libevent_prefix; then
81+
pmix_event_libdir=$libevent_prefix
7882
else
79-
AC_MSG_RESULT([Could not find $with_libevent/lib, $with_libevent/lib64, or $with_libevent])
83+
AC_MSG_RESULT([Could not find $libevent_prefix/lib, $libevent_prefix/lib64, or $libevent_prefix])
8084
AC_MSG_ERROR([Can not continue])
8185
fi
8286
AC_MSG_RESULT([$pmix_event_dir and $pmix_event_libdir])
@@ -90,13 +94,13 @@ AC_DEFUN([_PMIX_LIBEVENT_EXTERNAL],[
9094
else
9195
AC_MSG_RESULT([not found])
9296
AC_MSG_WARN([Could not find /usr/lib or /usr/lib64 - you may])
93-
AC_MSG_WARN([to specify --with-libevent-libdir=<path>])
97+
AC_MSG_WARN([need to specify --with-libevent-libdir=<path>])
9498
AC_MSG_ERROR([Can not continue])
9599
fi
96100
AC_MSG_RESULT([(default search paths)])
97101
fi
98-
AS_IF([test ! -z "$with_libevent_libdir" && "$with_libevent_libdir" != "yes"],
99-
[pmix_event_libdir="$with_libevent_libdir"])
102+
AS_IF([test ! -z "$libeventdir_prefix" && "$libeventdir_prefix" != "yes"],
103+
[pmix_event_libdir="$libeventdir_prefix"])
100104

101105
PMIX_CHECK_PACKAGE([pmix_libevent],
102106
[event.h],

opal/mca/pmix/pmix3x/pmix/src/mca/preg/native/preg_native.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ static pmix_status_t resolve_nodes(const char *nspace,
699699
pmix_proc_t proc;
700700

701701
cb = PMIX_NEW(pmix_cb_t);
702-
cb->pname.nspace = (char*)nspace;
702+
cb->pname.nspace = strdup(nspace);
703703

704704
PMIX_THREADSHIFT(cb, _resolve_nodes);
705705

opal/mca/pmix/pmix3x/pmix/src/mca/ptl/base/ptl_base_sendrecv.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ void pmix_ptl_base_lost_connection(pmix_peer_t *peer, pmix_status_t err)
129129
}
130130
/* reduce the number of local procs */
131131
--peer->nptr->nlocalprocs;
132-
/* now decrease the refcount - might actually free the object */
133-
PMIX_RELEASE(peer->info);
132+
134133
/* remove this client from our array */
135134
pmix_pointer_array_set_item(&pmix_server_globals.clients,
136135
peer->index, NULL);
@@ -155,6 +154,10 @@ void pmix_ptl_base_lost_connection(pmix_peer_t *peer, pmix_status_t err)
155154
* an event. If not, then we do */
156155
PMIX_REPORT_EVENT(err, peer, PMIX_RANGE_NAMESPACE, _notify_complete);
157156
}
157+
/* now decrease the refcount - might actually free the object */
158+
PMIX_RELEASE(peer->info);
159+
160+
/* Release peer info */
158161
PMIX_RELEASE(peer);
159162
} else {
160163
/* if I am a client, there is only

opal/mca/pmix/pmix3x/pmix/src/server/pmix_server.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,15 +1328,13 @@ static void _setup_app(int sd, short args, void *cbdata)
13281328
PMIX_LIST_FOREACH(kv, &ilist, pmix_kval_t) {
13291329
PMIX_BFROPS_PACK(rc, pmix_globals.mypeer, &buffer, kv, 1, PMIX_KVAL);
13301330
if (PMIX_SUCCESS != rc) {
1331-
PMIX_DESTRUCT(&blob);
13321331
PMIX_RELEASE(fcd);
13331332
fcd = NULL;
13341333
goto depart;
13351334
}
13361335
}
13371336
PMIX_INFO_CREATE(fcd->info, 1);
13381337
if (NULL == fcd->info) {
1339-
PMIX_DESTRUCT(&blob);
13401338
PMIX_RELEASE(fcd);
13411339
fcd = NULL;
13421340
goto depart;

0 commit comments

Comments
 (0)