Skip to content

Commit c24ba53

Browse files
authored
Merge pull request #2958 from jjhursey/topic/v2.x-pmix-1.2.1
pmix/pmix112: Update to PMIx 1.2.1 release
2 parents b79a9fa + 0933ed6 commit c24ba53

25 files changed

+1126
-429
lines changed

opal/mca/pmix/pmix112/pmix/NEWS

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
2-
Copyright (c) 2016 IBM Corporation. All rights reserved.
2+
Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
33
$COPYRIGHT$
44

55
Additional copyrights may follow
@@ -20,6 +20,14 @@ other, a single NEWS-worthy item might apply to different series. For
2020
example, a bug might be fixed in the master, and then moved to the
2121
current release as well as the "stable" bug fix release branch.
2222

23+
1.2.1
24+
-----
25+
- dstore: Fix data corruption bug in key overwrite cases
26+
- dstore: Performance and scalability fixes
27+
- sm: Use posix_fallocate() before mmap
28+
- pmi1/pmi2: Restore support
29+
- dstore: Fix extension slot size allocation (Issue #280)
30+
2331

2432
1.2.0
2533
-----

opal/mca/pmix/pmix112/pmix/VERSION

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright (c) 2013 Mellanox Technologies, Inc.
55
# All rights reserved.
66
# Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
7-
# Copyright (c) 2016 IBM Corporation. All rights reserved.
7+
# Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
88

99
# This is the VERSION file for PMIx, describing the precise
1010
# version of PMIx in this distribution. The various components of
@@ -16,7 +16,7 @@
1616

1717
major=1
1818
minor=2
19-
release=0
19+
release=1
2020

2121
# greek is used for alpha or beta release tags. If it is non-empty,
2222
# it will be appended to the version number. It does not have to be
@@ -31,7 +31,7 @@ greek=
3131
# command, or with the date (if "git describe" fails) in the form of
3232
# "date<date>".
3333

34-
repo_rev=git33736edb
34+
repo_rev=gitef61cf0a
3535

3636
# If tarball_version is not empty, it is used as the version string in
3737
# the tarball filename, regardless of all other versions listed in
@@ -45,7 +45,7 @@ tarball_version=
4545

4646
# The date when this release was created
4747

48-
date="Dec 14, 2016"
48+
date="Feb 21, 2017"
4949

5050
# The shared library version of each of PMIx's public libraries.
5151
# These versions are maintained in accordance with the "Library

opal/mca/pmix/pmix112/pmix/config/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ EXTRA_DIST += \
4040
config/pmix_check_sasl.m4 \
4141
config/pmix_check_vendor.m4 \
4242
config/pmix_check_visibility.m4 \
43+
config/pmix_check_lock.m4 \
4344
config/pmix_ensure_contains_optflags.m4 \
4445
config/pmix_functions.m4 \
4546
config/pmix.m4 \
@@ -48,6 +49,5 @@ EXTRA_DIST += \
4849
config/pmix_setup_hwloc.m4 \
4950
config/pmix_setup_libevent.m4
5051

51-
5252
maintainer-clean-local:
5353
rm -f config/pmix_get_version.sh

opal/mca/pmix/pmix112/pmix/config/pmix.m4

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ 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.
2020
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved
21-
dnl Copyright (c) 2015 Research Organization for Information Science
21+
dnl Copyright (c) 2015-2017 Research Organization for Information Science
2222
dnl and Technology (RIST). All rights reserved.
2323
dnl Copyright (c) 2016 Mellanox Technologies, Inc.
2424
dnl All rights reserved.
@@ -500,7 +500,7 @@ AC_DEFUN([PMIX_SETUP_CORE],[
500500
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
501501
PMIX_SEARCH_LIBS_CORE([ceil], [m])
502502

503-
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strsignal socketpair strncpy_s usleep statfs statvfs getpeereid getpeerucred strnlen])
503+
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strsignal socketpair strncpy_s usleep statfs statvfs getpeereid getpeerucred strnlen posix_fallocate])
504504

