Skip to content

Commit 698dac1

Browse files
author
rhc54
authored
Merge pull request #2309 from rhc54/topic/pmix
Update to latest PMIx master - mostly updates example codes, but incl…
2 parents e9aab63 + f4a5511 commit 698dac1

File tree

8 files changed

+28
-18
lines changed

8 files changed

+28
-18
lines changed

opal/mca/pmix/pmix3x/configure.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ AC_DEFUN([MCA_opal_pmix_pmix3x_CONFIG],[
4141
[AC_HELP_STRING([--enable-pmix3-dstore],
4242
[Enable PMIx shared memory data store (default: disabled)])])
4343
AC_MSG_CHECKING([if PMIx3 shared memory data store is enabled])
44-
if test "$enable_pmix3_dstore" == "yes"; then
44+
if test "$enable_pmix3_dstore" != "no"; then
4545
AC_MSG_RESULT([yes])
4646
opal_pmix_pmix3x_sm_flag=--enable-dstore
4747
else

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=git38811ec
33+
repo_rev=gitb041846
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 26, 2016"
47+
date="Oct 27, 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/examples/client.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ int main(int argc, char **argv)
5151
}
5252
fprintf(stderr, "Client ns %s rank %d: Running\n", myproc.nspace, myproc.rank);
5353

