Skip to content

Commit

Permalink
Merge pull request open-mpi#844 from rhc54/topic/updatepmix
Browse files Browse the repository at this point in the history
Sync with PMIx tarball
  • Loading branch information
rhc54 committed Aug 31, 2015
2 parents 21642a2 + bcabd1e commit c843358
Show file tree
Hide file tree
Showing 26 changed files with 407 additions and 264 deletions.
4 changes: 2 additions & 2 deletions opal/mca/pmix/pmix1xx/pmix/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ greek=a1
# command, or with the date (if "git describe" fails) in the form of
# "date<date>".

repo_rev=gitebb9a6a
repo_rev=git11e7b06

# 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="Aug 28, 2015"
date="Aug 30, 2015"

# The shared library version of each of PMIx's public libraries.
# These versions are maintained in accordance with the "Library
Expand Down
11 changes: 6 additions & 5 deletions opal/mca/pmix/pmix1xx/pmix/config/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PMIx copyrights:
# Copyright (c) 2013 Intel, Inc. All rights reserved
# Copyright (c) 2013-2015 Intel, Inc. All rights reserved
#
#########################
#
Expand All @@ -9,22 +9,23 @@
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# Copyright (c) 2004-2005 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) 2010 Oracle and/or its affiliates. All rights
# Copyright (c) 2010 Oracle and/or its affiliates. All rights
# reserved.
#########################
# $COPYRIGHT$
#
#
# Additional copyrights may follow
#
#
# $HEADER$
#

EXTRA_DIST += \
config/c_get_alignment.m4 \
config/pmix_get_version.sh \
config/distscript.sh \
config/pmix_check_attributes.m4 \
Expand Down
72 changes: 72 additions & 0 deletions opal/mca/pmix/pmix1xx/pmix/config/c_get_alignment.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
dnl University Research and Technology
dnl Corporation. All rights reserved.
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
dnl of Tennessee Research Foundation. All rights
dnl reserved.
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
dnl Copyright (c) 2015 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl

# PMIX_C_GET_ALIGN(type, config_var)
# ----------------------------------
# Determine datatype alignment.
# First arg is type, 2nd arg is config var to define.
# Now that we require C99 compilers, we include stdbool.h
# in the alignment test so that we can find the definition
# of "bool" when we test for its alignment. We might be able
# to avoid this if we test for alignment of _Bool, but
# since we use "bool" in the code, let's be safe and check
# what we use. Yes, they should be the same - but "should" and
# "are" frequently differ
AC_DEFUN([PMIX_C_GET_ALIGNMENT],[
AC_CACHE_CHECK([alignment of $1],
[AS_TR_SH([pmix_cv_c_align_$1])],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
#include <stdbool.h> ],
[[
struct foo { char c; $1 x; };
struct foo *p = (struct foo *) malloc(sizeof(struct foo));
int diff;
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
diff = ((char *)&p->x) - ((char *)&p->c);
fprintf(f, "%d\n", (diff >= 0) ? diff : -diff);
]])], [AS_TR_SH([pmix_cv_c_align_$1])=`cat conftestval`],
[AC_MSG_WARN([*** Problem running configure test!])
AC_MSG_WARN([*** See config.log for details.])
AC_MSG_ERROR([*** Cannot continue.])],
[ # cross compile - do a non-executable test. Trick
# taken from the Autoconf 2.59c. Switch to using
# AC_CHECK_ALIGNOF when we can require Autoconf 2.60.
_AC_COMPUTE_INT([(long int) offsetof (pmix__type_alignof_, y)],
[AS_TR_SH([pmix_cv_c_align_$1])],
[AC_INCLUDES_DEFAULT
#include <stdbool.h>
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
typedef struct { char x; $1 y; } pmix__type_alignof_;
],
[AC_MSG_WARN([*** Problem running configure test!])
AC_MSG_WARN([*** See config.log for details.])
AC_MSG_ERROR([*** Cannot continue.])])])])
AC_DEFINE_UNQUOTED([$2], [$AS_TR_SH([pmix_cv_c_align_$1])], [Alignment of type $1])
eval "$2=$AS_TR_SH([pmix_cv_c_align_$1])"
rm -rf conftest* ]) dnl
62 changes: 39 additions & 23 deletions opal/mca/pmix/pmix1xx/pmix/config/pmix.m4
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ AC_DEFUN([PMIX_SETUP_CORE],[
##################################
# Does the compiler support "ident"-like constructs?
PMIX_CHECK_IDENT([CC], [CFLAGS], [c], [C])
PMIX_SETUP_CC

#
# Check for some types
Expand Down Expand Up @@ -193,6 +192,31 @@ AC_DEFUN([PMIX_SETUP_CORE],[

AC_CHECK_SIZEOF(pid_t)

#
# Check for type alignments
#

PMIX_C_GET_ALIGNMENT(bool, PMIX_ALIGNMENT_BOOL)
PMIX_C_GET_ALIGNMENT(int8_t, PMIX_ALIGNMENT_INT8)
PMIX_C_GET_ALIGNMENT(int16_t, PMIX_ALIGNMENT_INT16)
PMIX_C_GET_ALIGNMENT(int32_t, PMIX_ALIGNMENT_INT32)
PMIX_C_GET_ALIGNMENT(int64_t, PMIX_ALIGNMENT_INT64)
PMIX_C_GET_ALIGNMENT(char, PMIX_ALIGNMENT_CHAR)
PMIX_C_GET_ALIGNMENT(short, PMIX_ALIGNMENT_SHORT)
PMIX_C_GET_ALIGNMENT(wchar_t, PMIX_ALIGNMENT_WCHAR)
PMIX_C_GET_ALIGNMENT(int, PMIX_ALIGNMENT_INT)
PMIX_C_GET_ALIGNMENT(long, PMIX_ALIGNMENT_LONG)
if test "$ac_cv_type_long_long" = yes; then
PMIX_C_GET_ALIGNMENT(long long, PMIX_ALIGNMENT_LONG_LONG)
fi
PMIX_C_GET_ALIGNMENT(float, PMIX_ALIGNMENT_FLOAT)
PMIX_C_GET_ALIGNMENT(double, PMIX_ALIGNMENT_DOUBLE)
if test "$ac_cv_type_long_double" = yes; then
PMIX_C_GET_ALIGNMENT(long double, PMIX_ALIGNMENT_LONG_DOUBLE)
fi
PMIX_C_GET_ALIGNMENT(void *, PMIX_ALIGNMENT_VOID_P)
PMIX_C_GET_ALIGNMENT(size_t, PMIX_ALIGNMENT_SIZE_T)


#
# Does the C compiler native support "bool"? (i.e., without
Expand Down Expand Up @@ -265,18 +289,18 @@ AC_DEFUN([PMIX_SETUP_CORE],[
pmix_show_title "Header file tests"

AC_CHECK_HEADERS([arpa/inet.h \
fcntl.h inttypes.h libgen.h \
netinet/in.h \
stdint.h stddef.h \
stdlib.h string.h strings.h \
sys/param.h \
sys/select.h sys/socket.h \
stdarg.h sys/stat.h sys/time.h \
sys/types.h sys/un.h sys/uio.h net/uio.h \
sys/wait.h syslog.h \
time.h unistd.h \
crt_externs.h signal.h \
ioLib.h sockLib.h hostLib.h limits.h])
fcntl.h inttypes.h libgen.h \
netinet/in.h \
stdint.h stddef.h \
stdlib.h string.h strings.h \
sys/param.h \
sys/select.h sys/socket.h \
stdarg.h sys/stat.h sys/time.h \
sys/types.h sys/un.h sys/uio.h net/uio.h \
sys/wait.h syslog.h \
time.h unistd.h \
crt_externs.h signal.h \
ioLib.h sockLib.h hostLib.h limits.h])

# 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
Expand Down Expand Up @@ -547,7 +571,7 @@ AC_DEFUN([PMIX_SETUP_CORE],[
# final compiler config
############################################################################

pmix_show_subtitle "Compiler flags"
pmix_show_subtitle "Set path-related compiler flags"

#
# This is needed for VPATH builds, so that it will -I the appropriate
Expand All @@ -569,14 +593,6 @@ AC_DEFUN([PMIX_SETUP_CORE],[
CPPFLAGS='-I$(PMIX_top_srcdir) -I$(PMIX_top_srcdir)/src -I$(PMIX_top_srcdir)/include'" $CPPFLAGS"
fi

#
# Delayed the substitution of CFLAGS and CXXFLAGS until now because
# they may have been modified throughout the course of this script.
#

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)

# pmixdatadir, pmixlibdir, and pmixinclude are essentially the same as
# pkg*dir, but will always be */pmix.
pmixdatadir='${datadir}/pmix'
Expand Down Expand Up @@ -639,7 +655,7 @@ else
WANT_PICKY_COMPILER=0
fi
#################### Early development override ####################
if test "$WANT_PICKY_COMPILER" = "0" -a -z "$enable_picky" -a "$PMIX_DEVEL" = 1; then
if test "$WANT_PICKY_COMPILER" = "0" -a -z "$enable_picky" -a "$PMIX_DEVEL" = "1"; then
WANT_PICKY_COMPILER=1
echo "--> developer override: enable picky compiler by default"
fi
Expand Down
Loading

0 comments on commit c843358

Please sign in to comment.