Skip to content

Commit ecea1e3

Browse files
author
Ralph Castain
committed
Update to 1.1.4rc3
1 parent bfcf145 commit ecea1e3

27 files changed

+806
-390
lines changed

opal/mca/pmix/pmix114/pmix/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ Master (not on release branches yet)
4343
- Do not install internal headers unless specifically
4444
requested to do so
4545
- Add support for multiple calls to Put/Commit
46+
- Silence some "return code unchecked" warnings. Thanks
47+
to Jim Garlick for pointing them out
48+
- Resolve a race condition during register_clients
4649

4750

4851
1.1.3

opal/mca/pmix/pmix114/pmix/VERSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ release=4
2323
# The only requirement is that it must be entirely printable ASCII
2424
# characters and have no white space.
2525

26-
greek=rc2
26+
greek=rc3
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=git65d985c
33+
repo_rev=git4695e45
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 19, 2016"
47+
date="Jun 01, 2016"
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/pmix114/pmix/config/pmix.m4

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,11 @@ AC_DEFUN([PMIX_SETUP_CORE],[
456456
#endif
457457
])
458458

459-
#
459+
AC_CHECK_MEMBERS([struct ucred.uid, struct ucred.cr_uid, struct sockpeercred.uid],
460+
[], [],
461+
[#include <sys/types.h>
462+
#include <sys/socket.h> ])
463+
460464
# Check for ptrdiff type. Yes, there are platforms where
461465
# sizeof(void*) != sizeof(long) (64 bit Windows, apparently).
462466
#
@@ -491,7 +495,7 @@ AC_DEFUN([PMIX_SETUP_CORE],[
491495
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
492496
PMIX_SEARCH_LIBS_CORE([ceil], [m])
493497

494-
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strsignal socketpair strncpy_s usleep])
498+
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strsignal socketpair strncpy_s usleep getpeereid])
495499

496500
# On some hosts, htonl is a define, so the AC_CHECK_FUNC will get
497501
# confused. On others, it's in the standard library, but stubbed with

opal/mca/pmix/pmix114/pmix/config/pmix_check_munge.m4

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- shell-script -*-
22
#
3-
# Copyright (c) 2015 Intel, Inc. All rights reserved
3+
# Copyright (c) 2015-2016 Intel, Inc. All rights reserved
44
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
55
# $COPYRIGHT$
66
#
@@ -24,9 +24,9 @@ AC_DEFUN([PMIX_MUNGE_CONFIG],[
2424
[Search for munge libraries in DIR ])])
2525

2626
pmix_munge_support=0
27-
if test "$with_munge" != "no"; then
27+
if test ! -z "$with_munge" && test "$with_munge" != "no"; then
2828
AC_MSG_CHECKING([for munge in])
29-
if test ! -z "$with_munge" && test "$with_munge" != "yes"; then
29+
if test "$with_munge" != "yes"; then
3030
if test -d $with_munge/include/munge; then
3131
pmix_munge_dir=$with_munge/include/munge
3232
else
@@ -76,8 +76,8 @@ AC_DEFUN([PMIX_MUNGE_CONFIG],[
7676
AC_MSG_RESULT([yes])
7777
fi
7878

79-
AC_DEFINE_UNQUOTED([PMIX_HAVE_MUNGE], [$pmix_munge_support],
80-
[Whether we have munge support or not])
79+
AC_DEFINE_UNQUOTED([PMIX_WANT_MUNGE], [$pmix_munge_support],
80+
[Whether we want munge support or not])
8181

8282
PMIX_VAR_SCOPE_POP
8383
])dnl

opal/mca/pmix/pmix114/pmix/config/pmix_check_sasl.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ AC_DEFUN([PMIX_SASL_CONFIG],[
2727
[Search for sasl libraries in DIR ])])
2828

2929
pmix_sasl_support=0
30-
if test "$with_sasl" != "no"; then
30+
if test ! -z "$with_sasl" && test "$with_sasl" != "no"; then
3131
AC_MSG_CHECKING([for sasl in])
32-
if test ! -z "$with_sasl" && test "$with_sasl" != "yes"; then
32+
if test "$with_sasl" != "yes"; then
3333
pmix_sasl_dir=$with_sasl/include/sasl
3434
if test -d $with_sasl/lib; then
3535
pmix_sasl_libdir=$with_sasl/lib

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ int main(int argc, char **argv)
6161
fprintf(stderr, "Client %s:%d universe size %d\n", myproc.nspace, myproc.rank, nprocs);
6262

6363
/* put a few values */
64-
(void)asprintf(&tmp, "%s-%d-internal", myproc.nspace, myproc.rank);
64+
if (0 > asprintf(&tmp, "%s-%d-internal", myproc.nspace, myproc.rank)) {
65+
exit(1);
66+
}
6567
value.type = PMIX_UINT32;
6668
value.data.uint32 = 1234;
6769
if (PMIX_SUCCESS != (rc = PMIx_Store_internal(&myproc, tmp, &value))) {
@@ -70,7 +72,9 @@ int main(int argc, char **argv)
7072
}
7173
free(tmp);
7274

