1
1

Per the RFC schedule, this commit adds Mellanox OpenSHMEM to the trunk. It does not yet run on OSX or with CM PML for an MTL other than MXM. Mellanox is aware of these issues and is in the process of resolving them. This should be added to \ncmr=v1.7.4:subject=Move OSHMEM to 1.7.4:reviewer=rhc

This commit was SVN r29153.
This commit is contained in:
Joshua Ladd 2013-09-10 15:34:09 +00:00
parent 46ed907003
commit b3f88c4a1d
310 changed files with 36760 additions and 24 deletions

5
NEWS
View File

@ -87,6 +87,11 @@ Trunk (not on release branches yet)
- Add support for the MPI tool information interface (MPI_T).
- Update ompi_info to support limiting output by opal info level.
- Wrapper compilers now add rpath support by default to generated
executables on systems that support it. This behavior can be
disabled via --disable-wrapper-rpath. See note in README about ABI
issues when using rpath in MPI applications.
1.7.2
-----

View File

@ -1,6 +1,8 @@
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
@ -96,6 +98,7 @@ libmpi_usempi_ignore_tkr_so_version=0:0:0
libopen_rte_so_version=0:0:0
libopen_pal_so_version=0:0:0
libmpi_java_so_version=0:0:0
libshmem_so_version=0:0:0
# "Common" components install standalone libraries that are run-time
# linked by one or more components. So they need to be versioned as

View File

