jungle/pkgs/gpi-2/default.nix
Rodrigo Arias Mallo 00dfe801f4 Fix GPI-2 and enable TAGASPI
The rdma-core driver.h include is no longer installed:

 56dd87acd2

So ibv_read_sysfs_file() is not defined. As the symbols is still
distributed, we simply add the missing prototype manually.

Similarly, the gaspi_get_system_mem() function is not available from the
gaspi public headers, so we define it in the max_mem.c test.

Fixes: rarias/bscpkgs#7
Reviewed-by: Aleix Boné <abonerib@bsc.es>
Tested-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2025-09-12 14:21:00 +02:00

56 lines
1.0 KiB
Nix

{
stdenv
, fetchurl
, symlinkJoin
, slurm
, rdma-core
, autoconf
, automake
, libtool
, mpi
, rsync
, gfortran
}:
let
rdma-core-all = symlinkJoin {
name ="rdma-core-all";
paths = [ rdma-core.dev rdma-core.out ];
};
mpiAll = symlinkJoin {
name = "mpi-all";
paths = [ mpi.all ];
};
in
stdenv.mkDerivation rec {
pname = "GPI-2";
version = "tagaspi-2021.11";
src = fetchurl {
url = "https://pm.bsc.es/gitlab/interoperability/extern/GPI-2/-/archive/${version}/GPI-2-${version}.tar.gz";
hash = "sha256-eY2wpyTpnOXRoAcYoAP82Jq9Q7p5WwDpMj+f1vEX5zw=";
};
enableParallelBuilding = true;
patches = [ ./rdma-core.patch ./max-mem.patch ];
preConfigure = ''
patchShebangs autogen.sh
./autogen.sh
'';
configureFlags = [
"--with-infiniband=${rdma-core-all}"
"--with-mpi=${mpiAll}"
"--with-slurm"
"CFLAGS=-fPIC"
"CXXFLAGS=-fPIC"
];
buildInputs = [ slurm mpiAll rdma-core-all autoconf automake libtool rsync gfortran ];
hardeningDisable = [ "all" ];
}