73-
(void)asprintf(&tmp, "%s-%d-local", myproc.nspace, myproc.rank);
75+
if (0 > asprintf(&tmp, "%s-%d-local", myproc.nspace, myproc.rank)) {
76+
exit(1);
77+
}
7478
value.type = PMIX_UINT64;
7579
value.data.uint64 = 1234;
7680
if (PMIX_SUCCESS != (rc = PMIx_Put(PMIX_LOCAL, tmp, &value))) {
@@ -79,7 +83,9 @@ int main(int argc, char **argv)
7983
}
8084
free(tmp);
8185

82-
(void)asprintf(&tmp, "%s-%d-remote", myproc.nspace, myproc.rank);
86+
if (0 > asprintf(&tmp, "%s-%d-remote", myproc.nspace, myproc.rank)) {
87+
exit(1);
88+
}
8389
value.type = PMIX_STRING;
8490
value.data.string = "1234";
8591
if (PMIX_SUCCESS != (rc = PMIx_Put(PMIX_REMOTE, tmp, &value))) {
@@ -108,7 +114,9 @@ int main(int argc, char **argv)
108114

109115
/* check the returned data */
110116
for (n=0; n < nprocs; n++) {
111-
(void)asprintf(&tmp, "%s-%d-local", myproc.nspace, myproc.rank);
117+
if (0 > asprintf(&tmp, "%s-%d-local", myproc.nspace, myproc.rank)) {
118+
exit(1);
119+
}
112120
if (PMIX_SUCCESS != (rc = PMIx_Get(&myproc, tmp, NULL, 0, &val))) {
113121
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s failed: %d\n", myproc.nspace, myproc.rank, tmp, rc);
114122
goto done;
@@ -128,7 +136,9 @@ int main(int argc, char **argv)
128136
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s returned correct\n", myproc.nspace, myproc.rank, tmp);
129137
PMIX_VALUE_RELEASE(val);
130138
free(tmp);
131-
(void)asprintf(&tmp, "%s-%d-remote", myproc.nspace, myproc.rank);
139+
if (0 > asprintf(&tmp, "%s-%d-remote", myproc.nspace, myproc.rank)) {
140+
exit(1);
141+
}
132142
if (PMIX_SUCCESS != (rc = PMIx_Get(&myproc, tmp, NULL, 0, &val))) {
133143
fprintf(stderr, "Client ns %s rank %d: PMIx_Get %s failed: %d\n", myproc.nspace, myproc.rank, tmp, rc);
134144
goto done;

opal/mca/pmix/pmix114/pmix/examples/dmodex.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ int main(int argc, char **argv)
117117
fprintf(stderr, "Client %s:%d universe size %d\n", myproc.nspace, myproc.rank, nprocs);
118118

119119
/* put a few values */
120-
(void)asprintf(&tmp, "%s-%d-internal", myproc.nspace, myproc.rank);
120+
if (0 > asprintf(&tmp, "%s-%d-internal", myproc.nspace, myproc.rank)) {
121+
exit(1);
122+
}
121123
value.type = PMIX_UINT32;
122124
value.data.uint32 = 1234;
123125
if (PMIX_SUCCESS != (rc = PMIx_Store_internal(&myproc, tmp, &value))) {
@@ -126,7 +128,9 @@ int main(int argc, char **argv)
126128
}
127129
free(tmp);
128130

129-
(void)asprintf(&tmp, "%s-%d-local", myproc.nspace, myproc.rank);
131+
if (0 > asprintf(&tmp, "%s-%d-local", myproc.nspace, myproc.rank)) {
132+
exit(1);
133+
}
130134
value.type = PMIX_UINT64;
131135
value.data.uint64 = 1234;
132136
if (PMIX_SUCCESS != (rc = PMIx_Put(PMIX_LOCAL, tmp, &value))) {
@@ -135,7 +139,9 @@ int main(int argc, char **argv)
135139
}
136140
free(tmp);
137141

138-
(void)asprintf(&tmp, "%s-%d-remote", myproc.nspace, myproc.rank);
142+
if (0 > asprintf(&tmp, "%s-%d-remote", myproc.nspace, myproc.rank)) {
143+
exit(1);
144+
}
139145
value.type = PMIX_STRING;
140146
value.data.string = "1234";
141147
if (PMIX_SUCCESS != (rc = PMIx_Put(PMIX_REMOTE, tmp, &value))) {
@@ -170,7 +176,9 @@ int main(int argc, char **argv)
170176
/* get the committed data - ask for someone who doesn't exist as well */
171177
num_gets = 0;
172178
for (n=0; n <= nprocs; n++) {
173-
(void)asprintf(&tmp, "%s-%d-local", myproc.nspace, n);
179+
if (0 > asprintf(&tmp, "%s-%d-local", myproc.nspace, n)) {
180+
exit(1);
181+
}
174182
(void)strncpy(proc.nspace, tmp, PMIX_MAX_NSLEN);
175183
proc.rank = n;
176184
if (PMIX_SUCCESS != (rc = PMIx_Get_nb(&proc, tmp,
@@ -179,7 +187,9 @@ int main(int argc, char **argv)
179187
goto done;
180188
}
181189
++num_gets;
182-
(void)asprintf(&tmp, "%s-%d-remote", myproc.nspace, n);
190+
if (0 > asprintf(&tmp, "%s-%d-remote", myproc.nspace, n)) {
191+
exit(1);
192+
}
183193
(void)strncpy(proc.nspace, tmp, PMIX_MAX_NSLEN);
184194
if (PMIX_SUCCESS != (rc = PMIx_Get_nb(&proc, tmp,
185195
NULL, 0, valcbfunc, tmp))) {

opal/mca/pmix/pmix114/pmix/examples/dynamic.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,12 @@ int main(int argc, char **argv)
5050
size_t npeers, ntmp=0;
5151
char *nodelist;
5252

53-
gethostname(hostname, sizeof(hostname));
54-
getcwd(dir, 1024);
53+
if (0 > gethostname(hostname, sizeof(hostname))) {
54+
exit(1);
55+
}
56+
if (NULL == getcwd(dir, 1024)) {
57+
exit(1);
58+
}
5559

5660
/* init us */
5761
if (PMIX_SUCCESS != (rc = PMIx_Init(&myproc))) {
@@ -81,11 +85,15 @@ int main(int argc, char **argv)
8185
/* rank=0 calls spawn */
8286
if (0 == myproc.rank) {
8387
PMIX_APP_CREATE(app, 1);
84-
(void)asprintf(&app->cmd, "%s/client", dir);
88+
if (0 > asprintf(&app->cmd, "%s/client", dir)) {
89+
exit(1);
90+
}
8591
app->maxprocs = 2;
8692
app->argc = 1;
8793
app->argv = (char**)malloc(2 * sizeof(char*));
88-
(void)asprintf(&app->argv[0], "%s/client", dir);
94+
if (0 > asprintf(&app->argv[0], "%s/client", dir)) {
95+
exit(1);
96+
}
8997
app->argv[1] = NULL;
9098
app->env = (char**)malloc(2 * sizeof(char*));
9199
app->env[0] = strdup("PMIX_ENV_VALUE=3");

opal/mca/pmix/pmix114/pmix/include/pmix/pmix_common.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ BEGIN_C_DECLS
9393
#define PMIX_USERID "pmix.euid" // (uint32_t) effective user id
9494
#define PMIX_GRPID "pmix.egid" // (uint32_t) effective group id
9595

96+
/* attributes for the rendezvous socket */
97+
#define PMIX_SOCKET_MODE "pmix.sockmode" // (uint32_t) POSIX mode_t (9 bits valid)
98+
9699
/* general proc-level attributes */
97100
#define PMIX_CPUSET "pmix.cpuset" // (char*) hwloc bitmap applied to proc upon launch
98101
#define PMIX_CREDENTIAL "pmix.cred" // (char*) security credential assigned to proc

opal/mca/pmix/pmix114/pmix/src/buffer_ops/pack.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,9 @@ pmix_status_t pmix_bfrop_pack_float(pmix_buffer_t *buffer, const void *src,
332332
char *convert;
333333

334334
for (i = 0; i < num_vals; ++i) {
335-
asprintf(&convert, "%f", ssrc[i]);
335+
if (0 > asprintf(&convert, "%f", ssrc[i])) {
336+
return PMIX_ERR_NOMEM;
337+
}
336338
if (PMIX_SUCCESS != (ret = pmix_bfrop_pack_string(buffer, &convert, 1, PMIX_STRING))) {
337339
free(convert);
338340
return ret;
@@ -353,7 +355,9 @@ pmix_status_t pmix_bfrop_pack_double(pmix_buffer_t *buffer, const void *src,
353355
char *convert;
354356

355357
for (i = 0; i < num_vals; ++i) {
356-
asprintf(&convert, "%f", ssrc[i]);
358+
if (0 > asprintf(&convert, "%f", ssrc[i])) {
359+
return PMIX_ERR_NOMEM;
360+
}
357361
if (PMIX_SUCCESS != (ret = pmix_bfrop_pack_string(buffer, &convert, 1, PMIX_STRING))) {
358362
free(convert);
359363
return ret;

0 commit comments

Comments
 (0)