@ -2,7 +2,8 @@
#
# Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
#
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -41,6 +42,7 @@ my @subdirs;
# Command line parameters
my $no_ompi_arg = 0;
my $no_orte_arg = 0;
my $no_oshmem_arg = 0;
my $quiet_arg = 0;
my $debug_arg = 0;
my $help_arg = 0;
@ -985,6 +987,7 @@ sub patch_autotools_output {
my $ok = Getopt::Long::GetOptions("no-ompi" => \$no_ompi_arg,
"no-orte" => \$no_orte_arg,
"no-oshmem" => \$no_oshmem_arg,
"quiet|q" => \$quiet_arg,
"debug|d" => \$debug_arg,
"help|h" => \$help_arg,
@ -999,6 +1002,7 @@ if (!$ok || $help_arg) {
print "Options:
--no-ompi | -no-ompi Do not build the Open MPI layer
--no-orte | -no-orte Do not build the ORTE layer
--no-oshmem | -no-oshmem Do not build the OSHMEM layer
--quiet | -q Do not display normal verbose output
--debug | -d Output lots of debug information
--help | -h This help list
@ -1027,6 +1031,10 @@ if (! -e "orte") {
$no_orte_arg = 1;
debug "No orte subdirectory found - will not build ORTE\n";
}
if (! -e "oshmem") {
$no_oshmem_arg = 1;
debug "No oshmem subdirectory found - will not build OSHMEM\n";
}
if ($no_ompi_arg == 1 && $no_orte_arg == 0) {
$project_name_long = "Open MPI Run Time Environment";
@ -1193,6 +1201,8 @@ push(@{$projects}, { name => "orte", dir => "orte", need_base => 1 })
if (!$no_orte_arg);
push(@{$projects}, { name => "ompi", dir => "ompi", need_base => 1 })
if (!$no_ompi_arg);
push(@{$projects}, { name => "oshmem", dir => "oshmem", need_base => 1 })
if (!$no_ompi_arg && !$no_orte_arg && !$no_oshmem_arg);
$m4 .= "dnl Separate m4 define for each project\n";
foreach my $p (@$projects) {

View File

@ -12,6 +12,8 @@
# All rights reserved.
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -215,6 +217,7 @@ AC_DEFUN([OPAL_CHECK_ATTRIBUTES], [
opal_cv___attribute__visibility=0
opal_cv___attribute__warn_unused_result=0
opal_cv___attribute__weak_alias=0
opal_cv___attribute__destructor=0
else
AC_MSG_RESULT([yes])
@ -533,6 +536,13 @@ AC_DEFUN([OPAL_CHECK_ATTRIBUTES], [
[],
[])
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([destructor],
[
void foo(void) __attribute__ ((__destructor__));
void foo(void) { return ; }
],
[],
[])
fi
# Now that all the values are set, define them
@ -581,4 +591,6 @@ AC_DEFUN([OPAL_CHECK_ATTRIBUTES], [
[Whether your compiler has __attribute__ warn unused result or not])
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_WEAK_ALIAS, [$opal_cv___attribute__weak_alias],
[Whether your compiler has __attribute__ weak alias or not])
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_DESTRUCTOR, [$opal_cv___attribute__destructor],
[Whether your compiler has __attribute__ destructor or not])
])

View File

@ -0,0 +1,26 @@
# -*- shell-script -*-
#
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
AC_DEFUN([OSHMEM_CONFIG_FILES],[
AC_CONFIG_FILES([
oshmem/Makefile
oshmem/include/Makefile
oshmem/shmem/c/Makefile
oshmem/shmem/f77/Makefile
oshmem/shmem/c/profile/Makefile
oshmem/tools/wrappers/Makefile
oshmem/tools/wrappers/shmemcc-wrapper-data.txt
oshmem/tools/wrappers/shmemf77-wrapper-data.txt
oshmem/tools/wrappers/shmemf90-wrapper-data.txt
])
])

View File

@ -0,0 +1,164 @@
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2013 Mellanox Technologies, Inc.
dnl All rights reserved.
dnl
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
AC_DEFUN([OSHMEM_CONFIGURE_OPTIONS],[
ompi_show_subtitle "OSHMEM Configuration options"
AC_SUBST(OSHMEM_LIBSHMEM_EXTRA_LIBS)
AC_SUBST(OSHMEM_LIBSHMEM_EXTRA_LDFLAGS)
#
# Enable compatibility mode
#
AC_MSG_CHECKING([if want SGI/Quadrix compatibility mode])
AC_ARG_ENABLE(oshmem-compat,
AC_HELP_STRING([--enable-oshmem-compat],
[enable compatibility mode (default: enabled)]))
if test "$enable_oshmem_compat" != "no"; then
AC_MSG_RESULT([yes])
OSHMEM_SPEC_COMPAT=1
else
AC_MSG_RESULT([no])
OSHMEM_SPEC_COMPAT=0
fi
AC_DEFINE_UNQUOTED([OSHMEM_SPEC_COMPAT], [$OSHMEM_SPEC_COMPAT],
[Whether user wants OSHMEM in compatibility mode or not])
#
# Do we want to disable OSHMEM parameter checking at run-time?
#
AC_MSG_CHECKING([if want SHMEM API parameter checking])
AC_ARG_WITH(shmem-param-check,
AC_HELP_STRING([--shmem-param-check(=VALUE)],
[behavior of SHMEM function parameter checking. Valid values are: always, never. If --with-shmem-param-check is specified with no VALUE argument, it is equivalent to a VALUE of "always"; --without-shmem-param-check is equivalent to "never" (default: always).]))
shmem_param_check=1
if test "$with_shmem_param_check" = "no" -o \
"$with_shmem_param_check" = "never"; then
shmem_param_check=0
AC_MSG_RESULT([never])
elif test "$with_shmem_param_check" = "yes" -o \
"$with_shmem_param_check" = "always" -o \
-z "$with_shmem_param_check"; then
shmem_param_check=1
AC_MSG_RESULT([always])
else
AC_MSG_RESULT([unknown])
AC_MSG_WARN([*** Unrecognized --with-shmem-param-check value])
AC_MSG_WARN([*** See "configure --help" output])
AC_MSG_WARN([*** Defaulting to "runtime"])
fi
AC_DEFINE_UNQUOTED(OSHMEM_PARAM_CHECK, $shmem_param_check,
[Whether we want to check SHMEM parameters always or never])
#
# OSHMEM profiling support
#
AC_MSG_CHECKING([if want pshmem_])
AC_ARG_ENABLE(oshmem-profile,
AC_HELP_STRING([--enable-oshmem-profile],
[enable OSHMEM profiling (default: enabled)]))
if test "$enable_oshmem_profile" != "no"; then
AC_MSG_RESULT([yes])
oshmem_progiling_support=1
else
AC_MSG_RESULT([no])
oshmem_progiling_support=0
fi
AM_CONDITIONAL(OSHMEM_PROFILING, test "$oshmem_progiling_support" = 1)
#AC_DEFINE_UNQUOTED([OSHMEM_PROFILING], [$oshmem_progiling_support],
# [Whether user wants OSHMEM profiling])
])
AC_DEFUN([OSHMEM_SETUP_CFLAGS],[
OMPI_C_COMPILER_VENDOR([oshmem_c_vendor])
#
# OSHMEM force warnings as errors
#
#
# Since SHMEM libraries are not fully ISO99 C compliant
# -pedantic and -Wundef raise a bunch of warnings, so
# we just strip them off for this component
AC_MSG_WARN([Removed -pedantic and -Wundef from CFLAGS for OSHMEM])
oshmem_CFLAGS="$CFLAGS"
# Strip off problematic arguments
oshmem_CFLAGS="`echo $oshmem_CFLAGS | sed 's/-pedantic//g'`"
oshmem_CFLAGS="`echo $oshmem_CFLAGS | sed 's/-Wundef//g'`"
oshmem_CFLAGS="`echo $oshmem_CFLAGS | sed 's/-Wno-long-double//g'`"
CFLAGS="$oshmem_CFLAGS"
case "$oshmem_c_vendor" in
gnu)
OSHMEM_CFLAGS=" -Werror"
;;
intel)
# we want specifically the warning on format string conversion
OSHMEM_CFLAGS=" -Werror "
;;
esac
AC_SUBST([OSHMEM_CFLAGS])
OMPI_CHECK_OPENFABRICS([openib],
[openib_happy="yes"],
[openib_happy="no"])
# substitute in the things needed to build MEMHEAP BASE
AC_SUBST([openib_CFLAGS])
AC_SUBST([openib_CPPFLAGS])
AC_SUBST([openib_LDFLAGS])
AC_SUBST([openib_LIBS])
# If we have the openib stuff available, find out what we've got
AS_IF(
[test "$openib_happy" = "yes"],
[
OSHMEM_LIBSHMEM_EXTRA_LDFLAGS="$OSHMEM_LIBSHMEM_EXTRA_LDFLAGS $openib_LDFLAGS"
OSHMEM_LIBSHMEM_EXTRA_LIBS="$OSHMEM_LIBSHMEM_EXTRA_LIBS $openib_LIBS"
# ibv_reg_shared_mr was added in MOFED 1.8
oshmem_have_mpage=0
openib_save_CPPFLAGS="$CPPFLAGS"
openib_save_LDFLAGS="$LDFLAGS"
openib_save_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $openib_CPPFLAGS"
LDFLAGS="$LDFLAGS $openib_LDFLAGS"
LIBS="$LIBS $openib_LIBS"
AC_CHECK_DECLS([IBV_ACCESS_ALLOCATE_MR,IBV_ACCESS_SHARED_MR_USER_READ],
[oshmem_have_mpage=2], [],
[#include <infiniband/verbs.h>])
CPPFLAGS="$openib_save_CPPFLAGS"
LDFLAGS="$openib_save_LDFLAGS"
LIBS="$openib_save_LIBS"
AC_DEFINE_UNQUOTED(MPAGE_ENABLE, $oshmem_have_mpage,
[Whether we can use M-PAGE supported since MOFED 1.8])
])
])dnl

View File

@ -17,6 +17,8 @@
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
# Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved.
# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -99,6 +101,8 @@ AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
# Set up project specific AM_CONDITIONALs
AM_CONDITIONAL([PROJECT_OMPI], m4_ifdef([project_ompi], [true], [false]))
AM_CONDITIONAL([PROJECT_ORTE], m4_ifdef([project_orte], [true], [false]))
AM_CONDITIONAL([PROJECT_OSHMEM], m4_ifdef([project_oshmem], [true], [false]))
ompi_show_subtitle "Checking versions"
@ -113,6 +117,11 @@ m4_ifdef([project_orte],
[$srcdir/VERSION],
[orte/include/orte/version.h])])
m4_ifdef([project_oshmem],
[OPAL_SAVE_VERSION([OSHMEM], [Open SHMEM],
[$srcdir/VERSION],
[oshmem/include/oshmem/version.h])])
OPAL_SAVE_VERSION([OPAL], [Open Portable Access Layer], [$srcdir/VERSION],
[opal/include/opal/version.h])
@ -137,6 +146,8 @@ m4_ifdef([project_ompi],
AC_SUBST(libmca_common_portals_so_version)])
m4_ifdef([project_orte],
[AC_SUBST(libopen_rte_so_version)])
m4_ifdef([project_oshmem],
[AC_SUBST(libshmem_so_version)])
AC_SUBST(libmca_opal_common_hwloc_so_version)
AC_SUBST(libmca_opal_common_pmi_so_version)
AC_SUBST(libopen_pal_so_version)
@ -161,6 +172,8 @@ m4_ifdef([project_orte],
[AC_CONFIG_HEADERS([orte/include/orte_config.h])])
m4_ifdef([project_ompi],
[AC_CONFIG_HEADERS([ompi/include/ompi_config.h ompi/include/mpi.h])])
m4_ifdef([project_oshmem],
[AC_CONFIG_HEADER([oshmem/include/oshmem_config.h oshmem/include/shmem.h oshmem/include/shmem_portable_platform.h])])
# override/fixup the version numbers set by AC_INIT, since on
# developer builds, there's no good way to know what the version is
@ -241,6 +254,7 @@ OPAL_CONFIGURE_OPTIONS
OPAL_CHECK_CUDA
m4_ifdef([project_orte], [ORTE_CONFIGURE_OPTIONS])
m4_ifdef([project_ompi], [OMPI_CONFIGURE_OPTIONS])
m4_ifdef([project_oshmem], [OSHMEM_CONFIGURE_OPTIONS])
if test "$enable_binaries" = "no" -a "$enable_dist" = "yes"; then
AC_MSG_WARN([--disable-binaries is incompatible with --enable dist])
@ -860,6 +874,12 @@ AC_DEFINE_UNQUOTED(OMPI_MPI_OFFSET_TYPE, $MPI_OFFSET_TYPE, [Type of MPI_Offset -
AC_DEFINE_UNQUOTED(OMPI_MPI_OFFSET_SIZE, $MPI_OFFSET_SIZE, [Size of the MPI_Offset])
AC_DEFINE_UNQUOTED(OMPI_OFFSET_DATATYPE, $MPI_OFFSET_DATATYPE, [MPI datatype corresponding to MPI_Offset])
AC_DEFINE_UNQUOTED(OSHMEM_SHMEM_OFFSET_TYPE, $MPI_OFFSET_TYPE, [Type of SHMEM_Offset -- has to be defined here and typedef'ed later because shmem.h does not get AC SUBST's])
AC_DEFINE_UNQUOTED(OSHMEM_SHMEM_OFFSET_SIZE, $MPI_OFFSET_SIZE, [Size of the SHMEM_Offset])
AC_DEFINE_UNQUOTED(OSHMEM_OFFSET_DATATYPE, $MPI_OFFSET_DATATYPE, [SHMEM datatype corresponding to SHMEM_Offset])
AC_DEFINE_UNQUOTED(OPAL_SIZEOF_LONG, $ac_cv_sizeof_long, "Size of 'long' type")
if test $MPI_COUNT_SIZE -eq 8 ; then
MPI_COUNT_MAX="0x7fffffffffffffffll"
elif test $MPI_COUNT_SIZE -eq 4 ; then
@ -1205,7 +1225,7 @@ if test "$OMPI_TOP_BUILDDIR" != "$OMPI_TOP_SRCDIR"; then
# rather than have successive assignments to these shell
# variables, lest the $(foo) names try to get evaluated here.
# Yuck!
CPPFLAGS='-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/opal/include m4_ifdef([project_orte], [-I$(top_srcdir)/orte/include]) m4_ifdef([project_ompi], [-I$(top_srcdir)/ompi/include])'" $CPPFLAGS"
CPPFLAGS='-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/opal/include m4_ifdef([project_orte], [-I$(top_srcdir)/orte/include]) m4_ifdef([project_ompi], [-I$(top_srcdir)/ompi/include]) m4_ifdef([project_oshmem], [-I$(top_srcdir)/oshmem/include])'" $CPPFLAGS"
# C++ is only relevant if we're building OMPI
m4_ifdef([project_ompi], [CXXCPPFLAGS='-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/opal/include -I$(top_srcdir)/orte/include -I$(top_srcdir)/ompi/include'" $CXXCPPFLAGS"])
else
@ -1219,6 +1239,7 @@ fi
m4_ifdef([project_orte], [ORTE_SETUP_DEBUGGER_FLAGS],
[m4_ifdef([project_ompi], [ORTE_SETUP_DEBUGGER_FLAGS])])
m4_ifdef([project_oshmem], [OSHMEM_SETUP_CFLAGS])
#
# Delayed the substitution of CFLAGS and CXXFLAGS until now because
@ -1325,5 +1346,6 @@ AC_CONFIG_FILES([
OPAL_CONFIG_FILES
m4_ifdef([project_orte], [ORTE_CONFIG_FILES])
m4_ifdef([project_ompi], [OMPI_CONFIG_FILES])
m4_ifdef([project_oshmem], [OSHMEM_CONFIG_FILES])
AC_OUTPUT

View File

@ -10,6 +10,8 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -97,7 +99,7 @@
# Should we use the default "check_files" RPM step (i.e., check for
# unpackaged files)? It is discouraged to disable this, but some
# installers need it (e.g., older versions of OFED, because they
# installed lots of other stuff in the BUILD_ROOT before Open MPI).
# installed lots of other stuff in the BUILD_ROOT before Open MPI/SHMEM).
# type: bool (0/1)
%{!?use_check_files: %define use_check_files 1}
@ -122,7 +124,7 @@
# type: bool (0/1)
%{!?disable_auto_requires: %define disable_auto_requires 0}
# On some platforms, Open MPI just flat-out doesn't work with
# On some platforms, Open MPI/SHMEM just flat-out doesn't work with
# -D_FORTIFY_SOURCE (e.g., some users have reported that there are
# problems on ioa64 platforms). In this case, just turn it off
# (meaning: this specfile will strip out that flag from the
@ -194,7 +196,7 @@
#
#############################################################################
Summary: A powerful implementation of MPI
Summary: A powerful implementation of MPI/SHMEM
Name: %{?_name:%{_name}}%{!?_name:openmpi}
Version: $VERSION
Release: 1
@ -222,8 +224,14 @@ Open MPI is a project combining technologies and resources from
several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in
order to build the best MPI library available.
The project includes implementation of SHMEM parallel
programming library in the Partitioned Global Address Space.
This library provides fast inter-processor communication for large
messages using data passing and one-sided communication techniques.
SHMEM API based on OpenSHMEM standard from http://www.openshmem.org/
This RPM contains all the tools necessary to compile, link, and run
Open MPI jobs.
Open MPI/SHMEM jobs.
%if !%{build_all_in_one_rpm}
@ -234,7 +242,7 @@ Open MPI jobs.
#############################################################################
%package runtime
Summary: Tools and plugin modules for running Open MPI jobs
Summary: Tools and plugin modules for running Open MPI/SHMEM jobs
Group: Development/Libraries
Provides: mpi
%if %{disable_auto_requires}
@ -249,9 +257,15 @@ Open MPI is a project combining technologies and resources from several other
projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in order to build the best
MPI library available.
The project includes implementation of SHMEM parallel
programming library in the Partitioned Global Address Space.
This library provides fast inter-processor communication for large
messages using data passing and one-sided communication techniques.
SHMEM API based on OpenSHMEM standard from http://www.openshmem.org/
This subpackage provides general tools (mpirun, mpiexec, etc.) and the
Module Component Architecture (MCA) base and plugins necessary for
running Open MPI jobs.
running Open MPI/SHMEM jobs.
%endif
@ -262,7 +276,7 @@ running Open MPI jobs.
#############################################################################
%package devel
Summary: Development tools and header files for Open MPI
Summary: Development tools and header files for Open MPI/SHMEM
Group: Development/Libraries
%if %{disable_auto_requires}
AutoReq: no
@ -274,8 +288,14 @@ Open MPI is a project combining technologies and resources from
several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in
order to build the best MPI library available.
This subpackage provides the development files for Open MPI, such as
wrapper compilers and header files for MPI development.
The project includes implementation of SHMEM parallel
programming library in the Partitioned Global Address Space.
This library provides fast inter-processor communication for large
messages using data passing and one-sided communication techniques.
SHMEM API based on OpenSHMEM standard from http://www.openshmem.org/
This subpackage provides the development files for Open MPI/SHMEM, such as
wrapper compilers and header files for MPI/SHMEM development.
#############################################################################
#
@ -284,7 +304,7 @@ wrapper compilers and header files for MPI development.
#############################################################################
%package docs
Summary: Documentation for Open MPI
Summary: Documentation for Open MPI/SHMEM
Group: Development/Documentation
%if %{disable_auto_requires}
AutoReq: no
@ -296,7 +316,13 @@ Open MPI is a project combining technologies and resources from several other
projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in order to build the best
MPI library available.
This subpackage provides the documentation for Open MPI.
The project includes implementation of SHMEM parallel
programming library in the Partitioned Global Address Space.
This library provides fast inter-processor communication for large
messages using data passing and one-sided communication techniques.
SHMEM API based on OpenSHMEM standard from http://www.openshmem.org/
This subpackage provides the documentation for Open MPI/SHMEM.
#############################################################################
#
@ -423,14 +449,14 @@ cat <<EOF >$RPM_BUILD_ROOT/%{modulefile_path}/%{modulefile_subdir}/%{modulefile_
#%Module
# NOTE: This is an automatically-generated file! (generated by the
# Open MPI RPM). Any changes made here will be lost a) if the RPM is
# Open MPI/SHMEM RPM). Any changes made here will be lost a) if the RPM is
# uninstalled, or b) if the RPM is upgraded or uninstalled.
proc ModulesHelp { } {
puts stderr "This module adds Open MPI v%{version} to various paths"
puts stderr "This module adds Open MPI/SHMEM v%{version} to various paths"
}
module-whatis "Sets up Open MPI v%{version} in your enviornment"
module-whatis "Sets up Open MPI/SHMEM v%{version} in your enviornment"
prepend-path PATH "%{_prefix}/bin/"
prepend-path LD_LIBRARY_PATH %{_libdir}
@ -445,7 +471,7 @@ EOF
%{__mkdir_p} $RPM_BUILD_ROOT/%{shell_scripts_path}
cat <<EOF > $RPM_BUILD_ROOT/%{shell_scripts_path}/%{shell_scripts_basename}.sh
# NOTE: This is an automatically-generated file! (generated by the
# Open MPI RPM). Any changes made here will be lost if the RPM is
# Open MPI/SHMEM RPM). Any changes made here will be lost if the RPM is
# uninstalled or upgraded.
# PATH
@ -472,7 +498,7 @@ export MPI_ROOT
EOF
cat <<EOF > $RPM_BUILD_ROOT/%{shell_scripts_path}/%{shell_scripts_basename}.csh
# NOTE: This is an automatically-generated file! (generated by the
# Open MPI RPM). Any changes made here will be lost if the RPM is
# Open MPI/SHMEM RPM). Any changes made here will be lost if the RPM is
# uninstalled or upgraded.
# path
@ -718,6 +744,9 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
#
#############################################################################
%changelog
* Mon Jun 24 2013 Igor Ivanov <Igor.Ivanov@itseez.com>
- Add Open SHMEM parallel programming library as part of Open MPI
* Tue Dec 11 2012 Jeff Squyres <jsquyres@cisco.com>
- Re-release 1.6.0-1.6.3 SRPMs (with new SRPM Release numbers) with
patch for VampirTrace's configure script to make it install the

View File

@ -28,7 +28,7 @@ CXX = mpic++
CCC = mpic++
FC = mpifort
JAVAC = mpijavac
SHMEM = shmemcc
# Using -g is not necessary, but it is helpful for example programs,
# especially if users want to examine them with debuggers. Note that
# gmake requires the CXXFLAGS macro, while other versions of make
@ -47,6 +47,7 @@ EXAMPLES = \
hello_mpifh \
hello_usempi \
hello_usempif08 \
hello_shmem \
Hello.class \
ring_c \
ring_cxx \
@ -75,6 +76,9 @@ all: hello_c ring_c connectivity_c
@ if ompi_info --parsable | grep bindings:java:yes >/dev/null; then \
$(MAKE) Hello.class Ring.class; \
fi
@ if ompi_info --parsable | grep mca:shmem >/dev/null; then \
$(MAKE) hello_shmem; \
fi
# The usual "clean" target
@ -102,3 +106,8 @@ Hello.class: Hello.java
$(JAVAC) Hello.java
Ring.class: Ring.java
$(JAVAC) Ring.java
hello_shmem: hello_shmem.c
$(SHMEM) $(CFLAGS) $^ -o $@

View File

@ -29,6 +29,7 @@ different MPI interfaces:
Fortran use mpi: hello_usempi.f90
Fortran use mpi_f08: hello_usempif08.f90
Java: Hello.java
OSHMEM: hello_shmem.c
- Send a trivial message around in a ring
C: ring_c.c

128
examples/hello_shmem.c Normal file
View File

@ -0,0 +1,128 @@
#include "shmem.h"
#include "stdio.h"
#define N 100
static int target[N];
static int source[N];
#define STATIC_CHECK 1
#define DYNAMIC_CHECK 1
#define ATOMIC 1
#define PEER 1
int main()
{
int *source_d,*target_d;
int i;
start_pes(0);
source_d = shmalloc(sizeof(*source_d)*N);
target_d = shmalloc(sizeof(*target_d)*N);
for (i = 0; i < N; i++)
{
source_d[i] = source[i] = 1;
target[i] = target_d[i] = 9;
}
int peer = PEER;
if (_my_pe() == 0)
{
#if STATIC_CHECK
int c, f;
int a = c, b = f;
#if ATOMIC
for (i = 0; i < N; i++)
target[i] = shmem_int_g(source + i, peer);
#else
shmem_int_get(target, source, N, PEER);
#endif
#endif
#if DYNAMIC_CHECK
#if ATOMIC
for (i = 0; i < N; i++)
{
target_d[i] = shmem_int_g(source_d + i, peer);
}
#else
shmem_int_get(target_d, source_d, N, PEER);
#endif
#endif
}
if(_my_pe() == 0)
{
for (i = 0; i < N; i++)
{
#if DYNAMIC_CHECK
if(target_d[i] != 1)
{
printf("Get dynamic error %d, target + i = %p, target[0] = %d, target[1] = %d\n",i, target_d + i,target_d[0], target_d[1]);
fflush(stdout);
return 1;
#endif
#if STATIC_CHECK
if (target[i] != 1)
{
printf("Get static error %d, target + i = %p, target[i] = %d\n",i, target + i,target[i]);
fflush(stdout);
return 1;
}
#endif
}
}
}
/*put check*/
for (i = 0; i < N; i++)
{
source_d[i] = source[i] = 1;
target[i] = target_d[i] = -9;
}
shmem_barrier_all();
if (_my_pe() == 0)
{
#if STATIC_CHECK
shmem_int_put(target, source, N, PEER);
#endif
#if DYNAMIC_CHECK
shmem_int_put(target_d, source_d, N, PEER);
#endif
}
shmem_barrier_all();
if(_my_pe() == PEER)
{
for (i = 0; i < N; i++)
{
#if DYNAMIC_CHECK
if(target_d[i] != 1)
{
printf("Put dynamic error\n");
fflush(stdout);
return 1;
}
#endif
#if STATIC_CHECK
if (target[i] != 1)
{
printf("Put static error\n");
fflush(stdout);
return 1;
}
#endif
}
}
printf("All test passed\n");fflush(stdout);
shmem_finalize();
return 0;
}

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2009 Mellanox Technologies. All rights reserved.
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
*
* $COPYRIGHT$
*
@ -12,7 +13,7 @@
#ifndef BTL_OPENIB_CONNECT_BASE_H
#define BTL_OPENIB_CONNECT_BASE_H
#include "connect/connect.h"
#include "ompi/mca/btl/openib/connect/connect.h"
#ifdef OMPI_HAVE_RDMAOE
#define BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl) \

View File

@ -12,7 +12,7 @@
* Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2012 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2008-2011 Mellanox Technologies. All rights reserved.
* Copyright (c) 2008-2013 Mellanox Technologies. All rights reserved.
* Copyright (c) 2009-2011 IBM Corporation. All rights reserved.
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved
*
@ -375,6 +375,40 @@ static int qp_connect_all(mca_btl_openib_endpoint_t *endpoint)
}
static void permute_array(int *permuted_qps, int nqps)
{
int i;
int idx;
int tmp;
int control[nqps];
for (i = 0; i < nqps; i++) {
permuted_qps[i] = i;
control[i] = 0;
}
for (i = 0; i < nqps - 1; i++) {
idx = i + random() % (nqps - i);
tmp = permuted_qps[i];
permuted_qps[i] = permuted_qps[idx];
permuted_qps[idx] = tmp;
}
/* verify that permutation is ok: */
for (i = 0; i < nqps; i++) {
control[permuted_qps[i]] ++;
}
for (i = 0; i < nqps; i++) {
if (control[i] != 1) {
BTL_VERBOSE(("bad permutation detected: "));
for (i = 0; i < nqps; i++) BTL_VERBOSE(("%d ", permuted_qps[i]));
BTL_VERBOSE(("\n"));
abort();
}
}
}
/*
* Create the local side of all the qp's. The remote sides will be
* connected later.
@ -384,6 +418,12 @@ static int qp_create_all(mca_btl_base_endpoint_t* endpoint)
int qp, rc, pp_qp_num = 0;
int32_t rd_rsv_total = 0;
int rand_qpns[mca_btl_openib_component.num_qps];
int i;
permute_array(rand_qpns, mca_btl_openib_component.num_qps);
for (qp = 0; qp < mca_btl_openib_component.num_qps; ++qp)
if(BTL_OPENIB_QP_TYPE_PP(qp)) {
rd_rsv_total +=
@ -396,11 +436,12 @@ static int qp_create_all(mca_btl_base_endpoint_t* endpoint)
if(0 == pp_qp_num && true == endpoint->use_eager_rdma)
pp_qp_num = 1;
for (qp = 0; qp < mca_btl_openib_component.num_qps; ++qp) {
for (i = 0; i < mca_btl_openib_component.num_qps; ++i) {
struct ibv_srq *srq = NULL;
uint32_t max_recv_wr, max_send_wr;
int32_t rd_rsv, rd_num_credits;
qp = rand_qpns[i];
/* QP used for SW flow control need some additional recourses */
if(qp == mca_btl_openib_component.credits_qp) {
rd_rsv = rd_rsv_total;
@ -467,7 +508,7 @@ static int qp_create_one(mca_btl_base_endpoint_t* endpoint, int qp,
memset(&attr, 0, sizeof(attr));
init_attr.qp_type = IBV_QPT_RC;
init_attr.send_cq = openib_btl->device->ib_cq[BTL_OPENIB_LP_CQ];
init_attr.send_cq = openib_btl->device->ib_cq[BTL_OPENIB_RDMA_QP(qp) ? BTL_OPENIB_HP_CQ: BTL_OPENIB_LP_CQ];
init_attr.recv_cq = openib_btl->device->ib_cq[qp_cq_prio(qp)];
init_attr.srq = srq;
init_attr.cap.max_inline_data = req_inline =

View File

@ -1,5 +1,7 @@
/*
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved.
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
*
* $COPYRIGHT$
*
@ -210,6 +212,9 @@ BEGIN_C_DECLS
#define OMPI_RML_PCONNECT_TAG OMPI_RML_TAG_BASE+13
/* open shmem oob communication */
#define OMPI_RML_TAG_SHMEM OMPI_RML_TAG_BASE+14
#define OMPI_RML_TAG_DYNAMIC OMPI_RML_TAG_BASE+200
/*

View File

@ -11,6 +11,8 @@
* All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2009-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -220,6 +222,12 @@
# define __opal_attribute_weak_alias__(a)
#endif
#if OPAL_HAVE_ATTRIBUTE_DESTRUCTOR
# define __opal_attribute_destructor__ __attribute__((__destructor__))
#else
# define __opal_attribute_destructor__
#endif
# if OPAL_C_HAVE_VISIBILITY
# define OPAL_DECLSPEC __opal_attribute_visibility__("default")
# define OPAL_MODULE_DECLSPEC __opal_attribute_visibility__("default")

123
oshmem/Makefile.am Normal file
View File

@ -0,0 +1,123 @@
#
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
AM_CFLAGS = $(OSHMEM_CFLAGS)
# Do we have profiling?
if OSHMEM_PROFILING
c_pshmem_lib = shmem/c/profile/libshmem_c_pshmem.la
else
c_pshmem_lib =
endif
f77_shmem_lib = shmem/f77/libshmem_f77.la
# Note that the ordering of "." in SUBDIRS is important: the C++, F77,
# and F90 bindings are all in standalone .la files that depend on
# libshmem.la. So we must fully build libshmem.la first.
# NOTE: A handful of files in mpi/f77/base must be included in
# libshmem.la. But we wanted to keep all the Fortran sources together
# in the same tree, so we moved those sources to a separate
# subdirectory with its own Makefile.include that is included in this
# Makefile.am (NOTE: it did *not* work to put all the files -- base
# q
# and non-base -- into mpi/f77 and have both a regular Makefile.am for
# building the f77 bindings library and a separate Makefile.include
# that was included in this top-level Makefile.am; problems occurred
# with "make distclean" and files in the ompi/mpi/f77/.deps directory
# -- it's not clear whether this is an AM bug or whether this behavior
# is simply not supported). This ompi/mpi/f77/base/Makefile.include
# file makes a convenience LT library that is then sucked into
# libshmem.la (the ompi/mpi/f77/base sources must be compiled with
# special CPPFLAGS; we can't just add the raw sources to
# libshmem_la_SOURCES, unfortunately).
# The end of the result is that libshmem.la -- including a few sources
# from mpi/f77/base -- is fully built before the C++, F77, and F90
# bindings are built. Therefore, the C++, F77 and F90 bindings
# libraries can all link against libshmem.la.
SUBDIRS = \
include \
shmem/c \
shmem/f77 \
$(EXT_oshmem_FRAMEWORKS_SUBDIRS) \
$(EXT_oshmem_FRAMEWORK_COMPONENT_STATIC_SUBDIRS) \
$(MCA_oshmem_FRAMEWORKS_SUBDIRS) \
$(MCA_oshmem_FRAMEWORK_COMPONENT_STATIC_SUBDIRS) \
. \
$(MCA_oshmem_FRAMEWORK_COMPONENT_DSO_SUBDIRS)
DIST_SUBDIRS = \
include \
shmem/c \
shmem/f77 \
$(EXT_oshmem_FRAMEWORKS_SUBDIRS) \
$(EXT_oshmem_FRAMEWORK_COMPONENT_ALL_SUBDIRS) \
$(MCA_oshmem_FRAMEWORKS_SUBDIRS) \
$(MCA_oshmem_FRAMEWORK_COMPONENT_ALL_SUBDIRS)
#Build The main SHMEM library
lib_LTLIBRARIES = libshmem.la
libshmem_la_SOURCES =
libshmem_la_LIBADD = \
shmem/c/libshmem_c.la \
$(c_pshmem_lib) \
$(f77_shmem_lib) \
$(MCA_oshmem_FRAMEWORK_LIBS) \
$(top_ompi_builddir)/ompi/libmpi.la
libshmem_la_DEPENDENCIES = $(libshmem_la_LIBADD)
libshmem_la_LDFLAGS = \
-version-info $(libshmem_so_version) \
$(OSHMEM_LIBSHMEM_EXTRA_LDFLAGS)
# included subdirectory Makefile.am's and appended-to variables
headers =
noinst_LTLIBRARIES =
include_HEADERS =
nobase_oshmem_HEADERS =
dist_pkgdata_DATA =
libshmem_la_SOURCES += $(headers)
nodist_man_MANS =
# Conditionally install the header files
if WANT_INSTALL_HEADERS
oshmemdir = $(includedir)/oshmem/oshmem
nobase_oshmem_HEADERS += $(headers)
else
oshmemdir = $(includedir)
endif
include op/Makefile.am
include proc/Makefile.am
include request/Makefile.am
include runtime/Makefile.am
include shmem/Makefile.am
include tools/Makefile.am
# Ensure that the man page directory exists before we try to make man
# page files (because oshmem/shmem/man/man3 has no config.status-generated
# Makefile)
dir_stamp = $(top_builddir)/$(subdir)/shmem/man/man3/.dir-stamp
# Also ensure that the man pages are rebuilt if the opal_config.h file
# changes (e.g., configure was run again, meaning that the release
# date or version may have changed)
$(nodist_man_MANS): $(dir_stamp) $(top_builddir)/opal/include/opal_config.h
$(dir_stamp):
$(mkdir_p) `dirname $@`
touch "$@"
# Remove the generated man pages
distclean-local:
rm -f $(nodist_man_MANS) $(dir_stamp)

View File

@ -0,0 +1,51 @@
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# mpif-common.h is not generated, but mpif.h and mpif-config.h are.
# See big comments in these files for an explanation.
# note - headers and nodist_headers will go in ${includedir}/openmpi,
# not ${includedir}/
headers =
nodist_headers = \
oshmem_config.h
# Install these in $(includedir)
include_HEADERS =
# Install these in $(includedir)
mppincludedir = $(includedir)/mpp
mppinclude_HEADERS = mpp/shmem.h \
mpp/shmem.fh
# Always install these in $(pkgincludedir)
pkginclude_HEADERS =
include_HEADERS += shmem.fh
# These files are always installed in $(includedir), but shouldn't be
# shipped since they are generated by configure from their .in
# counterparts (which AM automatically ships).
nodist_include_HEADERS = \
shmem.h \
shmem_portable_platform.h
if WANT_INSTALL_HEADERS
oshmemdir = $(includedir)/oshmem
nobase_dist_oshmem_HEADERS = $(headers)
nobase_nodist_oshmem_HEADERS = $(nodist_headers)
else
oshmemdir = $(includedir)
nobase_dist_noinst_HEADERS = $(headers)
nobase_nodist_noinst_HEADERS = $(nodist_headers)
endif
distclean-local:
include oshmem/Makefile.am

View File

@ -0,0 +1,457 @@
!
! Copyright (c) 2013 Mellanox Technologies, Inc.
! All rights reserved.
! $COPYRIGHT$
!
! Additional copyrights may follow
!
! $HEADER$
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Do ***not*** copy this file to the directory where your Fortran
! fortran application is compiled unless it is absolutely necessary! Most
! modern Fortran compilers now support the -I command line flag, which
! tells the compiler where to find .h files (specifically, this one). For
! example:
!
! shell$ mpif77 foo.f -o foo -I$OMPI_HOME/include
!
! will probably do the trick (assuming that you have set OMPI_HOME
! properly).
!
! That being said, OMPI's "mpif77" wrapper compiler should
! automatically include the -I option for you. The following command
! should be equivalent to the command listed above:
!
! shell$ mpif77 foo.f -o foo
!
! You should not copy this file to your local directory because it is
! possible that this file will be changed between versions of Open MPI.
! Indeed, this mpif.h is incompatible with the mpif.f of other
! implementations of MPI. Using this mpif.h with other implementations
! of MPI, or with other versions of Open MPI will result in undefined
! behavior (to include incorrect results, segmentation faults,
! unexplainable "hanging" in your application, etc.). Always use the
! -I command line option instead (or let mpif77 do it for you).
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! This file contains the bulk of the Open MPI Fortran interface. It
! is included as a back-end file to both mpif.h (i.e., the
! standardized MPI Fortran header file) and mpi.f90 (the MPI-2
! Fortran module source file, found in ompi/mpi/f90).
!
! This file is marginally different than mpif.h. mpif.h includes
! some "external" statements that are not suitable for use with the
! MPI-2 F90 module, and therefore cannot be included in the mpi.f90
! source file. Hence, this file is essentially everything that
! needs to be in the standardized mpif.h *except* the "external"
! statements, and is therefore suitable to be included in mpi.f90.
!
! First, however, include some output from configure.
!
include 'mpif-config.h'
!
! MPI version
!
integer MPI_VERSION, MPI_SUBVERSION
parameter (MPI_VERSION=2)
parameter (MPI_SUBVERSION=1)
!
! Miscellaneous constants
!
integer MPI_ANY_SOURCE, MPI_ANY_TAG
integer MPI_PROC_NULL
integer MPI_ROOT
integer MPI_UNDEFINED
integer MPI_CART, MPI_GRAPH, MPI_KEYVAL_INVALID
integer MPI_SOURCE, MPI_TAG, MPI_ERROR
integer MPI_TAG_UB, MPI_HOST, MPI_IO, MPI_WTIME_IS_GLOBAL
integer MPI_APPNUM, MPI_LASTUSEDCODE, MPI_UNIVERSE_SIZE
integer IMPI_CLIENT_SIZE, IMPI_CLIENT_COLOR
integer IMPI_HOST_SIZE, IMPI_HOST_COLOR
integer MPI_BSEND_OVERHEAD
integer MPI_ORDER_C, MPI_ORDER_FORTRAN
integer MPI_DISTRIBUTE_BLOCK, MPI_DISTRIBUTE_CYCLIC
integer MPI_DISTRIBUTE_NONE, MPI_DISTRIBUTE_DFLT_DARG
integer MPI_TYPECLASS_INTEGER, MPI_TYPECLASS_REAL
integer MPI_TYPECLASS_COMPLEX
integer MPI_MODE_NOCHECK, MPI_MODE_NOPRECEDE, MPI_MODE_NOPUT
integer MPI_MODE_NOSTORE, MPI_MODE_NOSUCCEED
integer MPI_LOCK_EXCLUSIVE, MPI_LOCK_SHARED
integer MPI_WIN_BASE, MPI_WIN_SIZE, MPI_WIN_DISP_UNIT
parameter (MPI_ANY_SOURCE=-1)
parameter (MPI_ANY_TAG=-1)
parameter (MPI_PROC_NULL=-2)
parameter (MPI_ROOT=-4)
parameter (MPI_UNDEFINED=-32766)
parameter (MPI_CART=1)
parameter (MPI_GRAPH=2)
parameter (MPI_KEYVAL_INVALID=-1)
parameter (MPI_SOURCE=1)
parameter (MPI_TAG=2)
parameter (MPI_ERROR=3)
parameter (MPI_TAG_UB=0)
parameter (MPI_HOST=1)
parameter (MPI_IO=2)
parameter (MPI_WTIME_IS_GLOBAL=3)
parameter (MPI_APPNUM=4)
parameter (MPI_LASTUSEDCODE=5)
parameter (MPI_UNIVERSE_SIZE=6)
parameter (MPI_WIN_BASE=7)
parameter (MPI_WIN_SIZE=8)
parameter (MPI_WIN_DISP_UNIT=9)
parameter (IMPI_CLIENT_SIZE=10)
parameter (IMPI_CLIENT_COLOR=11)
parameter (IMPI_HOST_SIZE=12)
parameter (IMPI_HOST_COLOR=13)
parameter (MPI_BSEND_OVERHEAD=128)
parameter (MPI_ORDER_C=0)
parameter (MPI_ORDER_FORTRAN=1)
parameter (MPI_DISTRIBUTE_BLOCK=0)
parameter (MPI_DISTRIBUTE_CYCLIC=1)
parameter (MPI_DISTRIBUTE_NONE=2)
parameter (MPI_DISTRIBUTE_DFLT_DARG=-1)
parameter (MPI_TYPECLASS_INTEGER=1)
parameter (MPI_TYPECLASS_REAL=2)
parameter (MPI_TYPECLASS_COMPLEX=3)
parameter (MPI_MODE_NOCHECK=1)
parameter (MPI_MODE_NOPRECEDE=2)
parameter (MPI_MODE_NOPUT=4)
parameter (MPI_MODE_NOSTORE=8)
parameter (MPI_MODE_NOSUCCEED=16)
parameter (MPI_LOCK_EXCLUSIVE=1)
parameter (MPI_LOCK_SHARED=2)
!
! MPI sentinel values
!
! Several of these types were chosen with care to match specific
! overloaded functions in the F90 bindings. They should also match
! the types of their corresponding C variables. Do not arbitrarily
! change their types without also updating the F90 bindings and
! their corresponding types in ompi/mpi/f77/constants.h and
! ompi/mpi/runtime/ompi_init.c!
!
! MPI_BOTTOM is only used where choice buffers can be used (meaning
! that we already have overloaded F90 bindings for all available
! types), so any type is fine.
integer MPI_BOTTOM
! MPI_IN_PLACE has the same rationale as MPI_BOTTOM.
integer MPI_IN_PLACE
! Making MPI_ARGV_NULL be the same type as the parameter that is
! exepected in the F90 binding for MPI_COMM_SPAWN means that we
! don't need another binding for MPI_COMM_SPAWN.
character MPI_ARGV_NULL(1)
! The array_of_argv parameter in the F90 bindings for
! MPI_COMM_SPAWN_MULTIPLE takes a variable number of dimensions
! (specified by the "count" parameter), so it's not possible to have
! a single variable match all possible values. Hence, make it an
! entirely different type (one that would never likely be used by a
! correct program, e.g., double) and have a separate F90 binding for
! matching just this type.
double precision MPI_ARGVS_NULL
! MPI_ERRCODES_IGNORE has similar rationale to MPI_ARGV_NULL. The
! F77 functions are all smart enough to check that the errcodes
! parameter is not ERRCODES_IGNORE before assigning values into it
! (hence, the fact that this is an array of only 1 element does not
! matter -- we'll never overrun it because we never assign values
! into it).
integer MPI_ERRCODES_IGNORE(1)
! MPI_STATUS_IGNORE has similar rationale to MPI_ERRCODES_IGNORE.
integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE)
! MPI_STATUSES_IGNORE has similar rationale to MPI_ARGVS_NULL.
double precision MPI_STATUSES_IGNORE
common/mpi_fortran_bottom/MPI_BOTTOM
common/mpi_fortran_in_place/MPI_IN_PLACE
common/mpi_fortran_argv_null/MPI_ARGV_NULL
common/mpi_fortran_argvs_null/MPI_ARGVS_NULL
common/mpi_fortran_errcodes_ignore/MPI_ERRCODES_IGNORE
common/mpi_fortran_status_ignore/MPI_STATUS_IGNORE
common/mpi_fortran_statuses_ignore/MPI_STATUSES_IGNORE
!
! NULL "handles" (indices)
!
integer MPI_GROUP_NULL, MPI_COMM_NULL, MPI_DATATYPE_NULL
integer MPI_REQUEST_NULL, MPI_OP_NULL, MPI_ERRHANDLER_NULL
integer MPI_INFO_NULL, MPI_WIN_NULL
parameter (MPI_GROUP_NULL=0)
parameter (MPI_COMM_NULL=2)
parameter (MPI_DATATYPE_NULL=0)
parameter (MPI_REQUEST_NULL=0)
parameter (MPI_OP_NULL=0)
parameter (MPI_ERRHANDLER_NULL=0)
parameter (MPI_INFO_NULL=0)
parameter (MPI_WIN_NULL=0)
!
! MPI_Init_thread constants
!
integer MPI_THREAD_SINGLE, MPI_THREAD_FUNNELED
integer MPI_THREAD_SERIALIZED, MPI_THREAD_MULTIPLE
parameter (MPI_THREAD_SINGLE=0)
parameter (MPI_THREAD_FUNNELED=1)
parameter (MPI_THREAD_SERIALIZED=2)
parameter (MPI_THREAD_MULTIPLE=3)
!
! error classes
!
integer SHMEM_SUCCESS
integer SHMEM_ERR_BUFFER
integer SHMEM_ERR_COUNT
integer SHMEM_ERR_TYPE
integer SHMEM_ERR_TAG
integer SHMEM_ERR_COMM
integer SHMEM_ERR_RANK
integer SHMEM_ERR_REQUEST
integer SHMEM_ERR_ROOT
integer SHMEM_ERR_GROUP
integer SHMEM_ERR_OP
integer SHMEM_ERR_TOPOLOGY
integer SHMEM_ERR_DIMS
integer SHMEM_ERR_ARG
integer SHMEM_ERR_UNKNOWN
integer SHMEM_ERR_TRUNCATE
integer SHMEM_ERR_OTHER
integer SHMEM_ERR_INTERN
integer SHMEM_ERR_IN_STATUS
integer SHMEM_ERR_PENDING
integer SHMEM_ERR_ACCESS
integer SHMEM_ERR_AMODE
integer SHMEM_ERR_ASSERT
integer SHMEM_ERR_BAD_FILE
integer SHMEM_ERR_BASE
integer SHMEM_ERR_CONVERSION
integer SHMEM_ERR_DISP
integer SHMEM_ERR_DUP_DATAREP
integer SHMEM_ERR_FILE_EXISTS
integer SHMEM_ERR_FILE_IN_USE
integer SHMEM_ERR_FILE
integer SHMEM_ERR_INFO_KEY
integer SHMEM_ERR_INFO_NOKEY
integer SHMEM_ERR_INFO_VALUE
integer SHMEM_ERR_INFO
integer SHMEM_ERR_IO
integer SHMEM_ERR_KEYVAL
integer SHMEM_ERR_LOCKTYPE
integer SHMEM_ERR_NAME
integer SHMEM_ERR_NO_MEM
integer SHMEM_ERR_NOT_SAME
integer SHMEM_ERR_NO_SPACE
integer SHMEM_ERR_NO_SUCH_FILE
integer SHMEM_ERR_PORT
integer SHMEM_ERR_QUOTA
integer SHMEM_ERR_READ_ONLY
integer SHMEM_ERR_RMA_CONFLICT
integer SHMEM_ERR_RMA_SYNC
integer SHMEM_ERR_SERVICE
integer SHMEM_ERR_SIZE
integer SHMEM_ERR_SPAWN
integer SHMEM_ERR_UNSUPPORTED_DATAREP
integer SHMEM_ERR_UNSUPPORTED_OPERATION
integer SHMEM_ERR_WIN
integer SHMEM_ERR_SYSRESOURCE
integer SHMEM_ERR_LASTCODE
parameter( SHMEM_SUCCESS = 0)
parameter( SHMEM_ERR_BUFFER = 1)
parameter( SHMEM_ERR_COUNT = 2)
parameter( SHMEM_ERR_TYPE = 3)
parameter( SHMEM_ERR_TAG = 4)
parameter( SHMEM_ERR_COMM = 5)
parameter( SHMEM_ERR_RANK = 6)
parameter( SHMEM_ERR_REQUEST = 7)
parameter( SHMEM_ERR_ROOT = 8)
parameter( SHMEM_ERR_GROUP = 9)