Skip to content

Sync to PMIx 3.0rc #5247

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

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions opal/mca/pmix/pmix3x/pmix/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# All rights reserved.
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
# Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -23,7 +23,7 @@
# via AC_CONFIG_MACRO_DIR in configure.ac.
ACLOCAL_AMFLAGS = -I ./config

SUBDIRS = config contrib include src etc
SUBDIRS = config contrib include src etc bindings


headers =
Expand Down
4 changes: 2 additions & 2 deletions opal/mca/pmix/pmix3x/pmix/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ greek=
# command, or with the date (if "git describe" fails) in the form of
# "date<date>".

repo_rev=gitf0b8151
repo_rev=git431954a

# 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="Mar 24, 2018"
date="Jun 07, 2018"

# The shared library version of each of PMIx's public libraries.
# These versions are maintained in accordance with the "Library
Expand Down
22 changes: 22 additions & 0 deletions opal/mca/pmix/pmix3x/pmix/bindings/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
# Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

SUBDIRS = python
19 changes: 19 additions & 0 deletions opal/mca/pmix/pmix3x/pmix/bindings/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2016-2018 Intel, Inc. All rights reserved.

$COPYRIGHT$

Additional copyrights may follow

$HEADER$

===========================================================================

This is where bindings of PMIx functions to alternative programming languages
such as Python reside. All functions defined in the public headers have been
provided with a wrapper. Note that there is no restriction on the number of
wrappers that can exist, nor on what type of function is wrapped.

There is only one rule to observe: you can wrap a framework, but you cannot wrap a
specific plugin within that framework. This constraint flows from the fact that
plugins are only accessed via the framework interface - thus, there is no way to
guarantee that a particular plugin will be the active selection.
39 changes: 39 additions & 0 deletions opal/mca/pmix/pmix3x/pmix/bindings/python/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
# Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

helpers = setup.py client.py server.py cpmix.pxd pmix.pyx

if WANT_PYTHON_BINDINGS

install-exec-local: $(helpers)
$(PYTHON) setup.py build_ext --include-dirs="$(top_builddir)/include" --library-dirs="$(DESTDIR)$(libdir)" --user
$(PYTHON) setup.py install --prefix="$(DESTDIR)$(prefix)"

uninstall-hook:
rm -f $(pythondir)/pmix*.so
rm -f $(pythondir)/pypmix-*.egg-info

CLEANFILES += pmix.c

clean-local:
rm -rf build

endif
49 changes: 49 additions & 0 deletions opal/mca/pmix/pmix3x/pmix/bindings/python/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
===========================================================================
Cython-based Python wrapper for PMIx
===========================================================================


Example
-------

This example starts up a persistent DVM and then spawns some tasks using
Python.

$ virtualenv ve
$ source ve/bin/activate
$ pip install orte-cffi
$ orte-dvm --report-uri dvm_uri
$ python examples/submit.py


Create a distfile
----------------------------------------

If you want to create a sdist file:

$ virtualenv ve
$ source ve/bin/activate
$ python setup.py sdist


Uploading sdist to pypi
-----------------------

Assuming you have admin privileges to the pypi package repository for this
package, a new version can be uploaded using twine:

$ virtualenv ve
$ source ve/bin/activate
$ pip install twine
$ twine upload dist/orte-cffi-`python setup.py --version`.tar.gz


Building (for development purposes only)
----------------------------------------

If you want to create a non-pip build:

