From 501f11a8e50175ad3e496e3c563ff079e0afa9ac Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 17 Jan 2025 11:23:09 +0100 Subject: [PATCH] Merge outputs of MPI in a single directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some MPI implementations now have their headers in the dev output as well as the mpicc wrappers. Reviewed-by: Aleix Boné --- pkgs/gpi-2/default.nix | 8 ++++++-- pkgs/osu/default.nix | 14 +++++++++++--- pkgs/tagaspi/default.nix | 10 +++++++++- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/pkgs/gpi-2/default.nix b/pkgs/gpi-2/default.nix index f6f682e..a17b15c 100644 --- a/pkgs/gpi-2/default.nix +++ b/pkgs/gpi-2/default.nix @@ -17,6 +17,10 @@ let name ="rdma-core-all"; paths = [ rdma-core.dev rdma-core.out ]; }; + mpiAll = symlinkJoin { + name = "mpi-all"; + paths = [ mpi.all ]; + }; in stdenv.mkDerivation rec { @@ -37,13 +41,13 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-infiniband=${rdma-core-all}" - "--with-mpi=${mpi}" + "--with-mpi=${mpiAll}" "--with-slurm" "CFLAGS=-fPIC" "CXXFLAGS=-fPIC" ]; - buildInputs = [ slurm mpi rdma-core-all autoconf automake libtool rsync gfortran ]; + buildInputs = [ slurm mpiAll rdma-core-all autoconf automake libtool rsync gfortran ]; hardeningDisable = [ "all" ]; } diff --git a/pkgs/osu/default.nix b/pkgs/osu/default.nix index 1bb3f0c..e719b03 100644 --- a/pkgs/osu/default.nix +++ b/pkgs/osu/default.nix @@ -3,8 +3,16 @@ , fetchurl , mpi , lib +, symlinkJoin }: +let + mpiAll = symlinkJoin { + name = "mpi-all"; + paths = [ mpi.all ]; + }; +in + stdenv.mkDerivation rec { version = "7.1-1"; name = "osu-micro-benchmarks-${version}"; @@ -16,11 +24,11 @@ stdenv.mkDerivation rec { doCheck = true; enableParallelBuilding = true; - buildInputs = [ mpi ]; + buildInputs = [ mpiAll ]; hardeningDisable = [ "all" ]; configureFlags = [ - "CC=${mpi}/bin/mpicc" - "CXX=${mpi}/bin/mpicxx" + "CC=mpicc" + "CXX=mpicxx" ]; postInstall = '' diff --git a/pkgs/tagaspi/default.nix b/pkgs/tagaspi/default.nix index d9c7557..0b448f4 100644 --- a/pkgs/tagaspi/default.nix +++ b/pkgs/tagaspi/default.nix @@ -11,8 +11,16 @@ , numactl , rdma-core , gfortran +, symlinkJoin }: +let + mpiAll = symlinkJoin { + name = "mpi-all"; + paths = [ mpi.all ]; + }; +in + stdenv.mkDerivation rec { pname = "tagaspi"; enableParallelBuilding = true; @@ -32,10 +40,10 @@ stdenv.mkDerivation rec { autoconf libtool boost - mpi numactl rdma-core gfortran + mpiAll ]; dontDisableStatic = true;