summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/openmpi')
-rw-r--r--sys-cluster/openmpi/Manifest7
-rw-r--r--sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch42
-rw-r--r--sys-cluster/openmpi/files/openmpi-1.4.1-r22513.patch72
-rw-r--r--sys-cluster/openmpi/files/openmpi-1.6-hostfile.patch16
-rw-r--r--sys-cluster/openmpi/files/openmpi-ltdl.patch78
-rw-r--r--sys-cluster/openmpi/files/openmpi-r24328.patch54
-rw-r--r--sys-cluster/openmpi/metadata.xml19
-rw-r--r--sys-cluster/openmpi/openmpi-1.4.3.ebuild102
-rw-r--r--sys-cluster/openmpi/openmpi-1.4.5.ebuild104
-rw-r--r--sys-cluster/openmpi/openmpi-1.6.5-r1.ebuild171
-rw-r--r--sys-cluster/openmpi/openmpi-1.7.5-r1.ebuild167
-rw-r--r--sys-cluster/openmpi/openmpi-1.8.4-r4.ebuild170
-rw-r--r--sys-cluster/openmpi/openmpi-1.8.7-r1.ebuild183
-rw-r--r--sys-cluster/openmpi/openmpi-1.8.8.ebuild183
14 files changed, 1368 insertions, 0 deletions
diff --git a/sys-cluster/openmpi/Manifest b/sys-cluster/openmpi/Manifest
new file mode 100644
index 000000000000..7d0a0704017d
--- /dev/null
+++ b/sys-cluster/openmpi/Manifest
@@ -0,0 +1,7 @@
+DIST openmpi-1.4.3.tar.bz2 6626909 SHA256 220b72b1c7ee35469ff74b4cfdbec457158ac6894635143a33e9178aa3981015 SHA512 c33d5e019ba0b080aa34ecfa085182349da806e4bff26c1bf4dbdc8fb3f8f3c38899b9d96d671e1ae337b523ac9d634ae25c49d9af6eef2bc340c29dba75b1b8 WHIRLPOOL 92349d7bd16ff6e8563df602c215ce98ce5624b38a2975c13832d5b9504691c844206acad4c45376fe53e0116fe591782a3e5f8a132c4ac18ae793470d57db55
+DIST openmpi-1.4.5.tar.bz2 6643760 SHA256 a3857bc69b7d5258cf7fc1ed1581d9ac69110f5c17976b949cb7ec789aae462d SHA512 f89922345cde8978483e397e9016103626db3f1787f9afccaf0f60d59caa2a4409b47b01ac221d60e24e241f2afecb636ca89688bf326dc0ca5c817de96b3e99 WHIRLPOOL 2008bd952f9cc93ead6508267f5a45ee6d9ebf9136e35e25b798400d162173514da73349518bfada4777471c32d315e8556bbee8847a5268719d6b32fd0fd811
+DIST openmpi-1.6.5.tar.bz2 10943881 SHA256 fe37bab89b5ef234e0ac82dc798282c2ab08900bf564a1ec27239d3f1ad1fc85 SHA512 b0ede0264cd9263b8ba59ec51d17ad47b5f20d49d219ca05f7c396d608398d517b2023a46a2535fd6191160d709e4805c4de436dcfee56eda287383bd69f9652 WHIRLPOOL d0288677827c1deba17295ee1b69cd21da294ac314cc49404389b4c286384f9f2f229cae4c4fd62511e7f20abc510998642d6a2edfac3f16f83078f474f8e735
+DIST openmpi-1.7.5.tar.bz2 13286694 SHA256 cb3eef6880537d341d5d098511d390ec853716a6ec94007c03a0d1491b2ac8f2 SHA512 72de2788fa26615a2e7373b5f32e0a2b9e39d56094c45b49348ef19bbb0ea306734b7d3275d76471a18628b5244d882de4ed3595eb46f13683e1c8d2b277f065 WHIRLPOOL 107edd2eeca6e0ce9a9fb9ea1cd920cb1a87e8434390f2ed93279734c61bed63e9942bf2d33081e992d4d892f77a8643abbb58194aa76f7148d8716f1648aa82
+DIST openmpi-1.8.4.tar.bz2 13488749 SHA256 23158d916e92c80e2924016b746a93913ba7fae9fff51bf68d5c2a0ae39a2f8a SHA512 d4c8ce2bd3359cf2e85958b58ba18b52c9cef6676718eb3d948309b164b2f54544f8f8419ef6881c7a51ba268a876cd56e9b2d340a106a16fa25fb9fc3e4eff9 WHIRLPOOL 793f64ad44c2e3451a269bcb53d747d15a01649978d80f13599596e1bdd6a6011b50fdd60222bbe3a4ebe567a4785b2660e3c1eb09bdba77420581a0062480a2
+DIST openmpi-1.8.7.tar.bz2 13228742 SHA256 da629e9bd820a379cfafe15f842ee9b628d7451856085ccc23ee75ab3e1b48c7 SHA512 953e007b00c9753bafc05d13e6f686c9aa47f76f55fcc4eda565174d410de059e07862b7e667d15df13afb80418661d9a8d5ee17fdcc211d3e044992cd9ceede WHIRLPOOL 374edbca97262217dfe405414deff2f6a3cacc06daec56e3356ea76f27804ef3caa3f37050dc8a81f257b83c1ced49fd5f66647c2cba4892fbe4ec9746a6f84e
+DIST openmpi-1.8.8.tar.bz2 13231433 SHA256 a28382d1e6a36f4073412dc00836ff2524e42b674da9caf6ca7377baad790b94 SHA512 8ca2e3ebb9d9ba0f33faba9bef76fe95293721b73619cbc18176611074a56c277e9ab6cae7fa6c87ace11f16151c1bc495b2a8dbc8ad064d5a8f89f5d431a660 WHIRLPOOL e36186452978ba7a368c83b84b8b089f6995450fa866b7b8300d32eec7e64a816abf5f301dc716bf25b3b45b987489952ffc4b7057f4407677f2a2df5ee67cdd
diff --git a/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch b/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch
new file mode 100644
index 000000000000..197430aee6f2
--- /dev/null
+++ b/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch
@@ -0,0 +1,42 @@
+From 3bd5897c7ca8ab61fb024957aeae891e204b3e3f Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Mon, 1 Jul 2013 20:37:17 -0400
+Subject: [PATCH] hooks: disable malloc override inside of Gentoo sandbox
+
+As described in the comments in the source, Gentoo's own version of
+fakeroot, sandbox, also runs into hangs when malloc is overridden.
+Sandbox environments can easily be detected by looking for SANDBOX_PID
+in the environment. When detected, employ the same fix used for
+fakeroot.
+
+See https://bugs.gentoo.org/show_bug.cgi?id=462602
+---
+ opal/mca/memory/linux/hooks.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/opal/mca/memory/linux/hooks.c b/opal/mca/memory/linux/hooks.c
+index 6a1646f..5ded08c 100644
+--- a/opal/mca/memory/linux/hooks.c
++++ b/opal/mca/memory/linux/hooks.c
+@@ -747,9 +747,16 @@ static void opal_memory_linux_malloc_init_hook(void)
+ "fakeroot" build environment that allocates memory during
+ stat() (see http://bugs.debian.org/531522). It may not be
+ necessary any more since we're using access(), not stat(). But
+- we'll leave the check, anyway. */
++ we'll leave the check, anyway.
++
++ This is also an issue when using Gentoo's version of 'fakeroot',
++ sandbox v2.5. Sandbox environments can also be detected fairly
++ easily by looking for SANDBOX_ON.
++ */
++
+ if (getenv("FAKEROOTKEY") != NULL ||
+- getenv("FAKED_MODE") != NULL) {
++ getenv("FAKED_MODE") != NULL ||
++ getenv("SANDBOX_ON") != NULL ) {
+ return;
+ }
+
+--
+1.8.1.5
+
diff --git a/sys-cluster/openmpi/files/openmpi-1.4.1-r22513.patch b/sys-cluster/openmpi/files/openmpi-1.4.1-r22513.patch
new file mode 100644
index 000000000000..128443be5f9d
--- /dev/null
+++ b/sys-cluster/openmpi/files/openmpi-1.4.1-r22513.patch
@@ -0,0 +1,72 @@
+From 9657a0fc671dd0987b6954932a08b680c35f480f Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Wed, 3 Feb 2010 17:13:13 -0500
+Subject: [PATCH] Backport r22513
+
+Per #2201, move the user arguments up to be the first set of argv
+after the compiler argv tokens.
+
+Not closing #2201 yet; there's still discussion on that ticket about
+whether we want to do more or not.
+
+Refs #2201
+cmr:v1.4.2
+cmr:v1.5
+
+Author: jsquyres
+---
+ ompi/tools/wrappers/ompi_wrapper_script.in | 4 +++-
+ opal/tools/wrappers/opal_wrapper.c | 9 +++++----
+ 2 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/ompi/tools/wrappers/ompi_wrapper_script.in b/ompi/tools/wrappers/ompi_wrapper_script.in
+index 24726ad..87fd8a5 100644
+--- a/ompi/tools/wrappers/ompi_wrapper_script.in
++++ b/ompi/tools/wrappers/ompi_wrapper_script.in
+@@ -140,13 +140,15 @@ my @exec_argv = ();
+
+ # assemble command
+ push(@exec_argv, split(' ', $comp));
++# Per https://svn.open-mpi.org/trac/ompi/ticket/2201, add all the user
++# arguments before anything else.
++push(@exec_argv, @appargs);
+ if ($want_preproc == 1) {
+ push(@exec_argv, split(' ', $preproc_flags));
+ }
+ if ($want_compile == 1) {
+ push(@exec_argv, split(' ', $comp_flags));
+ }
+-push(@exec_argv, @appargs);
+ if ($want_link == 1) {
+ push(@exec_argv, split(' ', $linker_flags));
+ push(@exec_argv, split(' ', $libs));
+diff --git a/opal/tools/wrappers/opal_wrapper.c b/opal/tools/wrappers/opal_wrapper.c
+index 86ece5b..1b80f53 100644
+--- a/opal/tools/wrappers/opal_wrapper.c
++++ b/opal/tools/wrappers/opal_wrapper.c
+@@ -712,6 +712,11 @@ main(int argc, char *argv[])
+ exec_argc = 0;
+ }
+
++ /* Per https://svn.open-mpi.org/trac/ompi/ticket/2201, add all the
++ user arguments before anything else. */
++ opal_argv_insert(&exec_argv, exec_argc, user_argv);
++ exec_argc = opal_argv_count(exec_argv);
++
+ /* preproc flags */
+ if (flags & COMP_WANT_PREPROC) {
+ opal_argv_insert(&exec_argv, exec_argc, options_data[user_data_idx].preproc_flags);
+@@ -732,10 +737,6 @@ main(int argc, char *argv[])
+ exec_argc = opal_argv_count(exec_argv);
+ }
+
+- /* add all the user arguments */
+- opal_argv_insert(&exec_argv, exec_argc, user_argv);
+- exec_argc = opal_argv_count(exec_argv);
+-
+ /* link flags and libs */
+ if (flags & COMP_WANT_LINK) {
+ opal_argv_insert(&exec_argv, exec_argc, options_data[user_data_idx].link_flags);
+--
+1.6.4.4
+
diff --git a/sys-cluster/openmpi/files/openmpi-1.6-hostfile.patch b/sys-cluster/openmpi/files/openmpi-1.6-hostfile.patch
new file mode 100644
index 000000000000..880c42926166
--- /dev/null
+++ b/sys-cluster/openmpi/files/openmpi-1.6-hostfile.patch
@@ -0,0 +1,16 @@
+Fix default hostfile location (backported r26440)
+
+https://bugs.gentoo.org/show_bug.cgi?id=420431
+
+Patch by Orion Poplawski <orion AT SPAMFREE cora DOT nwra DOT com>
+--- a/orte/runtime/orte_mca_params.c
++++ b/orte/runtime/orte_mca_params.c
+@@ -225,7 +225,7 @@ int orte_register_params(void)
+ false, false, 1000, &orte_timeout_usec_per_proc);
+
+ /* default hostfile */
+- asprintf(&orte_default_hostfile, "%s/etc/openmpi-default-hostfile", opal_install_dirs.prefix);
++ asprintf(&orte_default_hostfile, "%s/openmpi-default-hostfile", opal_install_dirs.sysconfdir);
+ mca_base_param_reg_string_name("orte", "default_hostfile",
+ "Name of the default hostfile (relative or absolute path, \"none\" to ignore environmental or default MCA param setting)",
+ false, false, orte_default_hostfile, &orte_default_hostfile);
diff --git a/sys-cluster/openmpi/files/openmpi-ltdl.patch b/sys-cluster/openmpi/files/openmpi-ltdl.patch
new file mode 100644
index 000000000000..a288ea272473
--- /dev/null
+++ b/sys-cluster/openmpi/files/openmpi-ltdl.patch
@@ -0,0 +1,78 @@
+diff -up openmpi-1.6.3/ompi/debuggers/dlopen_test.c.ltdl openmpi-1.6.3/ompi/debuggers/dlopen_test.c
+--- openmpi-1.6.3/ompi/debuggers/dlopen_test.c.ltdl 2012-04-03 08:30:25.000000000 -0600
++++ openmpi-1.6.3/ompi/debuggers/dlopen_test.c 2012-11-02 14:50:12.613702426 -0600
+@@ -13,7 +13,17 @@
+ #include <string.h>
+ #include <stdlib.h>
+
+-#include "opal/libltdl/ltdl.h"
++#if OPAL_WANT_LIBLTDL
++ #ifndef __WINDOWS__
++ #if OPAL_LIBLTDL_INTERNAL
++ #include "opal/libltdl/ltdl.h"
++ #else
++ #include "ltdl.h"
++ #endif
++ #else
++ #include "ltdl.h"
++ #endif
++#endif
+
+ static int do_test(void);
+
+diff -up openmpi-1.6.3/ompi/debuggers/Makefile.am.ltdl openmpi-1.6.3/ompi/debuggers/Makefile.am
+--- openmpi-1.6.3/ompi/debuggers/Makefile.am.ltdl 2012-04-03 08:30:25.000000000 -0600
++++ openmpi-1.6.3/ompi/debuggers/Makefile.am 2012-11-02 15:04:53.636926260 -0600
+@@ -47,7 +47,7 @@ headers = \
+
+ dlopen_test_SOURCES = dlopen_test.c
+ dlopen_test_CPPFLAGS = -I$(top_srcdir)/opal/libltdl
+-dlopen_test_LDADD = $(top_builddir)/opal/libltdl/libltdlc.la
++dlopen_test_LDADD = $(LIBLTDL)
+
+ predefined_gap_test_SOURCES = predefined_gap_test.c
+ predefined_gap_test_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS)
+diff -up openmpi-1.6.3/test/support/components.c.ltdl openmpi-1.6.3/test/support/components.c
+--- openmpi-1.6.3/test/support/components.c.ltdl 2012-04-03 08:29:44.000000000 -0600
++++ openmpi-1.6.3/test/support/components.c 2012-11-02 14:50:29.204705380 -0600
+@@ -24,7 +24,17 @@
+
+ #include "opal/constants.h"
+ #include "opal/mca/mca.h"
+-#include "opal/libltdl/ltdl.h"
++#if OPAL_WANT_LIBLTDL
++ #ifndef __WINDOWS__
++ #if OPAL_LIBLTDL_INTERNAL
++ #include "opal/libltdl/ltdl.h"
++ #else
++ #include "ltdl.h"
++ #endif
++ #else
++ #include "ltdl.h"
++ #endif
++#endif
+
+ #include "components.h"
+
+diff -up openmpi-1.6.3/test/support/components.h.ltdl openmpi-1.6.3/test/support/components.h
+--- openmpi-1.6.3/test/support/components.h.ltdl 2012-04-03 08:29:44.000000000 -0600
++++ openmpi-1.6.3/test/support/components.h 2012-11-02 14:50:22.409703519 -0600
+@@ -20,7 +20,17 @@
+ #ifndef OMPI_SUPPORT_COMPONENTS_H
+ #define OMPI_SUPPORT_COMPONENTS_H
+
+-#include "opal/libltdl/ltdl.h"
++#if OPAL_WANT_LIBLTDL
++ #ifndef __WINDOWS__
++ #if OPAL_LIBLTDL_INTERNAL
++ #include "opal/libltdl/ltdl.h"
++ #else
++ #include "ltdl.h"
++ #endif
++ #else
++ #include "ltdl.h"
++ #endif
++#endif
+ #include "opal/mca/mca.h"
+
+ BEGIN_C_DECLS
diff --git a/sys-cluster/openmpi/files/openmpi-r24328.patch b/sys-cluster/openmpi/files/openmpi-r24328.patch
new file mode 100644
index 000000000000..bbd689d3ae0d
--- /dev/null
+++ b/sys-cluster/openmpi/files/openmpi-r24328.patch
@@ -0,0 +1,54 @@
+From cf054cd92dfac55f3920e805d01c11dcfc2cd4fa Mon Sep 17 00:00:00 2001
+From: jsquyres <jsquyres@cisco.com>
+Date: Mon, 28 Mar 2011 12:44:06 -0400
+Subject: [PATCH] Fix some fairly-important typos (!)
+
+Upstream commit r24328.
+---
+ test/datatype/ddt_lib.c | 2 +-
+ test/datatype/ddt_raw.c | 2 +-
+ test/datatype/opal_ddt_lib.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/test/datatype/ddt_lib.c b/test/datatype/ddt_lib.c
+index 015419d..c349384 100644
+--- a/test/datatype/ddt_lib.c
++++ b/test/datatype/ddt_lib.c
+@@ -209,7 +209,7 @@ int mpich_typeub2( void )
+
+ int mpich_typeub3( void )
+ {
+- int blocklen[2], err = 0, idisp[3];
++ int blocklen[3], err = 0, idisp[3];
+ size_t sz;
+ MPI_Aint disp[3], lb, ub, ex;
+ ompi_datatype_t *types[3], *dt1, *dt2, *dt3, *dt4, *dt5;
+diff --git a/test/datatype/ddt_raw.c b/test/datatype/ddt_raw.c
+index eea9004..7effe65 100644
+--- a/test/datatype/ddt_raw.c
++++ b/test/datatype/ddt_raw.c
+@@ -45,7 +45,7 @@ static int test_upper( unsigned int length )
+ {
+ ompi_datatype_t *pdt;
+ opal_convertor_t * pConv;
+- int rc;
++ int rc = OMPI_SUCCESS;
+ unsigned int i, iov_count, split_chunk, total_length;
+ size_t max_data;
+ struct iovec iov[5];
+diff --git a/test/datatype/opal_ddt_lib.c b/test/datatype/opal_ddt_lib.c
+index e05bb06..dffd86c 100644
+--- a/test/datatype/opal_ddt_lib.c
++++ b/test/datatype/opal_ddt_lib.c
+@@ -759,7 +759,7 @@ int mpich_typeub2( void )
+
+ int mpich_typeub3( void )
+ {
+- int blocklen[2], err = 0, idisp[3];
++ int blocklen[3], err = 0, idisp[3];
+ size_t sz;
+ OPAL_PTRDIFF_TYPE disp[3], lb, ub, ex;
+ opal_datatype_t *types[3], *dt1, *dt2, *dt3, *dt4, *dt5;
+--
+1.7.3.4
+
diff --git a/sys-cluster/openmpi/metadata.xml b/sys-cluster/openmpi/metadata.xml
new file mode 100644
index 000000000000..e0d91cd04f60
--- /dev/null
+++ b/sys-cluster/openmpi/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <maintainer>
+ <email>jsbronder@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name='cma'>Enable the CMA (Cross Memory Attach) MCA</flag>
+ <flag name='cuda'>Add GPU direct support</flag>
+ <flag name='heterogeneous'>Enable features required for heterogeneous
+ platform support</flag>
+ <flag name='romio'>Build the ROMIO MPI-IO component</flag>
+ <flag name='mpi-threads'>Enable MPI_THREAD_MULTIPLE</flag>
+ <flag name='numa'>Enable numactl to allow binding processes to CPUs</flag>
+ <flag name='vt'>Enable bundled VampirTrace support</flag>
+ <flag name="pbs">Add support for the Portable Batch System (PBS)</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-cluster/openmpi/openmpi-1.4.3.ebuild b/sys-cluster/openmpi/openmpi-1.4.3.ebuild
new file mode 100644
index 000000000000..81e08b71e8c3
--- /dev/null
+++ b/sys-cluster/openmpi/openmpi-1.4.3.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit eutils fortran-2 multilib flag-o-matic toolchain-funcs
+
+MY_P=${P/-mpi}
+
+DESCRIPTION="A high-performance message passing library (MPI)"
+HOMEPAGE="http://www.open-mpi.org"
+SRC_URI="http://www.open-mpi.org/software/ompi/v1.4/downloads/${MY_P}.tar.bz2"
+LICENSE="BSD"
+SLOT="0"
+RESTRICT="mpi-threads? ( test )"
+KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="+cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads pbs romio threads vt"
+RDEPEND="
+ pbs? ( sys-cluster/torque )
+ vt? (
+ !dev-libs/libotf
+ !app-text/lcdf-typetools
+ )
+ elibc_FreeBSD? ( dev-libs/libexecinfo )
+ !sys-cluster/mpich
+ !sys-cluster/mpich2
+ !sys-cluster/mpiexec"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ if use mpi-threads; then
+ echo
+ ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by"
+ ewarn "default and officially unsupported by upstream."
+ ewarn "You may stop now and set USE=-mpi-threads"
+ echo
+ fi
+
+ echo
+ elog "OpenMPI has an overwhelming count of configuration options."
+ elog "Don't forget the EXTRA_ECONF environment variable can let you"
+ elog "specify configure options if you find them necessary."
+ echo
+}
+
+src_prepare() {
+ # Necessary for scalibility, see
+ # http://www.open-mpi.org/community/lists/users/2008/09/6514.php
+ if use threads; then
+ echo 'oob_tcp_listen_mode = listen_thread' \
+ >> opal/etc/openmpi-mca-params.conf
+ fi
+}
+
+src_configure() {
+ local myconf=(
+ --sysconfdir="${EPREFIX}/etc/${PN}"
+ --enable-pretty-print-stacktrace
+ --enable-orterun-prefix-by-default
+ --without-slurm)
+
+ if use mpi-threads; then
+ myconf+=(--enable-mpi-threads
+ --enable-progress-threads)
+ fi
+
+ if use fortran; then
+ if [[ $(tc-getFC) =~ g77 ]]; then
+ myconf+=(--disable-mpi-f90)
+ elif [[ $(tc-getFC) =~ if ]]; then
+ # Enabled here as gfortran compile times are huge with this enabled.
+ myconf+=(--with-mpi-f90-size=medium)
+ fi
+ else
+ myconf+=(--disable-mpi-f90 --disable-mpi-f77)
+ fi
+
+ ! use vt && myconf+=(--enable-contrib-no-build=vt)
+
+ econf "${myconf[@]}" \
+ $(use_enable cxx mpi-cxx) \
+ $(use_enable romio io-romio) \
+ $(use_enable heterogeneous) \
+ $(use_with pbs tm) \
+ $(use_enable ipv6)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc README AUTHORS NEWS VERSION || die
+}
+
+src_test() {
+ # Doesn't work with the default src_test as the dry run (-n) fails.
+ emake -j1 check || die "emake check failed"
+}
diff --git a/sys-cluster/openmpi/openmpi-1.4.5.ebuild b/sys-cluster/openmpi/openmpi-1.4.5.ebuild
new file mode 100644
index 000000000000..4118adb8843d
--- /dev/null
+++ b/sys-cluster/openmpi/openmpi-1.4.5.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit eutils fortran-2 multilib flag-o-matic toolchain-funcs
+
+MY_P=${P/-mpi}
+
+DESCRIPTION="A high-performance message passing library (MPI)"
+HOMEPAGE="http://www.open-mpi.org"
+SRC_URI="http://www.open-mpi.org/software/ompi/v1.4/downloads/${MY_P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+RESTRICT="mpi-threads? ( test )"
+
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="+cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads pbs romio threads vt"
+RDEPEND="
+ pbs? ( sys-cluster/torque )
+ vt? (
+ !dev-libs/libotf
+ !app-text/lcdf-typetools
+ )
+ elibc_FreeBSD? ( dev-libs/libexecinfo )
+ !sys-cluster/mpich
+ !sys-cluster/mpich2
+ !sys-cluster/mpiexec"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ if use mpi-threads; then
+ echo
+ ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by"
+ ewarn "default and officially unsupported by upstream."
+ ewarn "You may stop now and set USE=-mpi-threads"
+ echo
+ fi
+
+ echo
+ elog "OpenMPI has an overwhelming count of configuration options."
+ elog "Don't forget the EXTRA_ECONF environment variable can let you"
+ elog "specify configure options if you find them necessary."
+ echo
+}
+
+src_prepare() {
+ # Necessary for scalibility, see
+ # http://www.open-mpi.org/community/lists/users/2008/09/6514.php
+ if use threads; then
+ echo 'oob_tcp_listen_mode = listen_thread' \
+ >> opal/etc/openmpi-mca-params.conf
+ fi
+}
+
+src_configure() {
+ local myconf=(
+ --sysconfdir="${EPREFIX}/etc/${PN}"
+ --enable-pretty-print-stacktrace
+ --enable-orterun-prefix-by-default
+ --without-slurm)
+
+ if use mpi-threads; then
+ myconf+=(--enable-mpi-threads
+ --enable-progress-threads)
+ fi
+
+ if use fortran; then
+ if [[ $(tc-getFC) =~ g77 ]]; then
+ myconf+=(--disable-mpi-f90)
+ elif [[ $(tc-getFC) =~ if ]]; then
+ # Enabled here as gfortran compile times are huge with this enabled.
+ myconf+=(--with-mpi-f90-size=medium)
+ fi
+ else
+ myconf+=(--disable-mpi-f90 --disable-mpi-f77)
+ fi
+
+ ! use vt && myconf+=(--enable-contrib-no-build=vt)
+
+ econf "${myconf[@]}" \
+ $(use_enable cxx mpi-cxx) \
+ $(use_enable romio io-romio) \
+ $(use_enable heterogeneous) \
+ $(use_with pbs tm) \
+ $(use_enable ipv6)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc README AUTHORS NEWS VERSION || die
+}
+
+src_test() {
+ # Doesn't work with the default src_test as the dry run (-n) fails.
+ emake -j1 check || die "emake check failed"
+}
diff --git a/sys-cluster/openmpi/openmpi-1.6.5-r1.ebuild b/sys-cluster/openmpi/openmpi-1.6.5-r1.ebuild
new file mode 100644
index 000000000000..6c8f5a3e16da
--- /dev/null
+++ b/sys-cluster/openmpi/openmpi-1.6.5-r1.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit autotools eutils fortran-2 multilib flag-o-matic toolchain-funcs versionator
+
+MY_P=${P/-mpi}
+S=${WORKDIR}/${MY_P}
+
+IUSE_OPENMPI_FABRICS="
+ openmpi_fabrics_dapl
+ openmpi_fabrics_ofed
+ openmpi_fabrics_knem
+ openmpi_fabrics_open-mx
+ openmpi_fabrics_psm
+ openmpi_fabrics_sctp"
+
+IUSE_OPENMPI_RM="
+ openmpi_rm_pbs
+ openmpi_rm_slurm"
+
+IUSE_OPENMPI_OFED_FEATURES="
+ openmpi_ofed_features_control-hdr-padding
+ openmpi_ofed_features_connectx-xrc
+ openmpi_ofed_features_rdmacm
+ openmpi_ofed_features_dynamic-sl
+ openmpi_ofed_features_failover
+ "
+
+DESCRIPTION="A high-performance message passing library (MPI)"
+HOMEPAGE="http://www.open-mpi.org"
+SRC_URI="http://www.open-mpi.org/software/ompi/v$(get_version_component_range 1-2)/downloads/${MY_P}.tar.bz2"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux"
+IUSE="+cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads romio threads vt
+ ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}"
+
+REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs )
+ openmpi_rm_pbs? ( !openmpi_rm_slurm )
+ openmpi_fabrics_psm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_connectx-xrc? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_failover? ( openmpi_fabrics_ofed )"
+
+RDEPEND="
+ !sys-cluster/mpich
+ !sys-cluster/mpich2
+ !sys-cluster/mpiexec
+ >=sys-apps/hwloc-1.3
+ dev-libs/libltdl:0
+ elibc_FreeBSD? ( dev-libs/libexecinfo )
+ openmpi_fabrics_dapl? ( sys-infiniband/dapl )
+ openmpi_fabrics_ofed? ( sys-infiniband/ofed )
+ openmpi_fabrics_knem? ( sys-cluster/knem )
+ openmpi_fabrics_open-mx? ( sys-cluster/open-mx )
+ openmpi_fabrics_psm? ( sys-infiniband/infinipath-psm )
+ openmpi_fabrics_sctp? ( net-misc/lksctp-tools )
+ openmpi_rm_pbs? ( sys-cluster/torque )
+ openmpi_rm_slurm? ( sys-cluster/slurm )
+ openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm )
+ vt? (
+ !dev-libs/libotf
+ !app-text/lcdf-typetools
+ )
+ "
+DEPEND="${RDEPEND}"
+# TODO: Newer releases of Vampir use otf2 which would resolve the above blockers.
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ if use mpi-threads; then
+ echo
+ ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by"
+ ewarn "default and officially unsupported by upstream."
+ ewarn "You may stop now and set USE=-mpi-threads"
+ echo
+ fi
+
+ echo
+ elog "OpenMPI has an overwhelming count of configuration options."
+ elog "Don't forget the EXTRA_ECONF environment variable can let you"
+ elog "specify configure options if you find them necessary."
+ echo
+
+}
+
+src_prepare() {
+ # Necessary for scalibility, see
+ # http://www.open-mpi.org/community/lists/users/2008/09/6514.php
+ if use threads; then
+ echo 'oob_tcp_listen_mode = listen_thread' \
+ >> opal/etc/openmpi-mca-params.conf
+ fi
+
+ # https://svn.open-mpi.org/trac/ompi/ticket/3649
+ # https://svn.open-mpi.org/trac/ompi/ticket/3648
+ epatch "${FILESDIR}"/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch
+
+ # https://github.com/open-mpi/ompi/issues/163
+ epatch "${FILESDIR}"/openmpi-ltdl.patch
+
+ AT_M4DIR="config opal/config orte/config ompi/config" eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --sysconfdir="${EPREFIX}/etc/${PN}"
+ --enable-pretty-print-stacktrace
+ --enable-orterun-prefix-by-default
+ --with-hwloc="${EPREFIX}/usr"
+ --with-libltdl=external
+ )
+
+ if use mpi-threads; then
+ myconf+=(
+ --enable-mpi-thread-multiple
+ --enable-opal-multi-threads
+ )
+ fi
+
+ if use fortran; then
+ if [[ $(tc-getFC) =~ g77 ]]; then
+ myconf+=(--disable-mpi-f90)
+ elif [[ $(tc-getFC) =~ if ]]; then
+ # Enabled here as gfortran compile times are huge with this enabled.
+ myconf+=(--with-mpi-f90-size=medium)
+ fi
+ else
+ myconf+=(--disable-mpi-f90 --disable-mpi-f77)
+ fi
+
+ ! use vt && myconf+=(--enable-contrib-no-build=vt)
+
+ econf "${myconf[@]}" \
+ $(use_enable cxx mpi-cxx) \
+ $(use_enable romio io-romio) \
+ $(use_enable heterogeneous) \
+ $(use_enable ipv6) \
+ $(use_with openmpi_fabrics_dapl udapl "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_ofed openib "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_open-mx mx "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \
+ $(use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \
+ $(use_enable openmpi_ofed_features_connectx-xrc openib-connectx-xrc) \
+ $(use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \
+ $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \
+ $(use_enable openmpi_ofed_features_failover btl-openib-failover) \
+ $(use_with openmpi_fabrics_sctp sctp) \
+ $(use_with openmpi_rm_pbs tm) \
+ $(use_with openmpi_rm_slurm slurm)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "make install failed"
+ # From USE=vt see #359917
+ rm "${ED}"/usr/share/libtool &> /dev/null
+ dodoc README AUTHORS NEWS VERSION || die
+}
+
+src_test() {
+ # Doesn't work with the default src_test as the dry run (-n) fails.
+ emake -j1 check || die "emake check failed"
+}
diff --git a/sys-cluster/openmpi/openmpi-1.7.5-r1.ebuild b/sys-cluster/openmpi/openmpi-1.7.5-r1.ebuild
new file mode 100644
index 000000000000..b2ca7fc6e308
--- /dev/null
+++ b/sys-cluster/openmpi/openmpi-1.7.5-r1.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit autotools cuda eutils flag-o-matic fortran-2 multilib toolchain-funcs versionator
+
+MY_P=${P/-mpi}
+S=${WORKDIR}/${MY_P}
+
+IUSE_OPENMPI_FABRICS="
+ openmpi_fabrics_ofed
+ openmpi_fabrics_knem
+ openmpi_fabrics_open-mx
+ openmpi_fabrics_psm"
+
+IUSE_OPENMPI_RM="
+ openmpi_rm_pbs
+ openmpi_rm_slurm"
+
+IUSE_OPENMPI_OFED_FEATURES="
+ openmpi_ofed_features_control-hdr-padding
+ openmpi_ofed_features_connectx-xrc
+ openmpi_ofed_features_rdmacm
+ openmpi_ofed_features_dynamic-sl
+ openmpi_ofed_features_failover"
+
+DESCRIPTION="A high-performance message passing library (MPI)"
+HOMEPAGE="http://www.open-mpi.org"
+SRC_URI="http://www.open-mpi.org/software/ompi/v$(get_version_component_range 1-2)/downloads/${MY_P}.tar.bz2"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux"
+IUSE="cma cuda +cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads romio threads vt
+ ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}"
+
+REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs )
+ openmpi_rm_pbs? ( !openmpi_rm_slurm )
+ openmpi_fabrics_psm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_connectx-xrc? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_failover? ( openmpi_fabrics_ofed )"
+
+MPI_UNCLASSED_DEP_STR="
+ vt? (
+ !dev-libs/libotf
+ !app-text/lcdf-typetools
+ )"
+
+RDEPEND="
+ !sys-cluster/mpich
+ !sys-cluster/mpich2
+ !sys-cluster/mpiexec
+ dev-libs/libevent
+ dev-libs/libltdl:0
+ >=sys-apps/hwloc-1.7.2
+ cuda? ( dev-util/nvidia-cuda-toolkit )
+ elibc_FreeBSD? ( dev-libs/libexecinfo )
+ openmpi_fabrics_ofed? ( sys-infiniband/ofed )
+ openmpi_fabrics_knem? ( sys-cluster/knem )
+ openmpi_fabrics_open-mx? ( sys-cluster/open-mx )
+ openmpi_fabrics_psm? ( sys-infiniband/infinipath-psm )
+ openmpi_rm_pbs? ( sys-cluster/torque )
+ openmpi_rm_slurm? ( sys-cluster/slurm )
+ openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm )
+ "
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+
+ if use mpi-threads; then
+ echo
+ ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by"
+ ewarn "default and officially unsupported by upstream."
+ ewarn "You may stop now and set USE=-mpi-threads"
+ echo
+ fi
+
+ echo
+ elog "OpenMPI has an overwhelming count of configuration options."
+ elog "Don't forget the EXTRA_ECONF environment variable can let you"
+ elog "specify configure options if you find them necessary."
+ echo
+}
+
+src_prepare() {
+ # Necessary for scalibility, see
+ # http://www.open-mpi.org/community/lists/users/2008/09/6514.php
+ if use threads; then
+ echo 'oob_tcp_listen_mode = listen_thread' \
+ >> opal/etc/openmpi-mca-params.conf
+ fi
+
+ # https://github.com/open-mpi/ompi/issues/163
+ epatch "${FILESDIR}"/openmpi-ltdl.patch
+
+ AT_M4DIR=config eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --sysconfdir="${EPREFIX}/etc/${PN}"
+ --enable-pretty-print-stacktrace
+ --enable-orterun-prefix-by-default
+ --with-hwloc="${EPREFIX}/usr"
+ --with-libltdl=external
+ )
+
+ if use mpi-threads; then
+ myconf+=(--enable-mpi-threads
+ --enable-opal-multi-threads)
+ fi
+
+ if use fortran; then
+ if [[ $(tc-getFC) =~ g77 ]]; then
+ myconf+=(--disable-mpi-f90)
+ elif [[ $(tc-getFC) =~ if ]]; then
+ # Enabled here as gfortran compile times are huge with this enabled.
+ myconf+=(--with-mpi-f90-size=medium)
+ fi
+ else
+ myconf+=(--disable-mpi-f90 --disable-mpi-f77)
+ fi
+
+ ! use vt && myconf+=(--enable-contrib-no-build=vt)
+
+ econf "${myconf[@]}" \
+ $(use_enable cxx mpi-cxx) \
+ $(use_with cma) \
+ $(use_with cuda cuda "$EPREFIX"/opt/cuda) \
+ $(use_enable romio io-romio) \
+ $(use_enable heterogeneous) \
+ $(use_enable ipv6) \
+ $(use_with openmpi_fabrics_ofed verbs "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_open-mx mx "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \
+ $(use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \
+ $(use_enable openmpi_ofed_features_connectx-xrc openib-connectx-xrc) \
+ $(use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \
+ $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \
+ $(use_enable openmpi_ofed_features_failover btl-openib-failover) \
+ $(use_with openmpi_rm_pbs tm) \
+ $(use_with openmpi_rm_slurm slurm)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+ # From USE=vt see #359917
+ rm "${ED}"/usr/share/libtool &> /dev/null
+ # Avoid collisions with libevent
+ rm -rf "${ED}"/usr/include/event2 &> /dev/null
+ dodoc README AUTHORS NEWS VERSION || die
+}
+
+src_test() {
+ # Doesn't work with the default src_test as the dry run (-n) fails.
+
+ # Do not override malloc during build. Works around #462602
+ emake -j1 check
+}
diff --git a/sys-cluster/openmpi/openmpi-1.8.4-r4.ebuild b/sys-cluster/openmpi/openmpi-1.8.4-r4.ebuild
new file mode 100644
index 000000000000..3efd01baf16b
--- /dev/null
+++ b/sys-cluster/openmpi/openmpi-1.8.4-r4.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit autotools cuda eutils flag-o-matic fortran-2 multilib toolchain-funcs versionator
+
+MY_P=${P/-mpi}
+S=${WORKDIR}/${MY_P}
+
+IUSE_OPENMPI_FABRICS="
+ openmpi_fabrics_ofed
+ openmpi_fabrics_knem
+ openmpi_fabrics_open-mx
+ openmpi_fabrics_psm"
+
+IUSE_OPENMPI_RM="
+ openmpi_rm_pbs
+ openmpi_rm_slurm"
+
+IUSE_OPENMPI_OFED_FEATURES="
+ openmpi_ofed_features_control-hdr-padding
+ openmpi_ofed_features_connectx-xrc
+ openmpi_ofed_features_udcm
+ openmpi_ofed_features_rdmacm
+ openmpi_ofed_features_dynamic-sl
+ openmpi_ofed_features_failover"
+
+DESCRIPTION="A high-performance message passing library (MPI)"
+HOMEPAGE="http://www.open-mpi.org"
+SRC_URI="http://www.open-mpi.org/software/ompi/v$(get_version_component_range 1-2)/downloads/${MY_P}.tar.bz2"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha ~amd64 ppc ~ppc64 sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux"
+IUSE="cma cuda +cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads numa romio threads vt
+ ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}"
+
+REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs )
+ openmpi_rm_pbs? ( !openmpi_rm_slurm )
+ openmpi_fabrics_psm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_connectx-xrc? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_udcm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_failover? ( openmpi_fabrics_ofed )"
+
+MPI_UNCLASSED_DEP_STR="
+ vt? (
+ !dev-libs/libotf
+ !app-text/lcdf-typetools
+ )"
+
+RDEPEND="
+ !sys-cluster/mpich
+ !sys-cluster/mpich2
+ !sys-cluster/mpiexec
+ dev-libs/libevent
+ dev-libs/libltdl:0
+ >=sys-apps/hwloc-1.9.1[numa?]
+ sys-libs/zlib
+ cuda? ( dev-util/nvidia-cuda-toolkit )
+ elibc_FreeBSD? ( dev-libs/libexecinfo )
+ openmpi_fabrics_ofed? ( sys-infiniband/ofed )
+ openmpi_fabrics_knem? ( sys-cluster/knem )
+ openmpi_fabrics_open-mx? ( sys-cluster/open-mx )
+ openmpi_fabrics_psm? ( sys-infiniband/infinipath-psm )
+ openmpi_rm_pbs? ( sys-cluster/torque )
+ openmpi_rm_slurm? ( sys-cluster/slurm )
+ openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm )
+ "
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+
+ if use mpi-threads; then
+ echo
+ ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by"
+ ewarn "default and officially unsupported by upstream."
+ ewarn "You may stop now and set USE=-mpi-threads"
+ echo
+ fi
+
+ echo
+ elog "OpenMPI has an overwhelming count of configuration options."
+ elog "Don't forget the EXTRA_ECONF environment variable can let you"
+ elog "specify configure options if you find them necessary."
+ echo
+}
+
+src_prepare() {
+ # Necessary for scalibility, see
+ # http://www.open-mpi.org/community/lists/users/2008/09/6514.php
+ if use threads; then
+ echo 'oob_tcp_listen_mode = listen_thread' \
+ >> opal/etc/openmpi-mca-params.conf
+ fi
+
+ # https://github.com/open-mpi/ompi/issues/163
+ epatch "${FILESDIR}"/openmpi-ltdl.patch
+
+ AT_M4DIR=config eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --sysconfdir="${EPREFIX}/etc/${PN}"
+ --enable-pretty-print-stacktrace
+ --enable-orterun-prefix-by-default
+ --with-hwloc="${EPREFIX}/usr"
+ --with-libltdl=external
+ )
+
+ if use mpi-threads; then
+ myconf+=(--enable-mpi-threads
+ --enable-opal-multi-threads)
+ fi
+
+ if use fortran; then
+ myconf+=(--enable-mpi-fortran=all)
+ else
+ myconf+=(--enable-mpi-fortran=no)
+ fi
+
+ ! use vt && myconf+=(--enable-contrib-no-build=vt)
+
+ econf "${myconf[@]}" \
+ $(use_enable cxx mpi-cxx) \
+ $(use_with cma) \
+ $(use_with cuda cuda "${EPREFIX}"/opt/cuda) \
+ $(use_enable romio io-romio) \
+ $(use_enable heterogeneous) \
+ $(use_enable ipv6) \
+ $(use_with openmpi_fabrics_ofed verbs "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_open-mx mx "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \
+ $(use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \
+ $(use_enable openmpi_ofed_features_connectx-xrc openib-connectx-xrc) \
+ $(use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \
+ $(use_enable openmpi_ofed_features_udcm openib-udcm) \
+ $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \
+ $(use_enable openmpi_ofed_features_failover btl-openib-failover) \
+ $(use_with openmpi_rm_pbs tm) \
+ $(use_with openmpi_rm_slurm slurm)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+
+ # From USE=vt see #359917
+ rm "${ED}"/usr/share/libtool &> /dev/null
+
+ # Avoid collisions with libevent
+ rm -rf "${ED}"/usr/include/event2 &> /dev/null
+
+ # Remove la files, no static libs are installed and we have pkg-config
+ find "${ED}"/usr/$(get_libdir)/ -type f -name '*.la' -delete
+
+ dodoc README AUTHORS NEWS VERSION || die
+}
+
+src_test() {
+ # Doesn't work with the default src_test as the dry run (-n) fails.
+ emake -j1 check
+}
diff --git a/sys-cluster/openmpi/openmpi-1.8.7-r1.ebuild b/sys-cluster/openmpi/openmpi-1.8.7-r1.ebuild
new file mode 100644
index 000000000000..f67c8134b024
--- /dev/null
+++ b/sys-cluster/openmpi/openmpi-1.8.7-r1.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit cuda eutils flag-o-matic fortran-2 java-pkg-opt-2 multilib toolchain-funcs versionator
+
+MY_P=${P/-mpi}
+S=${WORKDIR}/${MY_P}
+
+IUSE_OPENMPI_FABRICS="
+ openmpi_fabrics_ofed
+ openmpi_fabrics_knem
+ openmpi_fabrics_open-mx
+ openmpi_fabrics_psm"
+
+IUSE_OPENMPI_RM="
+ openmpi_rm_pbs
+ openmpi_rm_slurm"
+
+IUSE_OPENMPI_OFED_FEATURES="
+ openmpi_ofed_features_control-hdr-padding
+ openmpi_ofed_features_connectx-xrc
+ openmpi_ofed_features_udcm
+ openmpi_ofed_features_rdmacm
+ openmpi_ofed_features_dynamic-sl
+ openmpi_ofed_features_failover"
+
+DESCRIPTION="A high-performance message passing library (MPI)"
+HOMEPAGE="http://www.open-mpi.org"
+SRC_URI="http://www.open-mpi.org/software/ompi/v$(get_version_component_range 1-2)/downloads/${MY_P}.tar.bz2"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux"
+IUSE="cma cuda +cxx elibc_FreeBSD fortran heterogeneous ipv6 java mpi-threads numa romio threads vt
+ ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}"
+
+REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs )
+ openmpi_rm_pbs? ( !openmpi_rm_slurm )
+ openmpi_fabrics_psm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_connectx-xrc? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_udcm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_failover? ( openmpi_fabrics_ofed )"
+
+MPI_UNCLASSED_DEP_STR="
+ vt? (
+ !dev-libs/libotf
+ !app-text/lcdf-typetools
+ )"
+
+CDEPEND="
+ !sys-cluster/mpich
+ !sys-cluster/mpich2
+ !sys-cluster/mpiexec
+ dev-libs/libevent
+ dev-libs/libltdl:0
+ >=sys-apps/hwloc-1.9.1[numa?]
+ sys-libs/zlib
+ cuda? ( dev-util/nvidia-cuda-toolkit )
+ elibc_FreeBSD? ( dev-libs/libexecinfo )
+ openmpi_fabrics_ofed? ( sys-infiniband/ofed )
+ openmpi_fabrics_knem? ( sys-cluster/knem )
+ openmpi_fabrics_open-mx? ( sys-cluster/open-mx )
+ openmpi_fabrics_psm? ( sys-infiniband/infinipath-psm )
+ openmpi_rm_pbs? ( sys-cluster/torque )
+ openmpi_rm_slurm? ( sys-cluster/slurm )
+ openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm )"
+
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.6 )"
+
+DEPEND="${CDEPEND}
+ java? ( >=virtual/jdk-1.6 )"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ java-pkg-opt-2_pkg_setup
+
+ if use mpi-threads; then
+ echo
+ ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by"
+ ewarn "default and officially unsupported by upstream."
+ ewarn "You may stop now and set USE=-mpi-threads"
+ echo
+ fi
+
+ echo
+ elog "OpenMPI has an overwhelming count of configuration options."
+ elog "Don't forget the EXTRA_ECONF environment variable can let you"
+ elog "specify configure options if you find them necessary."
+ echo
+}
+
+src_prepare() {
+ # Necessary for scalibility, see
+ # http://www.open-mpi.org/community/lists/users/2008/09/6514.php
+ if use threads; then
+ echo 'oob_tcp_listen_mode = listen_thread' \
+ >> opal/etc/openmpi-mca-params.conf
+ fi
+}
+
+src_configure() {
+ local myconf=(
+ --sysconfdir="${EPREFIX}/etc/${PN}"
+ --enable-pretty-print-stacktrace
+ --enable-orterun-prefix-by-default
+ --with-hwloc="${EPREFIX}/usr"
+ --with-libltdl="${EPREFIX}/usr"
+ )
+
+ if use fortran; then
+ myconf+=(--enable-mpi-fortran=all)
+ else
+ myconf+=(--enable-mpi-fortran=no)
+ fi
+
+ if use java; then
+ # We must always build with the right -source and -target
+ # flags. Passing flags to javac isn't explicitly supported here
+ # but we can cheat by overriding the configure test for javac.
+ export ac_cv_path_JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
+ fi
+
+ ! use vt && myconf+=(--enable-contrib-no-build=vt)
+
+ econf "${myconf[@]}" \
+ $(use_enable cxx mpi-cxx) \
+ $(use_with cma) \
+ $(use_with cuda cuda "${EPREFIX}"/opt/cuda) \
+ $(use_enable romio io-romio) \
+ $(use_enable heterogeneous) \
+ $(use_enable ipv6) \
+ $(use_enable mpi-threads mpi-thread-multiple) \
+ $(use_with openmpi_fabrics_ofed verbs "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_open-mx mx "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \
+ $(use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \
+ $(use_enable openmpi_ofed_features_connectx-xrc openib-connectx-xrc) \
+ $(use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \
+ $(use_enable openmpi_ofed_features_udcm openib-udcm) \
+ $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \
+ $(use_enable openmpi_ofed_features_failover btl-openib-failover) \
+ $(use_with openmpi_rm_pbs tm) \
+ $(use_with openmpi_rm_slurm slurm) \
+ $(use_enable java) \
+ $(use_enable java mpi-java)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+
+ # From USE=vt see #359917
+ rm "${ED}"/usr/share/libtool &> /dev/null
+
+ # Avoid collisions with libevent
+ rm -rf "${ED}"/usr/include/event2 &> /dev/null
+
+ # Remove la files, no static libs are installed and we have pkg-config
+ find "${ED}"/usr/$(get_libdir)/ -type f -name '*.la' -delete
+
+ if use java; then
+ local mpi_jar="${ED}"/usr/$(get_libdir)/mpi.jar
+ java-pkg_dojar "${mpi_jar}"
+ # We don't want to install the jar file twice
+ # so let's clean after ourselves.
+ rm "${mpi_jar}" || die
+ fi
+
+ dodoc README AUTHORS NEWS VERSION || die
+}
+
+src_test() {
+ # Doesn't work with the default src_test as the dry run (-n) fails.
+ emake -j1 check
+}
diff --git a/sys-cluster/openmpi/openmpi-1.8.8.ebuild b/sys-cluster/openmpi/openmpi-1.8.8.ebuild
new file mode 100644
index 000000000000..741c82fa87af
--- /dev/null
+++ b/sys-cluster/openmpi/openmpi-1.8.8.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit cuda eutils flag-o-matic fortran-2 java-pkg-opt-2 multilib toolchain-funcs versionator
+
+MY_P=${P/-mpi}
+S=${WORKDIR}/${MY_P}
+
+IUSE_OPENMPI_FABRICS="
+ openmpi_fabrics_ofed
+ openmpi_fabrics_knem
+ openmpi_fabrics_open-mx
+ openmpi_fabrics_psm"
+
+IUSE_OPENMPI_RM="
+ openmpi_rm_pbs
+ openmpi_rm_slurm"
+
+IUSE_OPENMPI_OFED_FEATURES="
+ openmpi_ofed_features_control-hdr-padding
+ openmpi_ofed_features_connectx-xrc
+ openmpi_ofed_features_udcm
+ openmpi_ofed_features_rdmacm
+ openmpi_ofed_features_dynamic-sl
+ openmpi_ofed_features_failover"
+
+DESCRIPTION="A high-performance message passing library (MPI)"
+HOMEPAGE="http://www.open-mpi.org"
+SRC_URI="http://www.open-mpi.org/software/ompi/v$(get_version_component_range 1-2)/downloads/${MY_P}.tar.bz2"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux"
+IUSE="cma cuda +cxx elibc_FreeBSD fortran heterogeneous ipv6 java mpi-threads numa romio threads vt
+ ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}"
+
+REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs )
+ openmpi_rm_pbs? ( !openmpi_rm_slurm )
+ openmpi_fabrics_psm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_connectx-xrc? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_udcm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed )
+ openmpi_ofed_features_failover? ( openmpi_fabrics_ofed )"
+
+MPI_UNCLASSED_DEP_STR="
+ vt? (
+ !dev-libs/libotf
+ !app-text/lcdf-typetools
+ )"
+
+CDEPEND="
+ !sys-cluster/mpich
+ !sys-cluster/mpich2
+ !sys-cluster/mpiexec
+ dev-libs/libevent
+ dev-libs/libltdl:0
+ >=sys-apps/hwloc-1.9.1[numa?]
+ sys-libs/zlib
+ cuda? ( dev-util/nvidia-cuda-toolkit )
+ elibc_FreeBSD? ( dev-libs/libexecinfo )
+ openmpi_fabrics_ofed? ( sys-infiniband/ofed:* )
+ openmpi_fabrics_knem? ( sys-cluster/knem )
+ openmpi_fabrics_open-mx? ( sys-cluster/open-mx )
+ openmpi_fabrics_psm? ( sys-infiniband/infinipath-psm:* )
+ openmpi_rm_pbs? ( sys-cluster/torque )
+ openmpi_rm_slurm? ( sys-cluster/slurm )
+ openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm:* )"
+
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.6 )"
+
+DEPEND="${CDEPEND}
+ java? ( >=virtual/jdk-1.6 )"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ java-pkg-opt-2_pkg_setup
+
+ if use mpi-threads; then
+ echo
+ ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by"
+ ewarn "default and officially unsupported by upstream."
+ ewarn "You may stop now and set USE=-mpi-threads"
+ echo
+ fi
+
+ echo
+ elog "OpenMPI has an overwhelming count of configuration options."
+ elog "Don't forget the EXTRA_ECONF environment variable can let you"
+ elog "specify configure options if you find them necessary."
+ echo
+}
+
+src_prepare() {
+ # Necessary for scalibility, see
+ # http://www.open-mpi.org/community/lists/users/2008/09/6514.php
+ if use threads; then
+ echo 'oob_tcp_listen_mode = listen_thread' \
+ >> opal/etc/openmpi-mca-params.conf
+ fi
+}
+
+src_configure() {
+ local myconf=(
+ --sysconfdir="${EPREFIX}/etc/${PN}"
+ --enable-pretty-print-stacktrace
+ --enable-orterun-prefix-by-default
+ --with-hwloc="${EPREFIX}/usr"
+ --with-libltdl="${EPREFIX}/usr"
+ )
+
+ if use fortran; then
+ myconf+=(--enable-mpi-fortran=all)
+ else
+ myconf+=(--enable-mpi-fortran=no)
+ fi
+
+ if use java; then
+ # We must always build with the right -source and -target
+ # flags. Passing flags to javac isn't explicitly supported here
+ # but we can cheat by overriding the configure test for javac.
+ export ac_cv_path_JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
+ fi
+
+ ! use vt && myconf+=(--enable-contrib-no-build=vt)
+
+ econf "${myconf[@]}" \
+ $(use_enable cxx mpi-cxx) \
+ $(use_with cma) \
+ $(use_with cuda cuda "${EPREFIX}"/opt/cuda) \
+ $(use_enable romio io-romio) \
+ $(use_enable heterogeneous) \
+ $(use_enable ipv6) \
+ $(use_enable mpi-threads mpi-thread-multiple) \
+ $(use_with openmpi_fabrics_ofed verbs "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_open-mx mx "${EPREFIX}"/usr) \
+ $(use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \
+ $(use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \
+ $(use_enable openmpi_ofed_features_connectx-xrc openib-connectx-xrc) \
+ $(use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \
+ $(use_enable openmpi_ofed_features_udcm openib-udcm) \
+ $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \
+ $(use_enable openmpi_ofed_features_failover btl-openib-failover) \
+ $(use_with openmpi_rm_pbs tm) \
+ $(use_with openmpi_rm_slurm slurm) \
+ $(use_enable java) \
+ $(use_enable java mpi-java)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+
+ # From USE=vt see #359917
+ rm "${ED}"/usr/share/libtool &> /dev/null
+
+ # Avoid collisions with libevent
+ rm -rf "${ED}"/usr/include/event2 &> /dev/null
+
+ # Remove la files, no static libs are installed and we have pkg-config
+ find "${ED}"/usr/$(get_libdir)/ -type f -name '*.la' -delete
+
+ if use java; then
+ local mpi_jar="${ED}"/usr/$(get_libdir)/mpi.jar
+ java-pkg_dojar "${mpi_jar}"
+ # We don't want to install the jar file twice
+ # so let's clean after ourselves.
+ rm "${mpi_jar}" || die
+ fi
+
+ dodoc README AUTHORS NEWS VERSION || die
+}
+
+src_test() {
+ # Doesn't work with the default src_test as the dry run (-n) fails.
+ emake -j1 check
+}