Skip to content

pmix/pmix112: Update to PMIx 1.2.1 release #2958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion opal/mca/pmix/pmix112/pmix/NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
Copyright (c) 2016 IBM Corporation. All rights reserved.
Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
$COPYRIGHT$

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

1.2.1
-----
- dstore: Fix data corruption bug in key overwrite cases
- dstore: Performance and scalability fixes
- sm: Use posix_fallocate() before mmap
- pmi1/pmi2: Restore support
- dstore: Fix extension slot size allocation (Issue #280)


1.2.0
-----
Expand Down
8 changes: 4 additions & 4 deletions opal/mca/pmix/pmix112/pmix/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
# Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# Copyright (c) 2016-2017 IBM Corporation. All rights reserved.

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

major=1
minor=2
release=0
release=1

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

repo_rev=git33736edb
repo_rev=gitef61cf0a

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

# The date when this release was created

date="Dec 14, 2016"
date="Feb 21, 2017"

# The shared library version of each of PMIx's public libraries.
# These versions are maintained in accordance with the "Library
Expand Down
2 changes: 1 addition & 1 deletion opal/mca/pmix/pmix112/pmix/config/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ EXTRA_DIST += \
config/pmix_check_sasl.m4 \
config/pmix_check_vendor.m4 \
config/pmix_check_visibility.m4 \
config/pmix_check_lock.m4 \
config/pmix_ensure_contains_optflags.m4 \
config/pmix_functions.m4 \
config/pmix.m4 \
Expand All @@ -48,6 +49,5 @@ EXTRA_DIST += \
config/pmix_setup_hwloc.m4 \
config/pmix_setup_libevent.m4


maintainer-clean-local:
rm -f config/pmix_get_version.sh
28 changes: 26 additions & 2 deletions opal/mca/pmix/pmix112/pmix/config/pmix.m4
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dnl reserved.
dnl Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved.
dnl Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved.
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved
dnl Copyright (c) 2015 Research Organization for Information Science
dnl Copyright (c) 2015-2017 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl Copyright (c) 2016 Mellanox Technologies, Inc.
dnl All rights reserved.
Expand Down Expand Up @@ -500,7 +500,7 @@ AC_DEFUN([PMIX_SETUP_CORE],[
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
PMIX_SEARCH_LIBS_CORE([ceil], [m])

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

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

PMIX_MUNGE_CONFIG

##################################
# Dstore Locking
##################################

pmix_show_title "Dstore Locking"

PMIX_CHECK_DSTOR_LOCK

############################################################################
# final compiler config
############################################################################
Expand Down Expand Up @@ -778,6 +786,22 @@ AC_DEFINE_UNQUOTED([PMIX_ENABLE_DSTORE],
[if want shared memory dstore feature])
AM_CONDITIONAL([WANT_DSTORE],[test "x$enable_dstore" != "xno"])

#
# Use pthread-based locking
#
DSTORE_PTHREAD_LOCK="1"
AC_MSG_CHECKING([if want dstore pthread-based locking])
AC_ARG_ENABLE([dstore-pthlck],
[AC_HELP_STRING([--disable-dstore-pthlck],
[Disable pthread-based lockig in dstor (default: enabled)])])
if test "$enable_dstore_pthlck" == "no" ; then
AC_MSG_RESULT([no])
DSTORE_PTHREAD_LOCK="0"
else
AC_MSG_RESULT([yes])
DSTORE_PTHREAD_LOCK="1"
fi

#
# Ident string
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
dnl Copyright (c) 2013 Intel, Inc. All rights reserved
dnl Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
dnl
dnl $COPYRIGHT$
dnl
Expand Down Expand Up @@ -35,7 +35,6 @@ AC_DEFUN([PMIX_CHECK_COMPILER], [
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include "pmix_portable_platform.h"

int main (int argc, char * argv[])
{
Expand Down Expand Up @@ -68,7 +67,6 @@ AC_DEFUN([PMIX_CHECK_COMPILER_STRINGIFY], [
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include "pmix_portable_platform.h"

int main (int argc, char * argv[])
{
Expand Down
58 changes: 58 additions & 0 deletions opal/mca/pmix/pmix112/pmix/config/pmix_check_lock.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2017 Mellanox Technologies, Inc.
dnl All rights reserved.
dnl Copyright (c) 2017 IBM Corporation. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl

AC_DEFUN([PMIX_CHECK_DSTOR_LOCK],[
orig_libs=$LIBS
LIBS="-lpthread $LIBS"

_x_ac_pthread_lock_found="0"
_x_ac_fcntl_lock_found="0"

AC_CHECK_MEMBERS([struct flock.l_type],
[
AC_DEFINE([HAVE_FCNTL_FLOCK], [1],
[Define to 1 if you have the locking by fcntl.])
_x_ac_fcntl_lock_found="1"
], [], [#include <fcntl.h>])

if test "$DSTORE_PTHREAD_LOCK" == "1"; then
AC_CHECK_FUNC([pthread_rwlockattr_setkind_np],
[AC_EGREP_HEADER([PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP],
[pthread.h],[
AC_DEFINE([HAVE_PTHREAD_SETKIND], [1],
[Define to 1 if you have the `pthread_rwlockattr_setkind_np` function.])])])

AC_CHECK_FUNC([pthread_rwlockattr_setpshared],
[AC_EGREP_HEADER([PTHREAD_PROCESS_SHARED],
[pthread.h],[
AC_DEFINE([HAVE_PTHREAD_SHARED], [1],
[Define to 1 if you have the `PTHREAD_PROCESS_SHARED` definition.
])
_x_ac_pthread_lock_found="1"
])
])

if test "$_x_ac_pthread_lock_found" == "0"; then
if test "$_x_ac_fcntl_lock_found" == "1"; then
AC_MSG_WARN([dstore: pthread-based locking not found, will use fcntl-based locking.])
else
AC_MSG_ERROR([dstore: no available locking mechanisms was found. Can not continue. Try disabling dstore])
fi
fi
else
if test "$_x_ac_fcntl_lock_found" == "0"; then
AC_MSG_ERROR([dstore: no available locking mechanisms was found. Can not continue. Try disabling dstore])
fi
fi

LIBS="$orig_libs"
])
97 changes: 0 additions & 97 deletions opal/mca/pmix/pmix112/pmix/config/pmix_functions.m4
Original file line number Diff line number Diff line change
Expand Up @@ -317,103 +317,6 @@ dnl #######################################################################
dnl #######################################################################
dnl #######################################################################

# Remove all duplicate -I, -L, and -l flags from the variable named $1
AC_DEFUN([PMIX_FLAGS_UNIQ],[
# 1 is the variable name to be uniq-ized
pmix_name=$1

# Go through each item in the variable and only keep the unique ones

pmix_count=0
for val in ${$1}; do
pmix_done=0
pmix_i=1
pmix_found=0

# Loop over every token we've seen so far

pmix_done="`expr $pmix_i \> $pmix_count`"
while test "$pmix_found" = "0" && test "$pmix_done" = "0"; do

# Have we seen this token already? Prefix the comparison
# with "x" so that "-Lfoo" values won't be cause an error.

pmix_eval="expr x$val = x\$pmix_array_$pmix_i"
pmix_found=`eval $pmix_eval`

# Check the ending condition

pmix_done="`expr $pmix_i \>= $pmix_count`"

# Increment the counter

pmix_i="`expr $pmix_i + 1`"
done

# Check for special cases where we do want to allow repeated
# arguments (per
# http://www.open-mpi.org/community/lists/devel/2012/08/11362.php
# and
# https://github.com/open-mpi/ompi/issues/324).

case $val in
-Xclang)
pmix_found=0
pmix_i=`expr $pmix_count + 1`
;;
-framework)
pmix_found=0
pmix_i=`expr $pmix_count + 1`
;;
--param)
pmix_found=0
pmix_i=`expr $pmix_count + 1`
;;
esac

# If we didn't find the token, add it to the "array"

if test "$pmix_found" = "0"; then
pmix_eval="pmix_array_$pmix_i=$val"
eval $pmix_eval
pmix_count="`expr $pmix_count + 1`"
else
pmix_i="`expr $pmix_i - 1`"
fi
done

# Take all the items in the "array" and assemble them back into a
# single variable

pmix_i=1
pmix_done="`expr $pmix_i \> $pmix_count`"
pmix_newval=
while test "$pmix_done" = "0"; do
pmix_eval="pmix_newval=\"$pmix_newval \$pmix_array_$pmix_i\""
eval $pmix_eval

pmix_eval="unset pmix_array_$pmix_i"
eval $pmix_eval

pmix_done="`expr $pmix_i \>= $pmix_count`"
pmix_i="`expr $pmix_i + 1`"
done

# Done; do the assignment

pmix_newval="`echo $pmix_newval`"
pmix_eval="$pmix_name=\"$pmix_newval\""
eval $pmix_eval

# Clean up

unset pmix_name pmix_i pmix_done pmix_newval pmix_eval pmix_count
])dnl

dnl #######################################################################
dnl #######################################################################
dnl #######################################################################

# PMIX_APPEND_UNIQ(variable, new_argument)
# ----------------------------------------
# Append new_argument to variable if not already in variable. This assumes a
Expand Down
8 changes: 4 additions & 4 deletions opal/mca/pmix/pmix112/pmix/config/pmix_setup_cc.m4
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ AC_DEFUN([PMIX_SETUP_CC],[
if test "$WANT_DEBUG" = "1" && test "$enable_debug_symbols" != "no" ; then
CFLAGS="$CFLAGS -g"

PMIX_FLAGS_UNIQ(CFLAGS)
PMIX_UNIQ(CFLAGS)
AC_MSG_WARN([-g has been added to CFLAGS (--enable-debug)])
fi

Expand Down Expand Up @@ -138,7 +138,7 @@ AC_DEFUN([PMIX_SETUP_CC],[
fi

CFLAGS="$CFLAGS_orig $add"
PMIX_FLAGS_UNIQ(CFLAGS)
PMIX_UNIQ(CFLAGS)
AC_MSG_WARN([$add has been added to CFLAGS (--enable-picky)])
unset add
fi
Expand Down Expand Up @@ -188,7 +188,7 @@ AC_DEFUN([PMIX_SETUP_CC],[
fi
CFLAGS="$CFLAGS_orig$add"

PMIX_FLAGS_UNIQ(CFLAGS)
PMIX_UNIQ(CFLAGS)
AC_MSG_WARN([$add has been added to CFLAGS])
unset add
fi
Expand Down Expand Up @@ -217,7 +217,7 @@ AC_DEFUN([PMIX_SETUP_CC],[
fi

CFLAGS="${CFLAGS_orig}${add}"
PMIX_FLAGS_UNIQ([CFLAGS])
PMIX_UNIQ([CFLAGS])
if test "$add" != "" ; then
AC_MSG_WARN([$add has been added to CFLAGS])
fi
Expand Down
28 changes: 28 additions & 0 deletions opal/mca/pmix/pmix112/pmix/src/client/pmi1.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,30 @@ PMIX_EXPORT int PMI_KVS_Get( const char kvsname[], const char key[], char value[
pmix_output_verbose(2, pmix_globals.debug_output,
"PMI_KVS_Get: KVS=%s, key=%s value=%s", kvsname, key, value);

/* PMI-1 expects resource manager to set
* process mapping in ANL notation. */
if (!strcmp(key, ANL_MAPPING)) {
/* we are looking in the job-data. If there is nothing there
* we don't want to look in rank's data, thus set rank to widcard */
proc = myproc;
proc.rank = PMIX_RANK_WILDCARD;
if (PMIX_SUCCESS == PMIx_Get(&proc, PMIX_ANL_MAP, NULL, 0, &val) &&
(NULL != val) && (PMIX_STRING == val->type)) {
strncpy(value, val->data.string, length);
PMIX_VALUE_FREE(val, 1);
return PMI_SUCCESS;
} else {
/* artpol:
* Some RM's (i.e. SLURM) already have ANL precomputed. The export it
* through PMIX_ANL_MAP variable.
* If we haven't found it we want to have our own packing functionality
* since it's common.
* Somebody else has to write it since I've already done that for
* GPL'ed SLURM :) */
return PMI_FAIL;
}
}

/* retrieve the data from PMIx - since we don't have a rank,
* we indicate that by passing the UNDEF value */
(void)strncpy(proc.nspace, kvsname, PMIX_MAX_NSLEN);
Expand Down Expand Up @@ -344,6 +368,10 @@ PMIX_EXPORT int PMI_Get_appnum(int *appnum)
if (PMIX_SUCCESS == rc) {
rc = convert_int(appnum, val);
PMIX_VALUE_RELEASE(val);
} else if( PMIX_ERR_NOT_FOUND == rc ){
/* this is optional value, set to 0 */
*appnum = 0;
rc = PMIX_SUCCESS;
}

PMIX_INFO_DESTRUCT(&info[0]);
Expand Down
Loading