Merge outputs of MPI in a single directory

Some MPI implementations now have their headers in the dev output as
well as the mpicc wrappers.

Reviewed-by: Aleix Boné <abonerib@bsc.es>
This commit is contained in:
Rodrigo Arias 2025-01-17 11:23:09 +01:00
parent 505f101e00
commit 501f11a8e5
3 changed files with 26 additions and 6 deletions

View File

@ -17,6 +17,10 @@ let
name ="rdma-core-all"; name ="rdma-core-all";
paths = [ rdma-core.dev rdma-core.out ]; paths = [ rdma-core.dev rdma-core.out ];
}; };
mpiAll = symlinkJoin {
name = "mpi-all";
paths = [ mpi.all ];
};
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -37,13 +41,13 @@ stdenv.mkDerivation rec {
configureFlags = [ configureFlags = [
"--with-infiniband=${rdma-core-all}" "--with-infiniband=${rdma-core-all}"
"--with-mpi=${mpi}" "--with-mpi=${mpiAll}"
"--with-slurm" "--with-slurm"
"CFLAGS=-fPIC" "CFLAGS=-fPIC"
"CXXFLAGS=-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" ]; hardeningDisable = [ "all" ];
} }

View File

@ -3,8 +3,16 @@
, fetchurl , fetchurl
, mpi , mpi
, lib , lib
, symlinkJoin
}: }:
let
mpiAll = symlinkJoin {
name = "mpi-all";
paths = [ mpi.all ];
};
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "7.1-1"; version = "7.1-1";
name = "osu-micro-benchmarks-${version}"; name = "osu-micro-benchmarks-${version}";
@ -16,11 +24,11 @@ stdenv.mkDerivation rec {
doCheck = true; doCheck = true;
enableParallelBuilding = true; enableParallelBuilding = true;
buildInputs = [ mpi ]; buildInputs = [ mpiAll ];
hardeningDisable = [ "all" ]; hardeningDisable = [ "all" ];
configureFlags = [ configureFlags = [
"CC=${mpi}/bin/mpicc" "CC=mpicc"
"CXX=${mpi}/bin/mpicxx" "CXX=mpicxx"
]; ];
postInstall = '' postInstall = ''

View File

@ -11,8 +11,16 @@
, numactl , numactl
, rdma-core , rdma-core
, gfortran , gfortran
, symlinkJoin
}: }:
let
mpiAll = symlinkJoin {
name = "mpi-all";
paths = [ mpi.all ];
};
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "tagaspi"; pname = "tagaspi";
enableParallelBuilding = true; enableParallelBuilding = true;
@ -32,10 +40,10 @@ stdenv.mkDerivation rec {
autoconf autoconf
libtool libtool
boost boost
mpi
numactl numactl
rdma-core rdma-core
gfortran gfortran
mpiAll
]; ];
dontDisableStatic = true; dontDisableStatic = true;