Merge pull request #34065 from markuskowa/openmpi3-pr

openmpi: 1.10.7->3.0.0, add markuskowa as maintainer
This commit is contained in:
Frederik Rietdijk 2018-02-11 07:27:17 +00:00 committed by GitHub
commit 35ab6369c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 24 deletions

View file

@ -1,4 +1,4 @@
{stdenv, fetchurl, gfortran, perl, rdma-core
{ stdenv, fetchurl, gfortran, perl, libnl, rdma-core, zlib
# Enable the Sun Grid Engine bindings
, enableSGE ? false
@ -7,44 +7,48 @@
, enablePrefix ? false
}:
with stdenv.lib;
let
majorVersion = "1.10";
majorVersion = "3.0";
minorVersion = "0";
in stdenv.mkDerivation rec {
name = "openmpi-${majorVersion}.7";
name = "openmpi-${majorVersion}.${minorVersion}";
src = fetchurl {
url = "http://www.open-mpi.org/software/ompi/v${majorVersion}/downloads/${name}.tar.bz2";
sha256 = "142s1vny9gllkq336yafxayjgcirj2jv0ddabj879jgya7hyr2d0";
sha256 = "1mw2d94k6mp4scg1wnkj50vdh734fy5m2ygyrj65s4mh3prbz6gn";
};
buildInputs = [ gfortran ]
++ optional (stdenv.isLinux || stdenv.isFreeBSD) rdma-core;
postPatch = ''
patchShebangs ./
'';
buildInputs = with stdenv; [ gfortran zlib ]
++ lib.optional isLinux libnl
++ lib.optional (isLinux || isFreeBSD) rdma-core;
nativeBuildInputs = [ perl ];
configureFlags = []
++ optional enableSGE "--with-sge"
++ optional enablePrefix "--enable-mpirun-prefix-by-default"
configureFlags = with stdenv; []
++ lib.optional isLinux "--with-libnl=${libnl.dev}"
++ lib.optional enableSGE "--with-sge"
++ lib.optional enablePrefix "--enable-mpirun-prefix-by-default"
;
enableParallelBuilding = true;
preBuild = ''
patchShebangs ompi/mpi/fortran/base/gen-mpi-sizeof.pl
'';
postInstall = ''
rm -f $out/lib/*.la
rm -f $out/lib/*.la
'';
meta = {
doCheck = true;
meta = with stdenv.lib; {
homepage = http://www.open-mpi.org/;
description = "Open source MPI-2 implementation";
longDescription = "The Open MPI Project is an open source MPI-2 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.";
maintainers = [ ];
description = "Open source MPI-3 implementation";
longDescription = "The Open MPI Project is an open source MPI-3 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.";
maintainers = with maintainers; [ markuskowa ];
license = licenses.bsd3;
platforms = platforms.unix;
};
}

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, python, buildPythonPackage
, numpy, hdf5, cython, six, pkgconfig
, mpi4py ? null }:
, mpi4py ? null, openssh }:
assert hdf5.mpiSupport -> mpi4py != null && hdf5.mpi == mpi4py.mpi;
@ -24,6 +24,10 @@ in buildPythonPackage rec {
postConfigure = ''
${python.executable} setup.py configure ${configure_flags}
# Needed to run the tests reliably. See:
# https://bitbucket.org/mpi4py/mpi4py/issues/87/multiple-test-errors-with-openmpi-30
${optionalString mpiSupport "export OMPI_MCA_rmaps_base_oversubscribe=yes"}
'';
preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else "";
@ -33,7 +37,7 @@ in buildPythonPackage rec {
++ optional mpiSupport mpi
;
propagatedBuildInputs = [ numpy six]
++ optional mpiSupport mpi4py
++ optionals mpiSupport [ mpi4py openssh ]
;
meta = {

View file

@ -1,4 +1,4 @@
{ stdenv, fetchPypi, python, buildPythonPackage, mpi }:
{ stdenv, fetchPypi, python, buildPythonPackage, mpi, openssh }:
buildPythonPackage rec {
pname = "mpi4py";
@ -14,6 +14,12 @@ buildPythonPackage rec {
inherit mpi;
};
postPatch = ''
substituteInPlace test/test_spawn.py --replace \
"unittest.skipMPI('openmpi(<3.0.0)')" \
"unittest.skipMPI('openmpi')"
'';
configurePhase = "";
installPhase = ''
@ -28,11 +34,15 @@ buildPythonPackage rec {
# sometimes packages specify where files should be installed outside the usual
# python lib prefix, we override that back so all infrastructure (setup hooks)
# work as expected
# Needed to run the tests reliably. See:
# https://bitbucket.org/mpi4py/mpi4py/issues/87/multiple-test-errors-with-openmpi-30
export OMPI_MCA_rmaps_base_oversubscribe=yes
'';
setupPyBuildFlags = ["--mpicc=${mpi}/bin/mpicc"];
buildInputs = [ mpi ];
buildInputs = [ mpi openssh ];
meta = {
description =