Move MPICH to pkgs/mpich and set as default
Reviewed-by: Aleix Boné <abonerib@bsc.es>
This commit is contained in:
parent
01986c376b
commit
ae6b0ae161
@ -20,6 +20,8 @@ let
|
|||||||
jemallocNanos6 = callPackage ./pkgs/nanos6/jemalloc.nix { };
|
jemallocNanos6 = callPackage ./pkgs/nanos6/jemalloc.nix { };
|
||||||
lmbench = callPackage ./pkgs/lmbench/default.nix { };
|
lmbench = callPackage ./pkgs/lmbench/default.nix { };
|
||||||
mcxx = callPackage ./pkgs/mcxx/default.nix { };
|
mcxx = callPackage ./pkgs/mcxx/default.nix { };
|
||||||
|
mpi = final.mpich; # Set MPICH as default
|
||||||
|
mpich = callPackage ./pkgs/mpich/default.nix { mpich = prev.mpich; };
|
||||||
nanos6 = callPackage ./pkgs/nanos6/default.nix { };
|
nanos6 = callPackage ./pkgs/nanos6/default.nix { };
|
||||||
nanos6Debug = final.nanos6.override { enableDebug = true; };
|
nanos6Debug = final.nanos6.override { enableDebug = true; };
|
||||||
nixtools = callPackage ./pkgs/nixtools/default.nix { };
|
nixtools = callPackage ./pkgs/nixtools/default.nix { };
|
||||||
|
@ -1,68 +1,36 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv
|
||||||
, lib
|
, lib
|
||||||
, fetchurl
|
|
||||||
, perl
|
|
||||||
, gfortran
|
|
||||||
, openssh
|
|
||||||
, hwloc
|
|
||||||
, libfabric
|
, libfabric
|
||||||
, enableDebug ? false
|
, mpich
|
||||||
|
, pmix
|
||||||
|
, gfortran
|
||||||
|
, symlinkJoin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
|
# pmix comes with the libraries in .out and headers in .dev
|
||||||
stdenv.mkDerivation rec {
|
pmixAll = symlinkJoin {
|
||||||
pname = "mpich";
|
name = "pmix-all";
|
||||||
version = "3.3.2";
|
paths = [ pmix.dev pmix.out ];
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://www.mpich.org/static/downloads/${version}/mpich-${version}.tar.gz";
|
|
||||||
sha256 = "1farz5zfx4cd0c3a0wb9pgfypzw0xxql1j1294z1sxslga1ziyjb";
|
|
||||||
};
|
};
|
||||||
|
in mpich.overrideAttrs (old: {
|
||||||
|
buildInput = old.buildInputs ++ [
|
||||||
|
libfabric
|
||||||
|
pmixAll
|
||||||
|
];
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-shared"
|
"--enable-shared"
|
||||||
"--enable-sharedlib"
|
"--enable-sharedlib"
|
||||||
|
"--with-pm=no"
|
||||||
"--with-device=ch4:ofi"
|
"--with-device=ch4:ofi"
|
||||||
|
"--with-pmi=pmix"
|
||||||
|
"--with-pmix=${pmixAll}"
|
||||||
"--with-libfabric=${libfabric}"
|
"--with-libfabric=${libfabric}"
|
||||||
]
|
"--enable-g=log"
|
||||||
++ optional enableDebug "--enable-g=dbg,log";
|
] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [
|
||||||
|
"FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
|
||||||
enableParallelBuilding = true;
|
"FCFLAGS=-fallow-argument-mismatch"
|
||||||
|
];
|
||||||
buildInputs = [ perl gfortran openssh hwloc libfabric ];
|
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
|
})
|
||||||
# doCheck = true; # Fails
|
|
||||||
|
|
||||||
preFixup = ''
|
|
||||||
# Ensure the default compilers are the ones mpich was built with
|
|
||||||
sed -i 's:CC="gcc":CC=${stdenv.cc}/bin/gcc:' $out/bin/mpicc
|
|
||||||
sed -i 's:CXX="g++":CXX=${stdenv.cc}/bin/g++:' $out/bin/mpicxx
|
|
||||||
sed -i 's:FC="gfortran":FC=${gfortran}/bin/gfortran:' $out/bin/mpifort
|
|
||||||
''
|
|
||||||
+ lib.optionalString (!stdenv.isDarwin) ''
|
|
||||||
# /tmp/nix-build... ends up in the RPATH, fix it manually
|
|
||||||
for entry in $out/bin/mpichversion $out/bin/mpivars; do
|
|
||||||
echo "fix rpath: $entry"
|
|
||||||
patchelf --set-rpath "$out/lib" $entry
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Implementation of the Message Passing Interface (MPI) standard";
|
|
||||||
|
|
||||||
longDescription = ''
|
|
||||||
MPICH is a high-performance and widely portable implementation of
|
|
||||||
the Message Passing Interface (MPI) standard (MPI-1, MPI-2 and MPI-3).
|
|
||||||
'';
|
|
||||||
homepage = "http://www.mpich.org";
|
|
||||||
license = {
|
|
||||||
url = "https://github.com/pmodels/mpich/blob/v${version}/COPYRIGHT";
|
|
||||||
fullName = "MPICH license (permissive)";
|
|
||||||
};
|
|
||||||
maintainers = [ ];
|
|
||||||
platforms = platforms.linux ++ platforms.darwin;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
@ -1,35 +1,5 @@
|
|||||||
final: prev:
|
final: prev:
|
||||||
{
|
{
|
||||||
# Set MPICH as default
|
|
||||||
mpi = final.mpich;
|
|
||||||
|
|
||||||
# Configure the network for MPICH
|
|
||||||
mpich = with final; let
|
|
||||||
# pmix comes with the libraries in .out and headers in .dev
|
|
||||||
pmixAll = symlinkJoin {
|
|
||||||
name = "pmix-all";
|
|
||||||
paths = [ pmix.dev pmix.out ];
|
|
||||||
};
|
|
||||||
in prev.mpich.overrideAttrs (old: {
|
|
||||||
buildInput = old.buildInputs ++ [
|
|
||||||
libfabric
|
|
||||||
pmixAll
|
|
||||||
];
|
|
||||||
configureFlags = [
|
|
||||||
"--enable-shared"
|
|
||||||
"--enable-sharedlib"
|
|
||||||
"--with-pm=no"
|
|
||||||
"--with-device=ch4:ofi"
|
|
||||||
"--with-pmi=pmix"
|
|
||||||
"--with-pmix=${pmixAll}"
|
|
||||||
"--with-libfabric=${libfabric}"
|
|
||||||
"--enable-g=log"
|
|
||||||
] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [
|
|
||||||
"FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
|
|
||||||
"FCFLAGS=-fallow-argument-mismatch"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
slurm = prev.slurm.overrideAttrs (old: {
|
slurm = prev.slurm.overrideAttrs (old: {
|
||||||
patches = (old.patches or []) ++ [
|
patches = (old.patches or []) ++ [
|
||||||
# See https://bugs.schedmd.com/show_bug.cgi?id=19324
|
# See https://bugs.schedmd.com/show_bug.cgi?id=19324
|
||||||
|
Loading…
x
Reference in New Issue
Block a user