$ virtualenv ve
$ source ve/bin/activate
$ pip install cffi
$ python src/orte-cffi/build.py
50 changes: 49 additions & 1 deletion opal/mca/pmix/pmix3x/pmix/config/pmix.m4
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,14 @@ AC_DEFUN([PMIX_SETUP_CORE],[

PMIX_LIBEVENT_CONFIG

##################################
# HWLOC
##################################
pmix_show_title "HWLOC"

PMIX_HWLOC_CONFIG


##################################
# ZLIB COMPRESSION
##################################
Expand Down Expand Up @@ -825,14 +833,16 @@ AC_DEFUN([PMIX_SETUP_CORE],[

AC_CONFIG_FILES(
pmix_config_prefix[Makefile]
pmix_config_prefix[bindings/Makefile]
pmix_config_prefix[bindings/python/Makefile]
pmix_config_prefix[config/Makefile]
pmix_config_prefix[etc/Makefile]
pmix_config_prefix[include/Makefile]
pmix_config_prefix[src/Makefile]
pmix_config_prefix[src/util/keyval/Makefile]
pmix_config_prefix[src/mca/base/Makefile]
pmix_config_prefix[src/tools/pevent/Makefile]
pmix_config_prefix[src/tools/pinfo/Makefile]
pmix_config_prefix[src/tools/pmix_info/Makefile]
pmix_config_prefix[src/tools/plookup/Makefile]
pmix_config_prefix[src/tools/pps/Makefile]
)
Expand Down Expand Up @@ -1118,6 +1128,44 @@ fi

AM_CONDITIONAL([PMIX_INSTALL_BINARIES], [test $WANT_PMIX_BINARIES -eq 1])

#
# Install Python bindings?
#
AC_MSG_CHECKING([if want install Python bindings])
AC_ARG_ENABLE(python-bindings,
AC_HELP_STRING([--enable-python-bindings],
[enable Python bindings (default: disabled)]))
if test "$enable_python_bindings" != "yes"; then
AC_MSG_RESULT([no])
WANT_PYTHON_BINDINGS=0
else
AC_MSG_RESULT([yes])
WANT_PYTHON_BINDINGS=1
fi

AM_CONDITIONAL([WANT_PYTHON_BINDINGS], [test $WANT_PYTHON_BINDINGS -eq 1])

if test "$WANT_PYTHON_BINDINGS" = "1"; then
AM_PATH_PYTHON([2.7], [python_happy=1], [python_happy=0])
if test "$python_happy" = "0"; then
AC_MSG_WARN([Python bindings were enabled, but no suitable])
AC_MSG_WARN([interpreter was found. PMIx requires at least])
AC_MSG_WARN([Python v2.7 to provide Python bindings])
AC_MSG_ERROR([Cannot continue])
fi

AC_MSG_CHECKING([if Cython package installed])
have_cython=esyscmd(config/pmix_check_cython.py)
if test "$have_cython" = "0"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_WARN([Python bindings were enabled, but the Cython])
AC_MSG_WARN([package was not found. PMIx Python bindings])
AC_MSG_WARN([require that the Cython package be installed])
AC_MSG_ERROR([Cannot continue])
fi
fi

])dnl

Expand Down
106 changes: 106 additions & 0 deletions opal/mca/pmix/pmix3x/pmix/config/pmix_setup_hwloc.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# -*- 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-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

# MCA_hwloc_CONFIG([action-if-found], [action-if-not-found])
# --------------------------------------------------------------------
AC_DEFUN([PMIX_HWLOC_CONFIG],[
PMIX_VAR_SCOPE_PUSH([pmix_hwloc_dir pmix_hwloc_libdir pmix_hwloc_standard_lib_location pmix_hwloc_standard_header_location])

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

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

pmix_hwloc_support=0

if test "$with_hwloc" != "no"; then
AC_MSG_CHECKING([for hwloc in])
if test ! -z "$with_hwloc" && test "$with_hwloc" != "yes"; then
pmix_hwloc_dir=$with_hwloc
pmix_hwloc_standard_header_location=no
pmix_hwloc_standard_lib_location=no
AS_IF([test -z "$with_hwloc_libdir" || test "$with_hwloc_libdir" = "yes"],
[if test -d $with_hwloc/lib; then
pmix_hwloc_libdir=$with_hwloc/lib
elif test -d $with_hwloc/lib64; then
pmix_hwloc_libdir=$with_hwloc/lib64
else
AC_MSG_RESULT([Could not find $with_hwloc/lib or $with_hwloc/lib64])
AC_MSG_ERROR([Can not continue])
fi
AC_MSG_RESULT([$pmix_hwloc_dir and $pmix_hwloc_libdir])],
[AC_MSG_RESULT([$with_hwloc_libdir])])
else
AC_MSG_RESULT([(default search paths)])
pmix_hwloc_standard_header_location=yes
pmix_hwloc_standard_lib_location=yes
fi
AS_IF([test ! -z "$with_hwloc_libdir" && test "$with_hwloc_libdir" != "yes"],
[pmix_hwloc_libdir="$with_hwloc_libdir"
pmix_hwloc_standard_lib_location=no])

PMIX_CHECK_PACKAGE([pmix_hwloc],
[hwloc.h],
[hwloc],
[hwloc_topology_init],
[-lhwloc],
[$pmix_hwloc_dir],
[$pmix_hwloc_libdir],
[pmix_hwloc_support=1],
[pmix_hwloc_support=0])
if test $pmix_hwloc_support = "1"; then
LIBS="$LIBS -lhwloc"
PMIX_EMBEDDED_LIBS="$PMIX_EMBEDDED_LIBS -lhwloc"
if test "$pmix_hwloc_standard_header_location" != "yes"; then
PMIX_EMBEDDED_CPPFLAGS="$PMIX_EMBEDDED_CPPFLAGS $pmix_hwloc_CPPFLAGS"
CPPFLAGS="$CPPFLAGS $pmix_hwloc_CPPFLAGS"
fi
if test "$pmix_hwloc_standard_lib_location" != "yes"; then
PMIX_EMBEDDED_LDFLAGS="$PMIX_EMBEDDED_LDFLAGS $pmix_hwloc_LDFLAGS"
LDFLAGS="$LDFLAGS $pmix_hwloc_LDFLAGS"
fi
fi
fi

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

if test $pmix_hwloc_support = "1"; then
AC_MSG_CHECKING([if external hwloc version is 1.5 or greater])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <hwloc.h>]],
[[
#if HWLOC_API_VERSION < 0x00010500
#error "hwloc API version is less than 0x00010500"
#endif
]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([Cannot continue])])
fi

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

AC_DEFINE_UNQUOTED([PMIX_HAVE_HWLOC], [$pmix_hwloc_support],
[Whether or not we have hwloc support])
PMIX_VAR_SCOPE_POP
])dnl
28 changes: 18 additions & 10 deletions opal/mca/pmix/pmix3x/pmix/contrib/perf_tools/Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
PMIX_BASE = <pmix-path>
PMIX_BASE = /tmp/artemp/pmix
SLURM_BASE = /tmp/artemp/slurm

