Compare commits

...

4 Commits

Author SHA1 Message Date
b7e43d5b08
Make lib imports in overlay explicit 2025-09-12 14:46:57 +02:00
751d9e7373
Set strictDeps=true on our top level packages 2025-09-12 14:46:56 +02:00
c7b5ec13b8 Provide nixpkgs.lib in bscpkgs outputs
Currently, we can use bscpkgs similarly to nixpkgs either through
the flake outputs or with import bscpkgs:

```nix
# currently supported:
bscpkgs.legacyPackages.x86_64-linux.hello
let pkgs = import bscpkgs { system = "x86_64-linux"; }; in pkgs.hello
```
The missing piece is nixpkgs.lib (not pkgs.lib, the system agnostic
one). The workaround is to do bscpkgs.inputs.nixpkgs.lib instead. We can
simplify this by forwarding the lib to our outputs.

This enables us to use bscpkgs as a drop-in
replacing the inputs to our flake from nixpkgs to bscpkgs.
(inputs.nixpkgs.url = "<*BSC*pkgs url>").


Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
Tested-by: Aleix Boné <abonerib@bsc.es>
2025-09-12 14:28:42 +02:00
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: #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
5 changed files with 37 additions and 6 deletions

View File

@ -13,5 +13,8 @@
bscOverlay = import ./overlay.nix;
overlays.default = self.bscOverlay;
legacyPackages.x86_64-linux = pkgs;
# propagate nixpkgs lib, so we can do bscpkgs.lib
inherit (nixpkgs) lib;
};
}

View File

@ -1,15 +1,19 @@
final: /* Future last stage */
prev: /* Previous stage */
with final.lib;
let
callPackage = final.callPackage;
inherit (prev.lib) collect isDerivation mapAttrs;
inherit (final) callPackage;
mkDeps = name: pkgs: final.runCommand name { }
"printf '%s\n' ${toString (collect (x: x ? outPath) pkgs)} > $out";
bscPkgs = {
mkStrict = drv: if (isDerivation drv && drv ? overrideAttrs && !(drv ? strictDeps))
then drv.overrideAttrs { strictDeps = true; }
else drv;
bscPkgs = mapAttrs (_: mkStrict) {
bench6 = callPackage ./pkgs/bench6/default.nix { };
bigotes = callPackage ./pkgs/bigotes/default.nix { };
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
@ -18,7 +22,7 @@ let
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmpv; };
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
#gpi-2 = callPackage ./pkgs/gpi-2/default.nix { }; # Broken: https://jungle.bsc.es/git/rarias/bscpkgs/issues/7
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { };
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
jemallocNanos6 = callPackage ./pkgs/nanos6/jemalloc.nix { };
lmbench = callPackage ./pkgs/lmbench/default.nix { };
@ -44,7 +48,7 @@ let
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.clangOmpss2Nanos6; allowedRequisites = null; };
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.clangOmpss2Nodes; allowedRequisites = null; };
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; };
#tagaspi = callPackage ./pkgs/tagaspi/default.nix { }; # Broken due gpi-2
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
tampi = callPackage ./pkgs/tampi/default.nix { };
wxparaver = callPackage ./pkgs/paraver/default.nix { };
};

View File

@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
patches = [ ./rdma-core.patch ./max-mem.patch ];
preConfigure = ''
patchShebangs autogen.sh
./autogen.sh

10
pkgs/gpi-2/max-mem.patch Normal file
View File

@ -0,0 +1,10 @@
--- a/tests/tests/segments/max_mem.c 2025-09-12 13:30:53.449353591 +0200
+++ b/tests/tests/segments/max_mem.c 2025-09-12 13:33:49.750352401 +0200
@@ -1,5 +1,7 @@
#include <test_utils.h>
+gaspi_size_t gaspi_get_system_mem (void);
+
/* Test allocates 45% of system memory and creates a segment that
large or if several ranks per node exist, divided among that
number */

View File

@ -0,0 +1,12 @@
--- a/src/devices/ib/GPI2_IB.h 2025-09-12 13:25:31.564181121 +0200
+++ b/src/devices/ib/GPI2_IB.h 2025-09-12 13:24:49.105422150 +0200
@@ -26,6 +26,9 @@ along with GPI-2. If not, see <http://ww
#include "GPI2_Dev.h"
+/* Missing prototype as driver.h is now private */
+int ibv_read_sysfs_file(const char *dir, const char *file, char *buf, size_t size);
+
#define GASPI_GID_INDEX (0)
#define PORT_LINK_UP (5)
#define MAX_INLINE_BYTES (128)