Skip to content

Commit 2a9f818

Browse files
author
rhc54
authored
Merge pull request #2267 from rhc54/topic/pmixup
Update to latest PMIx master
2 parents be3197f + 9131eca commit 2a9f818

Some content is hidden

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

49 files changed

+4155
-205
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=gitd2aa31f
33+
repo_rev=git967f3e3
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 13, 2016"
47+
date="Oct 20, 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/pmix3x/pmix/config/pmix.m4

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dnl Copyright (c) 2009 Los Alamos National Security, LLC. All rights
1717
dnl reserved.
1818
dnl Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved.
1919
dnl Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved.
20-
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
20+
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
2121
dnl Copyright (c) 2015-2016 Research Organization for Information Science
2222
dnl and Technology (RIST). All rights reserved.
2323
dnl Copyright (c) 2016 Mellanox Technologies, Inc.
@@ -312,14 +312,14 @@ AC_DEFUN([PMIX_SETUP_CORE],[
312312
pmix_show_title "Header file tests"
313313

314314
AC_CHECK_HEADERS([arpa/inet.h \
315-
fcntl.h inttypes.h libgen.h \
316-
netinet/in.h \
315+
fcntl.h ifaddrs.h inttypes.h libgen.h \
316+
net/if.h net/uio.h netinet/in.h \
317317
stdint.h stddef.h \
318318
stdlib.h string.h strings.h \
319-
sys/param.h \
320-
sys/select.h sys/socket.h \
319+
sys/ioctl.h sys/param.h \
320+
sys/select.h sys/socket.h sys/sockio.h \
321321
stdarg.h sys/stat.h sys/time.h \
322-
sys/types.h sys/un.h sys/uio.h net/uio.h \
322+
sys/types.h sys/un.h sys/uio.h \
323323
sys/wait.h syslog.h \
324324
time.h unistd.h dirent.h \
325325
crt_externs.h signal.h \
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
dnl -*- shell-script -*-
2+
dnl
3+
dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
4+
dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
5+
dnl Copyright (c) 2014 Research Organization for Information Science
6+
dnl and Technology (RIST). All rights reserved.
7+
dnl
8+
dnl $COPYRIGHT$
9+
dnl
10+
dnl Additional copyrights may follow
11+
dnl
12+
dnl $HEADER$
13+
dnl
14+
15+
# PMIX_CHECK_OS_FLAVOR_SPECIFIC()
16+
# ----------------------------------------------------
17+
# Helper macro from PMIX-CHECK-OS-FLAVORS(), below.
18+
# $1 = macro to look for
19+
# $2 = suffix of env variable to set with results
20+
AC_DEFUN([PMIX_CHECK_OS_FLAVOR_SPECIFIC],
21+
[
22+
AC_MSG_CHECKING([$1])
23+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
24+
[[#ifndef $1
25+
error: this isnt $1
26+
#endif
27+
]])],
28+
[pmix_found_$2=yes],
29+
[pmix_found_$2=no])
30+
AC_MSG_RESULT([$pmix_found_$2])
31+
])dnl
32+
33+
# PMIX_CHECK_OS_FLAVORS()
34+
# ----------------------------------------------------
35+
# Try to figure out the various OS flavors out there.
36+
#
37+
AC_DEFUN([PMIX_CHECK_OS_FLAVORS],
38+
[
39+
PMIX_CHECK_OS_FLAVOR_SPECIFIC([__NetBSD__], [netbsd])
40+
PMIX_CHECK_OS_FLAVOR_SPECIFIC([__FreeBSD__], [freebsd])
41+
PMIX_CHECK_OS_FLAVOR_SPECIFIC([__OpenBSD__], [openbsd])
42+
PMIX_CHECK_OS_FLAVOR_SPECIFIC([__DragonFly__], [dragonfly])
43+
PMIX_CHECK_OS_FLAVOR_SPECIFIC([__386BSD__], [386bsd])
44+
PMIX_CHECK_OS_FLAVOR_SPECIFIC([__bsdi__], [bsdi])
45+
PMIX_CHECK_OS_FLAVOR_SPECIFIC([__APPLE__], [apple])
46+
PMIX_CHECK_OS_FLAVOR_SPECIFIC([__linux__], [linux])
47+
PMIX_CHECK_OS_FLAVOR_SPECIFIC([__sun__], [sun])
48+
AS_IF([test "$pmix_found_sun" = "no"],
49+
PMIX_CHECK_OS_FLAVOR_SPECIFIC([__sun], [sun]))
50+
51+
AS_IF([test "$pmix_found_sun" = "yes"],
52+
[pmix_have_solaris=1
53+
CFLAGS="$CFLAGS -D_REENTRANT"
54+
CPPFLAGS="$CPPFLAGS -D_REENTRANT"],
55+
[pmix_have_solaris=0])
56+
AC_DEFINE_UNQUOTED([PMIX_HAVE_SOLARIS],
57+
[$pmix_have_solaris],
58+
[Whether or not we have solaris])
59+
60+
# check for sockaddr_in (a good sign we have TCP)
61+
AC_CHECK_HEADERS([netdb.h netinet/in.h netinet/tcp.h])
62+
AC_CHECK_TYPES([struct sockaddr_in],
63+
[pmix_found_sockaddr=yes],
64+
[pmix_found_sockaddr=no],
65+
[AC_INCLUDES_DEFAULT
66+
#ifdef HAVE_NETINET_IN_H
67+
#include <netinet/in.h>
68+
#endif])
69+
])dnl

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,6 @@ AC_DEFUN([_PMIX_LIBEVENT_EXTERNAL],[
116116
AC_MSG_WARN([PMIx requires libevent to be compiled with])
117117
AC_MSG_WARN([thread support enabled])
118118
AC_MSG_ERROR([Cannot continue])])
119-
# Chck if this libevent has the symbol
120-
# "libevent_global_shutdown", which will only exist in
121-
# libevent version 2.1.1+
122-
AC_CHECK_FUNCS([libevent_global_shutdown],[], [])
123119

124120
# Set output variables
125121
PMIX_EVENT_HEADER="<event.h>"

opal/mca/pmix/pmix3x/pmix/examples/fault.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ static void notification_fn(size_t evhdlr_registration_id,
4949
static void op_callbk(pmix_status_t status,
5050
void *cbdata)
5151
{
52-
fprintf(stderr, "client: OP CALLBACK CALLED WITH STATUS %d", status);
52+
fprintf(stderr, "Client %s:%d OP CALLBACK CALLED WITH STATUS %d\n", myproc.nspace, myproc.rank, status);
5353
}
5454

5555
static void errhandler_reg_callbk(pmix_status_t status,
5656
size_t errhandler_ref,
5757
void *cbdata)
5858
{
59-
fprintf(stderr, "client: ERRHANDLER REGISTRATION CALLBACK CALLED WITH STATUS %d, ref=%lu",
60-
status, (unsigned long)errhandler_ref);
59+
fprintf(stderr, "Client %s:%d ERRHANDLER REGISTRATION CALLBACK CALLED WITH STATUS %d, ref=%lu\n",
60+
myproc.nspace, myproc.rank, status, (unsigned long)errhandler_ref);
6161
}
6262

6363
int main(int argc, char **argv)
@@ -76,7 +76,9 @@ int main(int argc, char **argv)
7676
fprintf(stderr, "Client ns %s rank %d: Running\n", myproc.nspace, myproc.rank);
7777

7878
/* get our universe size */
79-
if (PMIX_SUCCESS != (rc = PMIx_Get(&myproc, PMIX_UNIV_SIZE, NULL, 0, &val))) {
79+
memcpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
80+
proc.rank = PMIX_RANK_WILDCARD;
81+
if (PMIX_SUCCESS != (rc = PMIx_Get(&proc, PMIX_UNIV_SIZE, NULL, 0, &val))) {
8082
fprintf(stderr, "Client ns %s rank %d: PMIx_Get universe size failed: %d\n", myproc.nspace, myproc.rank, rc);
8183
goto done;
8284
}
@@ -100,9 +102,9 @@ int main(int argc, char **argv)
100102

101103
/* rank=0 calls abort */
102104
if (0 == myproc.rank) {
103-
PMIx_Abort(PMIX_ERR_OUT_OF_RESOURCE, "Eat rocks",
104-
&proc, 1);
105-
fprintf(stderr, "Client ns %s rank %d: Abort called\n", myproc.nspace, myproc.rank);
105+
sleep(2);
106+
fprintf(stderr, "Client ns %s rank %d: exiting with error\n", myproc.nspace, myproc.rank);
107+
exit(1);
106108
}
107109
/* everyone simply waits */
108110
while (!completed) {

opal/mca/pmix/pmix3x/pmix/include/pmix_version.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Copyright (c) 2016 Mellanox Technologies, Inc.
33
* All rights reserved.
4-
* Copyright (c) 2016 Intel, Inc. All rights reserved.
4+
* Copyright (c) 2016 Intel, Inc. All rights reserved.
55
* $COPYRIGHT$
66
*
77
* Additional copyrights may follow

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,10 +571,12 @@ static void _getnbfn(int fd, short flags, void *cbdata)
571571

572572
/* otherwise, the data must be something they "put" */
573573
#if defined(PMIX_ENABLE_DSTORE) && (PMIX_ENABLE_DSTORE == 1)
574-
if (PMIX_SUCCESS == (rc = pmix_dstore_fetch(nptr->nspace, cb->rank, cb->key, &val))) {
574+
rc = pmix_dstore_fetch(nptr->nspace, cb->rank, cb->key, &val);
575575
#else
576-
if (PMIX_SUCCESS == (rc = pmix_hash_fetch(&nptr->modex, cb->rank, cb->key, &val))) {
576+
rc = pmix_hash_fetch(&nptr->modex, cb->rank, cb->key, &val);
577577
#endif /* PMIX_ENABLE_DSTORE */
578+
579+
if ( PMIX_SUCCESS == rc ) {
578580
pmix_output_verbose(2, pmix_globals.debug_output,
579581
"pmix_get[%d]: value retrieved from dstore", __LINE__);
580582
/* found it - we are in an event, so we can
@@ -607,6 +609,15 @@ static void _getnbfn(int fd, short flags, void *cbdata)
607609
"Unable to locally satisfy request for key=%s for rank = %d, namespace = %s",
608610
cb->key, cb->rank, cb->nspace);
609611
cb->checked = true; // flag that we are going to check this again
612+
} else if (PMIX_ERR_PROC_ENTRY_NOT_FOUND != rc) {
613+
/* errors are fatal */
614+
cb->value_cbfunc(rc, NULL, cb->cbdata);
615+
/* protect the data */
616+
cb->procs = NULL;
617+
cb->key = NULL;
618+
cb->info = NULL;
619+
PMIX_RELEASE(cb);
620+
return;
610621
}
611622

612623
request:

opal/mca/pmix/pmix3x/pmix/src/dstore/pmix_dstore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Copyright (c) 2016 Mellanox Technologies, Inc.
33
* All rights reserved.
4-
* Copyright (c) 2016 Intel, Inc. All rights reserved.
4+
* Copyright (c) 2016 Intel, Inc. All rights reserved.
55
* $COPYRIGHT$
66
*
77
* Additional copyrights may follow

opal/mca/pmix/pmix3x/pmix/src/dstore/pmix_dstore.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ BEGIN_C_DECLS
2525
int pmix_dstore_init(pmix_info_t info[], size_t ninfo);
2626
void pmix_dstore_finalize(void);
2727
int pmix_dstore_store(const char *nspace, pmix_rank_t rank, pmix_kval_t *kv);
28+
29+
/*
30+
* Return codes:
31+
* - PMIX_ERR_BAD_PARAM - bad parameters - can't proceed.
32+
* - PMIX_ERR_FATAL - fatal error
33+
* - PMIX_ERR_NOT_FOUND - we have the BLOB for the process but the
34+
* requested key wasn't found there
35+
* - PMIX_ERR_PROC_ENTRY_NOT_FOUND - the BLOB for the process wasn't
36+
* found - need to request it from the server.
37+
*/
2838
int pmix_dstore_fetch(const char *nspace, pmix_rank_t rank,
2939
const char *key, pmix_value_t **kvs);
3040
int pmix_dstore_patch_env(const char *nspace, char ***env);

0 commit comments

Comments
 (0)