PMIX_INC= -I$(PMIX_BASE)/include/
PMIX_LIB= -L$(PMIX_BASE)/lib/ -lpmix
PMIX_LIB= -L$(PMIX_BASE)/lib/ -L$(PMIX_BASE)/lib64/ -lpmix

PMI2_BASE = $(SLURM_BASE)
PMI2_INC= -I$(PMI2_BASE)/include/
PMI2_LIB= -L$(PMI2_BASE)/lib/ -L$(PMI2_BASE)/lib64/ -lpmi2

PMI2_BASE = /usr/
#PMI2_INC= -I$(PMI2_BASE)/include/
#PMI2_LIB= -L$(PMI2_BASE)/lib/ -lpmi2
PMI2_LIB= -lpmi2
PMI1_BASE = $(SLURM_BASE)
PMI1_INC= -I$(PMI1_BASE)/include/
PMI1_LIB= -L$(PMI1_BASE)/lib/ -L$(PMI1_BASE)/lib64/ -lpmi

CFLAGS = -O2 -g

all: pmix pmi2
all: pmix_intra_perf pmi2_intra_perf pmi1_intra_perf

pmix: pmi_intra_perf.c pmi.h pmix.c
pmix_intra_perf: pmi_intra_perf.c pmi.h pmix.c
gcc $(PMIX_INC) $(CFLAGS) -o pmix_intra_perf pmi_intra_perf.c pmix.c $(PMIX_LIB) -lrt

pmi2: pmi_intra_perf.c pmi.h pmi2.c pmi2_pmap_parser.c pmi2_pmap_parser.h pmi2_utils.c pmi2_utils.h
pmi2_intra_perf: pmi_intra_perf.c pmi.h pmi2.c pmi2_pmap_parser.c pmi2_pmap_parser.h pmi2_utils.c pmi2_utils.h
gcc $(PMI2_INC) $(CFLAGS) -o pmi2_intra_perf pmi_intra_perf.c pmi2.c pmi2_utils.c pmi2_pmap_parser.c -lrt $(PMI2_LIB)

pmi1_intra_perf: pmi_intra_perf.c pmi.h pmi1.c pmi2_utils.c pmi2_utils.h
gcc $(PMI1_INC) $(CFLAGS) -o pmi1_intra_perf pmi_intra_perf.c pmi1.c pmi2_utils.c -lrt $(PMI1_LIB)

clean:
rm -f pmix_intra_perf pmi2_intra_perf
rm -f pmix_intra_perf pmi2_intra_perf pmi1_intra_perf
Loading