Skip to content

Update to latest PMIx master #2649

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
Dec 30, 2016
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
7 changes: 4 additions & 3 deletions opal/mca/hwloc/base/hwloc_base_maffinity.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2016 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -31,7 +32,7 @@ int opal_hwloc_base_set_process_membind_policy(void)

/* Make sure opal_hwloc_topology has been set by the time we've
been called */
if (NULL == opal_hwloc_topology) {
if (OPAL_SUCCESS != opal_hwloc_base_get_topology()) {
return OPAL_ERR_BAD_PARAM;
}

Expand Down Expand Up @@ -82,7 +83,7 @@ int opal_hwloc_base_memory_set(opal_hwloc_base_memory_segment_t *segments,
hwloc_cpuset_t cpuset = NULL;

/* bozo check */
if (NULL == opal_hwloc_topology) {
if (OPAL_SUCCESS != opal_hwloc_base_get_topology()) {
msg = "hwloc_set_area_membind() failure - topology not available";
return opal_hwloc_base_report_bind_failure(__FILE__, __LINE__,
msg, rc);
Expand Down Expand Up @@ -137,7 +138,7 @@ int opal_hwloc_base_membind(opal_hwloc_base_memory_segment_t *segs,
hwloc_cpuset_t cpuset = NULL;

/* bozo check */
if (NULL == opal_hwloc_topology) {
if (OPAL_SUCCESS != opal_hwloc_base_get_topology()) {
msg = "hwloc_set_area_membind() failure - topology not available";
return opal_hwloc_base_report_bind_failure(__FILE__, __LINE__,
msg, rc);
Expand Down
6 changes: 3 additions & 3 deletions opal/mca/pmix/pmix2x/pmix/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ release=0
# The only requirement is that it must be entirely printable ASCII
# characters and have no white space.

greek=
greek=a1

# If repo_rev is empty, then the repository version number will be
# obtained during "make dist" via the "git describe --tags --always"
# command, or with the date (if "git describe" fails) in the form of
# "date<date>".

repo_rev=gitb9778a7
repo_rev=git8ed98a0

# 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 @@ -44,7 +44,7 @@ tarball_version=

# The date when this release was created

date="Dec 19, 2016"
date="Dec 30, 2016"

# The shared library version of each of PMIx's public libraries.
# These versions are maintained in accordance with the "Library
Expand Down
4 changes: 2 additions & 2 deletions opal/mca/pmix/pmix2x/pmix/config/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2010 Oracle and/or its affiliates. All rights
# reserved.
# Copyright (c) 2016 Intel, Inc. All rights reserved.
Expand Down Expand Up @@ -41,7 +41,7 @@ EXTRA_DIST = \
pmix.m4 \
pmix_search_libs.m4 \
pmix_setup_cc.m4 \
pmix_setup_hwloc.m4 \
pmix_setup_zlib.m4 \
pmix_setup_libevent.m4 \
pmix_mca_priority_sort.pl

Expand Down
7 changes: 3 additions & 4 deletions opal/mca/pmix/pmix2x/pmix/config/pmix.m4
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ AC_DEFUN([PMIX_SETUP_CORE],[
#endif
])


# Note that sometimes we have <stdbool.h>, but it doesn't work (e.g.,
# have both Portland and GNU installed; using pgcc will find GNU's
# <stdbool.h>, which all it does -- by standard -- is define "bool" to
Expand Down Expand Up @@ -641,11 +640,11 @@ AC_DEFUN([PMIX_SETUP_CORE],[
PMIX_LIBEVENT_CONFIG

##################################
# HWLOC
# ZLIB COMPRESSION
##################################
pmix_show_title "HWLOC"
pmix_show_title "ZLIB"

PMIX_HWLOC_CONFIG
PMIX_ZLIB_CONFIG

##################################
# MCA
Expand Down
123 changes: 0 additions & 123 deletions opal/mca/pmix/pmix2x/pmix/config/pmix_setup_hwloc.m4

This file was deleted.

85 changes: 85 additions & 0 deletions opal/mca/pmix/pmix2x/pmix/config/pmix_setup_zlib.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# -*- shell-script -*-
#
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

# MCA_zlib_CONFIG([action-if-found], [action-if-not-found])
# --------------------------------------------------------------------
AC_DEFUN([PMIX_ZLIB_CONFIG],[
PMIX_VAR_SCOPE_PUSH([pmix_zlib_dir pmix_zlib_libdir])

AC_ARG_WITH([zlib],
[AC_HELP_STRING([--with-zlib=DIR],
[Search for zlib headers and libraries in DIR ])])

AC_ARG_WITH([zlib-libdir],
[AC_HELP_STRING([--with-zlib-libdir=DIR],
[Search for zlib libraries in DIR ])])

pmix_zlib_support=0
if test "$with_zlib" != "no"; then
AC_MSG_CHECKING([for zlib in])
if test ! -z "$with_zlib" && test "$with_zlib" != "yes"; then
pmix_zlib_dir=$with_zlib
pmix_zlib_standard_header_location=no
if test -d $with_zlib/lib; then
pmix_zlib_libdir=$with_zlib/lib
elif test -d $with_zlib/lib64; then
pmix_zlib_libdir=$with_zlib/lib64
else
AC_MSG_RESULT([Could not find $with_zlib/lib or $with_zlib/lib64])
AC_MSG_ERROR([Can not continue])
fi
AC_MSG_RESULT([$pmix_zlib_dir and $pmix_zlib_libdir])
else
AC_MSG_RESULT([(default search paths)])
pmix_zlib_standard_header_location=yes
fi
AS_IF([test ! -z "$with_zlib_libdir" && test "$with_zlib_libdir" != "yes"],
[pmix_zlib_libdir="$with_zlib_libdir"
pmix_zlib_standard_lib_location=no],
[pmix_zlib_standard_lib_location=yes])

PMIX_CHECK_PACKAGE([pmix_zlib],
[zlib.h],
[z],
[deflate],
[-lz],
[$pmix_zlib_dir],
[$pmix_zlib_libdir],
[pmix_zlib_support=1],
[pmix_zlib_support=0])
if test $pmix_zlib_support == "1"; then
LIBS="$LIBS -lz"
if test "$pmix_zlib_standard_header_location" != "yes"; then
CPPFLAGS="$CPPFLAGS $pmix_zlib_CPPFLAGS"
fi
if test "$pmix_zlib_standard_lib_location" != "yes"; then
LDFLAGS="$LDFLAGS $pmix_zlib_LDFLAGS"
fi
fi
fi

if test ! -z "$with_zlib" && test "$with_zlib" != "no" && test "$pmix_zlib_support" != "1"; then
AC_MSG_WARN([ZLIB SUPPORT REQUESTED AND NOT FOUND])
AC_MSG_ERROR([CANNOT CONTINUE])
fi

AC_MSG_CHECKING([will zlib support be built])
if test "$pmix_zlib_support" != "1"; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
fi

AC_DEFINE_UNQUOTED([PMIX_HAVE_ZLIB], [$pmix_zlib_support],
[Whether or not we have zlib support])
PMIX_VAR_SCOPE_POP
])dnl
Empty file modified opal/mca/pmix/pmix2x/pmix/contrib/make_dist_tarball
100644 → 100755
Empty file.
10 changes: 9 additions & 1 deletion opal/mca/pmix/pmix2x/pmix/contrib/perf_tools/README
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,12 @@ make sure that both MPI and PMIx libraries are visible for the loader.

For PMIx testing "convenience" there is a `run.sh` script that can be used to
ensure that environment is set properly (not a production grade so may not work
for all environments)
for all environments). To use it open it and fix:
- OMPI_BASE to point to your MPI installation
- PMIX_LIB to point to your PMIx installation

If you are running inside the supported batch system you shoud be fine to
just run fixed `run.sh` with the first argument defining how many processes
needs to be launched and all other parameters will be passed to the performance
tool. For example:
$ ./run.sh 10 -d
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ int main(int argc, char **argv)
fprintf(stderr,"get: max loc %lf rem %lf (loc: %d, rem: %d)\n",
max_get_loc_time, max_get_rem_time, max_get_loc_idx, max_get_rem_idx);
fprintf(stderr,"total: max %lf min %lf\n", max_total_time, min_total_time);
fprintf(stderr,"mem: loc %0.2lf rem %0.2lf min %0.2lf max %0.2lf total %0.2lf Kb\n",
fprintf(stderr,"mem: loc %0.2lf avg %0.2lf min %0.2lf max %0.2lf total %0.2lf Kb\n",
mem_pss, cum_mem_pss / nproc, min_mem_pss, max_mem_pss, cum_mem_pss);


Expand Down
15 changes: 12 additions & 3 deletions opal/mca/pmix/pmix2x/pmix/contrib/perf_tools/pmix.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pmix_proc_t this_proc;
void pmi_init(int *rank, int *size)
{
pmix_value_t value, *val = &value;
pmix_proc_t job_proc;
int rc;

/* init us */
Expand All @@ -30,8 +31,12 @@ void pmi_init(int *rank, int *size)
abort();
}

job_proc = this_proc;
#if (PMIX_VERSION_MAJOR > 1 )
job_proc.rank = PMIX_RANK_WILDCARD;
#endif
/* get our job size */
if (PMIX_SUCCESS != (rc = PMIx_Get(&this_proc, PMIX_JOB_SIZE, NULL, 0, &val))) {
if (PMIX_SUCCESS != (rc = PMIx_Get(&job_proc, PMIX_JOB_SIZE, NULL, 0, &val))) {
fprintf(stderr, "Client ns %s rank %d: PMIx_Get job size failed: %d", this_proc.nspace, this_proc.rank, rc);
abort();
}
Expand All @@ -45,9 +50,13 @@ void pmi_get_local_ranks(int **local_ranks, int *local_cnt)
pmix_value_t value, *val = &value;
char *ptr;
int i, rc;
pmix_proc_t job_proc = this_proc;
#if (PMIX_VERSION_MAJOR > 1 )
job_proc.rank = PMIX_RANK_WILDCARD;
#endif

/* get our job size */
if (PMIX_SUCCESS != (rc = PMIx_Get(&this_proc, PMIX_LOCAL_SIZE, NULL, 0, &val))) {
if (PMIX_SUCCESS != (rc = PMIx_Get(&job_proc, PMIX_LOCAL_SIZE, NULL, 0, &val))) {
fprintf(stderr, "Client ns %s rank %d: PMIx_Get PMIX_LOCAL_SIZE failed: %d", this_proc.nspace, this_proc.rank, rc);
abort();
}
Expand All @@ -56,7 +65,7 @@ void pmi_get_local_ranks(int **local_ranks, int *local_cnt)

*local_ranks = calloc(*local_cnt, sizeof(int));
/* get our job size */
if (PMIX_SUCCESS != (rc = PMIx_Get(&this_proc, PMIX_LOCAL_PEERS, NULL, 0, &val))) {
if (PMIX_SUCCESS != (rc = PMIx_Get(&job_proc, PMIX_LOCAL_PEERS, NULL, 0, &val))) {
fprintf(stderr, "Client ns %s rank %d: PMIx_Get PMIX_LOCAL_PEERS failed: %d", this_proc.nspace, this_proc.rank, rc);
abort();
}
Expand Down
Binary file modified opal/mca/pmix/pmix2x/pmix/contrib/perf_tools/run.sh
Binary file not shown.
Empty file modified opal/mca/pmix/pmix2x/pmix/contrib/whitespace-purge.sh
100644 → 100755
Empty file.
Loading