54+
PMIX_PROC_CONSTRUCT(&proc);
55+
(void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
56+
proc.rank = PMIX_RANK_WILDCARD;
57+
5458
/* get our universe size */
55-
if (PMIX_SUCCESS != (rc = PMIx_Get(&myproc, PMIX_UNIV_SIZE, NULL, 0, &val))) {
59+
if (PMIX_SUCCESS != (rc = PMIx_Get(&proc, PMIX_UNIV_SIZE, NULL, 0, &val))) {
5660
fprintf(stderr, "Client ns %s rank %d: PMIx_Get universe size failed: %d\n", myproc.nspace, myproc.rank, rc);
5761
goto done;
5862
}
@@ -100,9 +104,6 @@ int main(int argc, char **argv)
100104
}
101105

102106
/* call fence to ensure the data is received */
103-
PMIX_PROC_CONSTRUCT(&proc);
104-
(void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
105-
proc.rank = PMIX_RANK_WILDCARD;
106107
PMIX_INFO_CREATE(info, 1);
107108
flag = true;
108109
PMIX_INFO_LOAD(info, PMIX_COLLECT_DATA, &flag, PMIX_BOOL);

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ int main(int argc, char **argv)
108108
fprintf(stderr, "Client ns %s rank %d: Running\n", myproc.nspace, myproc.rank);
109109

110110
/* get our universe size */
111-
if (PMIX_SUCCESS != (rc = PMIx_Get(&myproc, PMIX_UNIV_SIZE, NULL, 0, &val))) {
111+
PMIX_PROC_CONSTRUCT(&proc);
112+
(void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
113+
proc.rank = PMIX_RANK_WILDCARD;
114+
if (PMIX_SUCCESS != (rc = PMIx_Get(&proc, PMIX_UNIV_SIZE, NULL, 0, &val))) {
112115
fprintf(stderr, "Client ns %s rank %d: PMIx_Get universe size failed: %d\n", myproc.nspace, myproc.rank, rc);
113116
goto done;
114117
}

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ int main(int argc, char **argv)
6767
}
6868
fprintf(stderr, "Client ns %s rank %d: Running\n", myproc.nspace, myproc.rank);
6969

70+
PMIX_PROC_CONSTRUCT(&proc);
71+
(void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
72+
proc.rank = PMIX_RANK_WILDCARD;
73+
7074
/* get our universe size */
71-
if (PMIX_SUCCESS != (rc = PMIx_Get(&myproc, PMIX_UNIV_SIZE, NULL, 0, &val))) {
75+
if (PMIX_SUCCESS != (rc = PMIx_Get(&proc, PMIX_UNIV_SIZE, NULL, 0, &val))) {
7276
fprintf(stderr, "Client ns %s rank %d: PMIx_Get universe size failed: %d\n", myproc.nspace, myproc.rank, rc);
7377
goto done;
7478
}
@@ -77,7 +81,6 @@ int main(int argc, char **argv)
7781
fprintf(stderr, "Client %s:%d universe size %d\n", myproc.nspace, myproc.rank, nprocs);
7882

7983
/* call fence to sync */
80-
PMIX_PROC_CONSTRUCT(&proc);
8184
(void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
8285
proc.rank = PMIX_RANK_WILDCARD;
8386
if (PMIX_SUCCESS != (rc = PMIx_Fence(&proc, 1, NULL, 0))) {
@@ -181,7 +184,6 @@ int main(int argc, char **argv)
181184

182185
done:
183186
/* call fence to sync */
184-
PMIX_PROC_CONSTRUCT(&proc);
185187
(void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
186188
proc.rank = PMIX_RANK_WILDCARD;
187189
if (PMIX_SUCCESS != (rc = PMIx_Fence(&proc, 1, NULL, 0))) {

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ int main(int argc, char **argv)
7575
}
7676
fprintf(stderr, "Client ns %s rank %d: Running\n", myproc.nspace, myproc.rank);
7777

78-
/* get our universe size */
79-
memcpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
78+
PMIX_PROC_CONSTRUCT(&proc);
79+
(void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
8080
proc.rank = PMIX_RANK_WILDCARD;
81+
82+
/* get our universe size */
8183
if (PMIX_SUCCESS != (rc = PMIx_Get(&proc, PMIX_UNIV_SIZE, NULL, 0, &val))) {
8284
fprintf(stderr, "Client ns %s rank %d: PMIx_Get universe size failed: %d\n", myproc.nspace, myproc.rank, rc);
8385
goto done;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ int main(int argc, char **argv)
5050
fprintf(stderr, "Client ns %s rank %d: Running\n", myproc.nspace, myproc.rank);
5151

5252
/* get our universe size */
53-
if (PMIX_SUCCESS != (rc = PMIx_Get(&myproc, PMIX_UNIV_SIZE, NULL, 0, &val))) {
53+
PMIX_PROC_CONSTRUCT(&proc);
54+
(void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
55+
proc.rank = PMIX_RANK_WILDCARD;
56+
if (PMIX_SUCCESS != (rc = PMIx_Get(&proc, PMIX_UNIV_SIZE, NULL, 0, &val))) {
5457
fprintf(stderr, "Client ns %s rank %d: PMIx_Get universe size failed: %d\n", myproc.nspace, myproc.rank, rc);
5558
goto done;
5659
}
@@ -59,9 +62,6 @@ int main(int argc, char **argv)
5962
fprintf(stderr, "Client %s:%d universe size %d\n", myproc.nspace, myproc.rank, nprocs);
6063

6164
/* call fence to ensure the data is received */
62-
PMIX_PROC_CONSTRUCT(&proc);
63-
(void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
64-
proc.rank = PMIX_RANK_WILDCARD;
6565
if (PMIX_SUCCESS != (rc = PMIx_Fence(&proc, 1, NULL, 0))) {
6666
fprintf(stderr, "Client ns %s rank %d: PMIx_Fence failed: %d\n", myproc.nspace, myproc.rank, rc);
6767
goto done;

opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_finalize.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* Copyright (c) 2010-2015 Los Alamos National Security, LLC.
1414
* All rights reserved.
1515
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved
16+
* Copyright (c) 2016 Research Organization for Information Science
17+
* and Technology (RIST). All rights reserved.
1618
* $COPYRIGHT$
1719
*
1820
* Additional copyrights may follow
@@ -89,7 +91,6 @@ void pmix_rte_finalize(void)
8991
(void)pmix_mca_base_framework_close(&pmix_psec_base_framework);
9092

9193
/* finalize the mca */
92-
(void)pmix_mca_base_close();
9394
/* Clear out all the registered MCA params */
9495
pmix_deregister_params();
9596
pmix_mca_base_var_finalize();
@@ -98,6 +99,7 @@ void pmix_rte_finalize(void)
9899
pmix_util_keyval_parse_finalize();
99100

100101
(void)pmix_mca_base_framework_close(&pmix_pinstalldirs_base_framework);
102+
(void)pmix_mca_base_close();
101103

102104
/* finalize the show_help system */
103105
pmix_show_help_finalize();

0 commit comments

Comments
 (0)