Merge pull request #259736 from markuskowa/split-mpi

MPI related packages: use multiple outputs
This commit is contained in:
markuskowa 2023-10-12 09:46:32 +02:00 committed by GitHub
commit 32d507e98b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 6 deletions

View File

@ -23,6 +23,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-7VOhdZOPBe1qh8OK8OTNKA5I4A5whl6aOubAzsUDSRw=";
};
outputs = [ "out" "dev" "man" ];
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = lib.optionals enableOpx [ libuuid numactl ] ++ lib.optionals enablePsm2 [ libpsm2 ];

View File

@ -18,6 +18,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-NJLpitq2K1l+8NKS+yRZthI7yABwqKoKML5pYgdaEvA=";
};
outputs = [ "out" "doc" "man" ];
configureFlags = [
"--enable-shared"
"--enable-sharedlib"

View File

@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-w5pEkvS+UN9hAHhXSLoolOI85FCpQSgYHVFtpXV3Ua4=";
};
outputs = [ "out" "doc" "man" ];
nativeBuildInputs = [ pkg-config bison makeWrapper gfortran ];
propagatedBuildInputs = [ numactl rdma-core zlib opensm ];
buildInputs = with lib; [

View File

@ -43,6 +43,8 @@ in stdenv.mkDerivation rec {
find -name "Makefile.in" -exec sed -i "s/\`date\`/$ts/" \{} \;
'';
outputs = [ "out" "man" ];
buildInputs = [ zlib ]
++ lib.optionals stdenv.isLinux [ libnl numactl pmix ucx ]
++ lib.optionals cudaSupport [ cudatoolkit ]
@ -56,8 +58,8 @@ in stdenv.mkDerivation rec {
configureFlags = lib.optional (!cudaSupport) "--disable-mca-dso"
++ lib.optional (!fortranSupport) "--disable-mpi-fortran"
++ lib.optionals stdenv.isLinux [
"--with-libnl=${libnl.dev}"
"--with-pmix=${pmix}"
"--with-libnl=${lib.getDev libnl}"
"--with-pmix=${lib.getDev pmix}"
"--with-pmix-libdir=${pmix}/lib"
"--enable-mpi-cxx"
] ++ lib.optional enableSGE "--with-sge"
@ -66,13 +68,13 @@ in stdenv.mkDerivation rec {
# https://github.com/openucx/ucx
# https://www.open-mpi.org/faq/?category=buildcuda
++ lib.optionals cudaSupport [ "--with-cuda=${cudatoolkit_joined}" "--enable-dlopen" ]
++ lib.optionals fabricSupport [ "--with-psm2=${libpsm2}" "--with-libfabric=${libfabric}" ]
++ lib.optionals fabricSupport [ "--with-psm2=${lib.getDev libpsm2}" "--with-libfabric=${lib.getDev libfabric}" ]
;
enableParallelBuilding = true;
postInstall = ''
rm -f $out/lib/*.la
find $out/lib/ -name "*.la" -exec rm -f \{} \;
'';
postFixup = ''

View File

@ -23,15 +23,19 @@ stdenv.mkDerivation rec {
buildInputs = [ libevent hwloc munge zlib ];
configureFlags = [
"--with-libevent=${libevent.dev}"
"--with-libevent=${lib.getDev libevent}"
"--with-munge=${munge}"
"--with-hwloc=${hwloc.dev}"
"--with-hwloc=${lib.getDev hwloc}"
];
preConfigure = ''
./autogen.pl
'';
postInstall = ''
find $out/lib/ -name "*.la" -exec rm -f \{} \;
'';
enableParallelBuilding = true;
meta = with lib; {

View File

@ -18,6 +18,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-7Mo9zU0sogGyDdWIfTgUPoR5Z8D722asC2y7sHnKbzs=";
};
outputs = [ "out" "dev" ];
enableParallelBuilding = true;
postPatch = ''
@ -42,6 +44,12 @@ stdenv.mkDerivation rec {
++ lib.optional enableAvx "--with-avx"
++ lib.optional enableCuda "--with-cuda=${cudatoolkit}";
postInstall = ''
find $out/lib/ -name "*.la" -exec rm -f \{} \;
moveToOutput bin/ucc_info $dev
'';
meta = with lib; {
description = "Collective communication operations API";
license = licenses.bsd3;

View File

@ -33,6 +33,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-VxIxrk9qKM6Ncfczl4p2EhXiLNgPaYTmjhqi6/w2ZNY=";
};
outputs = [ "out" "doc" "dev" ];
nativeBuildInputs = [ autoreconfHook doxygen pkg-config ];
buildInputs = [
@ -54,6 +56,14 @@ stdenv.mkDerivation rec {
] ++ lib.optional enableCuda "--with-cuda=${cudatoolkit'}"
++ lib.optional enableRocm "--with-rocm=${rocm}";
postInstall = ''
find $out/lib/ -name "*.la" -exec rm -f \{} \;
moveToOutput bin/ucx_info $dev
moveToOutput share/ucx/examples $doc
'';
enableParallelBuilding = true;
meta = with lib; {