505505
# On some hosts, htonl is a define, so the AC_CHECK_FUNC will get
506506
# confused. On others, it's in the standard library, but stubbed with
@@ -594,6 +594,14 @@ AC_DEFUN([PMIX_SETUP_CORE],[
594594

595595
PMIX_MUNGE_CONFIG
596596

597+
##################################
598+
# Dstore Locking
599+
##################################
600+
601+
pmix_show_title "Dstore Locking"
602+
603+
PMIX_CHECK_DSTOR_LOCK
604+
597605
############################################################################
598606
# final compiler config
599607
############################################################################
@@ -778,6 +786,22 @@ AC_DEFINE_UNQUOTED([PMIX_ENABLE_DSTORE],
778786
[if want shared memory dstore feature])
779787
AM_CONDITIONAL([WANT_DSTORE],[test "x$enable_dstore" != "xno"])
780788

789+
#
790+
# Use pthread-based locking
791+
#
792+
DSTORE_PTHREAD_LOCK="1"
793+
AC_MSG_CHECKING([if want dstore pthread-based locking])
794+
AC_ARG_ENABLE([dstore-pthlck],
795+
[AC_HELP_STRING([--disable-dstore-pthlck],
796+
[Disable pthread-based lockig in dstor (default: enabled)])])
797+
if test "$enable_dstore_pthlck" == "no" ; then
798+
AC_MSG_RESULT([no])
799+
DSTORE_PTHREAD_LOCK="0"
800+
else
801+
AC_MSG_RESULT([yes])
802+
DSTORE_PTHREAD_LOCK="1"
803+
fi
804+
781805
#
782806
# Ident string
783807
#

opal/mca/pmix/pmix112/pmix/config/pmix_check_compiler_version.m4

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dnl -*- shell-script -*-
22
dnl
33
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
4-
dnl Copyright (c) 2013 Intel, Inc. All rights reserved
4+
dnl Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
55
dnl
66
dnl $COPYRIGHT$
77
dnl
@@ -35,7 +35,6 @@ AC_DEFUN([PMIX_CHECK_COMPILER], [
3535
AC_TRY_RUN([
3636
#include <stdio.h>
3737
#include <stdlib.h>
38-
#include "pmix_portable_platform.h"
3938

4039
int main (int argc, char * argv[])
4140
{
@@ -68,7 +67,6 @@ AC_DEFUN([PMIX_CHECK_COMPILER_STRINGIFY], [
6867
AC_TRY_RUN([
6968
#include <stdio.h>
7069
#include <stdlib.h>
71-
#include "pmix_portable_platform.h"
7270

7371
int main (int argc, char * argv[])
7472
{
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
dnl -*- shell-script -*-
2+
dnl
3+
dnl Copyright (c) 2017 Mellanox Technologies, Inc.
4+
dnl All rights reserved.
5+
dnl Copyright (c) 2017 IBM Corporation. All rights reserved.
6+
dnl $COPYRIGHT$
7+
dnl
8+
dnl Additional copyrights may follow
9+
dnl
10+
dnl $HEADER$
11+
dnl
12+
13+
AC_DEFUN([PMIX_CHECK_DSTOR_LOCK],[
14+
orig_libs=$LIBS
15+
LIBS="-lpthread $LIBS"
16+
17+
_x_ac_pthread_lock_found="0"
18+
_x_ac_fcntl_lock_found="0"
19+
20+
AC_CHECK_MEMBERS([struct flock.l_type],
21+
[
22+
AC_DEFINE([HAVE_FCNTL_FLOCK], [1],
23+
[Define to 1 if you have the locking by fcntl.])
24+
_x_ac_fcntl_lock_found="1"
25+
], [], [#include <fcntl.h>])
26+
27+
if test "$DSTORE_PTHREAD_LOCK" == "1"; then
28+
AC_CHECK_FUNC([pthread_rwlockattr_setkind_np],
29+
[AC_EGREP_HEADER([PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP],
30+
[pthread.h],[
31+
AC_DEFINE([HAVE_PTHREAD_SETKIND], [1],
32+
[Define to 1 if you have the `pthread_rwlockattr_setkind_np` function.])])])
33+
34+
AC_CHECK_FUNC([pthread_rwlockattr_setpshared],
35+
[AC_EGREP_HEADER([PTHREAD_PROCESS_SHARED],
36+
[pthread.h],[
37+
AC_DEFINE([HAVE_PTHREAD_SHARED], [1],
38+
[Define to 1 if you have the `PTHREAD_PROCESS_SHARED` definition.
39+
])
40+
_x_ac_pthread_lock_found="1"
41+
])
42+
])
43+
44+
if test "$_x_ac_pthread_lock_found" == "0"; then
45+
if test "$_x_ac_fcntl_lock_found" == "1"; then
46+
AC_MSG_WARN([dstore: pthread-based locking not found, will use fcntl-based locking.])
47+
else
48+
AC_MSG_ERROR([dstore: no available locking mechanisms was found. Can not continue. Try disabling dstore])
49+
fi
50+
fi
51+
else
52+
if test "$_x_ac_fcntl_lock_found" == "0"; then
53+
AC_MSG_ERROR([dstore: no available locking mechanisms was found. Can not continue. Try disabling dstore])
54+
fi
55+
fi
56+
57+
LIBS="$orig_libs"
58+
])

opal/mca/pmix/pmix112/pmix/config/pmix_functions.m4

Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -317,103 +317,6 @@ dnl #######################################################################
317317
dnl #######################################################################
318318
dnl #######################################################################
319319

320-
# Remove all duplicate -I, -L, and -l flags from the variable named $1
321-
AC_DEFUN([PMIX_FLAGS_UNIQ],[
322-
# 1 is the variable name to be uniq-ized
323-
pmix_name=$1
324-
325-
# Go through each item in the variable and only keep the unique ones
326-
327-
pmix_count=0
328-
for val in ${$1}; do
329-
pmix_done=0
330-
pmix_i=1
331-
pmix_found=0
332-
333-
# Loop over every token we've seen so far
334-
335-
pmix_done="`expr $pmix_i \> $pmix_count`"
336-
while test "$pmix_found" = "0" && test "$pmix_done" = "0"; do
337-
338-
# Have we seen this token already? Prefix the comparison
339-
# with "x" so that "-Lfoo" values won't be cause an error.
340-
341-
pmix_eval="expr x$val = x\$pmix_array_$pmix_i"
342-
pmix_found=`eval $pmix_eval`
343-
344-
# Check the ending condition
345-
346-
pmix_done="`expr $pmix_i \>= $pmix_count`"
347-
348-
# Increment the counter
349-
350-
pmix_i="`expr $pmix_i + 1`"
351-
done
352-
353-
# Check for special cases where we do want to allow repeated
354-
# arguments (per
355-
# http://www.open-mpi.org/community/lists/devel/2012/08/11362.php
356-
# and
357-
# https://github.com/open-mpi/ompi/issues/324).
358-
359-
case $val in
360-
-Xclang)
361-
pmix_found=0
362-
pmix_i=`expr $pmix_count + 1`
363-
;;
364-
-framework)
365-
pmix_found=0
366-
pmix_i=`expr $pmix_count + 1`
367-
;;
368-
--param)
369-
pmix_found=0
370-
pmix_i=`expr $pmix_count + 1`
371-
;;
372-
esac
373-
374-
# If we didn't find the token, add it to the "array"
375-
376-
if test "$pmix_found" = "0"; then
377-
pmix_eval="pmix_array_$pmix_i=$val"
378-
eval $pmix_eval
379-
pmix_count="`expr $pmix_count + 1`"
380-
else
381-
pmix_i="`expr $pmix_i - 1`"
382-
fi
383-
done
384-
385-
# Take all the items in the "array" and assemble them back into a
386-
# single variable
387-
388-
pmix_i=1
389-
pmix_done="`expr $pmix_i \> $pmix_count`"
390-
pmix_newval=
391-
while test "$pmix_done" = "0"; do
392-
pmix_eval="pmix_newval=\"$pmix_newval \$pmix_array_$pmix_i\""
393-
eval $pmix_eval
394-
395-
pmix_eval="unset pmix_array_$pmix_i"
396-
eval $pmix_eval
397-
398-
pmix_done="`expr $pmix_i \>= $pmix_count`"
399-
pmix_i="`expr $pmix_i + 1`"
400-
done
401-
402-
# Done; do the assignment
403-
404-
pmix_newval="`echo $pmix_newval`"
405-
pmix_eval="$pmix_name=\"$pmix_newval\""
406-
eval $pmix_eval
407-
408-
# Clean up
409-
410-
unset pmix_name pmix_i pmix_done pmix_newval pmix_eval pmix_count
411-
])dnl
412-
413-
dnl #######################################################################
414-
dnl #######################################################################
415-
dnl #######################################################################
416-
417320
# PMIX_APPEND_UNIQ(variable, new_argument)
418321
# ----------------------------------------
419322
# Append new_argument to variable if not already in variable. This assumes a

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ AC_DEFUN([PMIX_SETUP_CC],[
7272
if test "$WANT_DEBUG" = "1" && test "$enable_debug_symbols" != "no" ; then
7373
CFLAGS="$CFLAGS -g"
7474

75-
PMIX_FLAGS_UNIQ(CFLAGS)
75+
PMIX_UNIQ(CFLAGS)
7676
AC_MSG_WARN([-g has been added to CFLAGS (--enable-debug)])
7777
fi
7878

@@ -138,7 +138,7 @@ AC_DEFUN([PMIX_SETUP_CC],[
138138
fi
139139

140140
CFLAGS="$CFLAGS_orig $add"
141-
PMIX_FLAGS_UNIQ(CFLAGS)
141+
PMIX_UNIQ(CFLAGS)
142142
AC_MSG_WARN([$add has been added to CFLAGS (--enable-picky)])
143143
unset add
144144
fi
@@ -188,7 +188,7 @@ AC_DEFUN([PMIX_SETUP_CC],[
188188
fi
189189
CFLAGS="$CFLAGS_orig$add"
190190

191-
PMIX_FLAGS_UNIQ(CFLAGS)
191+
PMIX_UNIQ(CFLAGS)
192192
AC_MSG_WARN([$add has been added to CFLAGS])
193193
unset add
194194
fi
@@ -217,7 +217,7 @@ AC_DEFUN([PMIX_SETUP_CC],[
217217
fi
218218

219219
CFLAGS="${CFLAGS_orig}${add}"
220-
PMIX_FLAGS_UNIQ([CFLAGS])
220+
PMIX_UNIQ([CFLAGS])
221221
if test "$add" != "" ; then
222222
AC_MSG_WARN([$add has been added to CFLAGS])
223223
fi

opal/mca/pmix/pmix112/pmix/src/client/pmi1.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,30 @@ PMIX_EXPORT int PMI_KVS_Get( const char kvsname[], const char key[], char value[
202202
pmix_output_verbose(2, pmix_globals.debug_output,
203203
"PMI_KVS_Get: KVS=%s, key=%s value=%s", kvsname, key, value);
204204

205+
/* PMI-1 expects resource manager to set
206+
* process mapping in ANL notation. */
207+
if (!strcmp(key, ANL_MAPPING)) {
208+
/* we are looking in the job-data. If there is nothing there
209+
* we don't want to look in rank's data, thus set rank to widcard */
210+
proc = myproc;
211+
proc.rank = PMIX_RANK_WILDCARD;
212+
if (PMIX_SUCCESS == PMIx_Get(&proc, PMIX_ANL_MAP, NULL, 0, &val) &&
213+
(NULL != val) && (PMIX_STRING == val->type)) {
214+
strncpy(value, val->data.string, length);
215+
PMIX_VALUE_FREE(val, 1);
216+
return PMI_SUCCESS;
217+
} else {
218+
/* artpol:
219+
* Some RM's (i.e. SLURM) already have ANL precomputed. The export it
220+
* through PMIX_ANL_MAP variable.
221+
* If we haven't found it we want to have our own packing functionality
222+
* since it's common.
223+
* Somebody else has to write it since I've already done that for
224+
* GPL'ed SLURM :) */
225+
return PMI_FAIL;
226+
}
227+
}
228+
205229
/* retrieve the data from PMIx - since we don't have a rank,
206230
* we indicate that by passing the UNDEF value */
207231
(void)strncpy(proc.nspace, kvsname, PMIX_MAX_NSLEN);
@@ -344,6 +368,10 @@ PMIX_EXPORT int PMI_Get_appnum(int *appnum)
344368
if (PMIX_SUCCESS == rc) {
345369
rc = convert_int(appnum, val);
346370
PMIX_VALUE_RELEASE(val);
371+
} else if( PMIX_ERR_NOT_FOUND == rc ){
372+
/* this is optional value, set to 0 */
373+
*appnum = 0;
374+
rc = PMIX_SUCCESS;
347375
}
348376

349377
PMIX_INFO_DESTRUCT(&info[0]);

0 commit comments

Comments
 (0)