Archived
1
0
forked from rarias/bscpkgs

36 Commits

Author SHA1 Message Date
8110d341e3 Merge all branches 2025-08-29 16:39:56 +02:00
cbb310d19f 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>
2025-08-29 16:38:48 +02:00
ff1141eaeb Clean up paraver derivations 2025-08-29 11:56:38 +02:00
22e66259f4 Remove gcc from tampi *buildInputs 2025-08-29 11:11:18 +02:00
b4f567474b Fix strictDeps ovni 2025-08-29 11:11:18 +02:00
7720b2dc74 Add TACUDA package 2025-08-12 17:02:09 +02:00
48686dc08d Add TAOpenCL 2025-08-12 17:02:09 +02:00
55d00fc6c5 Move attributes in ompss2 clang derivation to passthru 2025-08-12 17:02:09 +02:00
4e00787b15 Expose our packages in flake packages output 2025-08-12 17:02:09 +02:00
81afed9492 Add clsparse 2025-08-12 17:02:09 +02:00
5333b9267e Use gcc13 for intel compiler 2025-08-12 17:02:08 +02:00
67c02090be Reorder includes in intel 202{4,5} wrapper 2025-08-12 17:02:08 +02:00
6c9d5d78fb Fix path in intel compiler wrapper 2025-08-12 17:02:08 +02:00
1b6404d39c Do not check missing symlinks in intel-oneapi 2025-08-12 17:02:08 +02:00
84c1ab9dd1 Add passthru in ompss2 wrapper for icpx compat 2025-08-12 17:02:08 +02:00
cd5b60db69 Remove wrapper flags when clang called from intel 2025-08-12 17:02:08 +02:00
4cdca2672b Add oneMath 2025-08-12 17:02:08 +02:00
8090dbc653 aocc: init at 5.0.0 2025-08-12 17:02:07 +02:00
98d8ee1f2f Fix parsing of new apt package list for oneapi 2023
New apt list does not have Package: as the first entry for all packages
2025-08-12 17:02:07 +02:00
fc350e835b Add intel-hpckit-2025 as default intelPackages
Also introduces hpckit_2024
2025-08-12 17:02:07 +02:00
7995ca0a99 Add TASYCL 2.1.0 2025-08-12 17:02:07 +02:00
b33be9fc8d Add test for icpx with ompss-2 as host compiler 2025-08-12 17:02:07 +02:00
00ea3bb7a8 Add SYCL test compilation 2025-08-12 17:02:07 +02:00
3df07dcf4b Add alias intelPackages -> intelPackages_2023 2025-08-12 17:02:07 +02:00
0a86452ea4 Make lib imports in overlay explicit 2025-08-12 17:02:06 +02:00
75378fbec3 Fix strictDeps osu 2025-08-12 17:02:06 +02:00
c91127a0cb Set strictDeps=true on our top level packages 2025-08-12 17:02:06 +02:00
1a2c685159 Fix strictDeps mercurium 2025-08-12 17:02:06 +02:00
43768a4b94 Fix strictDeps tampi 2025-08-12 17:02:06 +02:00
e44b6a2a91 Fix strictDeps sonar 2025-08-12 17:02:05 +02:00
112f108307 Fix strictDeps nanos6 2025-08-12 17:02:05 +02:00
7db20fe785 Fix strictDeps paraver 2025-08-12 17:02:05 +02:00
f8154432f4 Fix strictDeps ompss2 2025-08-12 17:02:05 +02:00
44f0ff473f Fix strictDeps intel 2023 2025-08-12 17:02:05 +02:00
d45d0ee496 Fix strictDeps bench6 2025-08-12 17:02:05 +02:00
fe3248b449 Fix strictDeps bigotes 2025-08-12 17:02:04 +02:00
16 changed files with 75 additions and 147 deletions

View File

@@ -2,23 +2,36 @@
inputs.nixpkgs.url = "nixpkgs"; inputs.nixpkgs.url = "nixpkgs";
outputs = { self, nixpkgs, ...}: outputs = { self, nixpkgs, ...}:
let let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
# For now we only support x86 # For now we only support x86
system = "x86_64-linux"; overlays = [ self.overlays.default ];
pkgs = import nixpkgs { };
inherit system; in
overlays = [ self.overlays.default ];
};
in
{ {
bscOverlay = import ./overlay.nix; bscOverlay = import ./overlay.nix;
overlays.default = self.bscOverlay; overlays.default = self.bscOverlay;
# full nixpkgs with our overlay applied # full nixpkgs with our overlay applied
legacyPackages.${system} = pkgs; legacyPackages.${system} = pkgs;
hydraJobs = { # packages added by our overlay
inherit (self.legacyPackages.${system}.bsc-ci) test pkgs cross; packages.${system} =
}; let
inherit (builtins) attrNames removeAttrs;
inherit (nixpkgs.lib) flip filterAttrs getAttrs pipe isDerivation;
in
# extract the names of the packages from the overlay, then get the
# actual packages from the full package set with the overlay applied
pipe (self.overlays.default null null) [
attrNames
(flip getAttrs pkgs)
(flip removeAttrs [ "bsc" ])
(filterAttrs (_: isDerivation))
];
legacyPackages.x86_64-linux = pkgs;
# propagate nixpkgs lib, so we can do bscpkgs.lib # propagate nixpkgs lib, so we can do bscpkgs.lib
inherit (nixpkgs) lib; inherit (nixpkgs) lib;

View File

@@ -2,7 +2,7 @@ final: /* Future last stage */
prev: /* Previous stage */ prev: /* Previous stage */
let let
inherit (prev.lib) collect isDerivation mapAttrs filterAttrs; inherit (prev.lib) collect isDerivation mapAttrs;
inherit (final) callPackage; inherit (final) callPackage;
@@ -26,7 +26,7 @@ let
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { }; clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
clsparse = callPackage ./pkgs/clsparse/package.nix { }; clsparse = callPackage ./pkgs/clsparse/package.nix { };
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated #extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { }; #gpi-2 = callPackage ./pkgs/gpi-2/default.nix { }; # Broken: https://jungle.bsc.es/git/rarias/bscpkgs/issues/7
intel-apt = callPackage ./pkgs/intel-oneapi/packages.nix { }; intel-apt = callPackage ./pkgs/intel-oneapi/packages.nix { };
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { }; intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
intelPackages_2024 = final.intel-apt.hpckit_2024; intelPackages_2024 = final.intel-apt.hpckit_2024;
@@ -57,23 +57,12 @@ let
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.clangOmpss2Nanos6; allowedRequisites = null; }; stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.clangOmpss2Nanos6; allowedRequisites = null; };
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.clangOmpss2Nodes; allowedRequisites = null; }; stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.clangOmpss2Nodes; allowedRequisites = null; };
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; }; stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; };
tagaspi = callPackage ./pkgs/tagaspi/default.nix { }; #tagaspi = callPackage ./pkgs/tagaspi/default.nix { }; # Broken due gpi-2
tampi = callPackage ./pkgs/tampi/default.nix { }; tampi = callPackage ./pkgs/tampi/default.nix { };
tacuda = callPackage ./pkgs/tacuda/default.nix { };
taopencl = callPackage ./pkgs/taopencl/default.nix { }; taopencl = callPackage ./pkgs/taopencl/default.nix { };
tasycl = callPackage ./pkgs/tasycl/default.nix { }; tasycl = callPackage ./pkgs/tasycl/default.nix { };
tasycl-acpp = callPackage ./pkgs/tasycl/default.nix { useIntel = false; }; tasycl-acpp = callPackage ./pkgs/tasycl/default.nix { useIntel = false; };
wxparaver = callPackage ./pkgs/paraver/default.nix { }; wxparaver = callPackage ./pkgs/paraver/default.nix { };
# Fix for RISC-V cross compilation
# TODO: remove once we update to 25.11
# https://github.com/NixOS/nixpkgs/commit/d9c222c81435b
prrte = prev.prrte.overrideAttrs (prevAttrs: {
configureFlags = (prevAttrs.configureFlags or []) ++ [
"--with-pmix=${prev.lib.getDev final.pmix}"
"--with-pmix-libdir=${prev.lib.getLib final.pmix}/lib"
];
});
}; };
in bscPkgs // { in bscPkgs // {
@@ -126,21 +115,15 @@ in bscPkgs // {
}; };
}; };
pkgs = filterAttrs (_: isDerivation) bscPkgs; pkgs = final.runCommand "ci-pkgs" { }
pkgsList = final.runCommand "ci-pkgs" { }
"printf '%s\n' ${toString (collect isDerivation bscPkgs)} > $out"; "printf '%s\n' ${toString (collect isDerivation bscPkgs)} > $out";
tests = final.runCommand "ci-tests" { } tests = final.runCommand "ci-tests" { }
"printf '%s\n' ${toString (collect isDerivation final.bsc-ci.test)} > $out"; "printf '%s\n' ${toString (collect isDerivation final.bsc-ci.test)} > $out";
cross = prev.lib.genAttrs [ "riscv64" ] (target:
final.pkgsCross.${target}.bsc-ci.pkgs
);
all = final.runCommand "ci-all" { } all = final.runCommand "ci-all" { }
'' ''
deps="${toString [ final.bsc-ci.pkgsList final.bsc-ci.tests ]}" deps="${toString [ final.bsc-ci.pkgs final.bsc-ci.tests ]}"
cat $deps cat $deps
printf '%s\n' $deps > $out printf '%s\n' $deps > $out
''; '';

View File

@@ -20,7 +20,6 @@
#, python3Packages #, python3Packages
, installShellFiles , installShellFiles
, symlinkJoin , symlinkJoin
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
}: }:
let let
@@ -88,7 +87,7 @@ stdenv.mkDerivation rec {
--enable-sampling --enable-sampling
--with-unwind=${libunwind.dev} --with-unwind=${libunwind.dev}
--with-xml-prefix=${libxml2.dev} --with-xml-prefix=${libxml2.dev}
${lib.optionalString enablePapi "--with-papi=${papi}"} --with-papi=${papi}
${if (mpi != null) then ''--with-mpi=${mpi}'' ${if (mpi != null) then ''--with-mpi=${mpi}''
else ''--without-mpi''} else ''--without-mpi''}
--without-dyninst) --without-dyninst)

View File

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

View File

@@ -1,10 +0,0 @@
--- 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

@@ -1,12 +0,0 @@
--- 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)

View File

@@ -2,7 +2,6 @@
stdenv stdenv
, lib , lib
, gcc , gcc
, gcc13
, clangOmpss2Unwrapped , clangOmpss2Unwrapped
, writeShellScript , writeShellScript
, openmp ? null , openmp ? null
@@ -11,9 +10,9 @@
, ompss2rt ? null , ompss2rt ? null
}: }:
let with lib;
inherit (lib) assertMsg optional optionalString;
let
usingNodesAndOmpv = (openmp.pname == "openmp-v" && ompss2rt.pname == "nodes"); usingNodesAndOmpv = (openmp.pname == "openmp-v" && ompss2rt.pname == "nodes");
sameNosv = openmp.nosv == ompss2rt.nosv; sameNosv = openmp.nosv == ompss2rt.nosv;
in in
@@ -38,8 +37,7 @@ let
targetConfig = stdenv.targetPlatform.config; targetConfig = stdenv.targetPlatform.config;
inherit gcc; inherit gcc;
cc = clangOmpss2Unwrapped; cc = clangOmpss2Unwrapped;
gccVersion = with versions; let v = gcc.version; in concatStringsSep "." [(major v) (minor v) (patch v)];
gccVersion = with lib.versions; let v = gcc.version; in concatStringsSep "." [(major v) (minor v) (patch v)];
extraBuildCommands = '' extraBuildCommands = ''
echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
@@ -94,8 +92,7 @@ let
''; '';
wrappedCCIntel = wrapCCWith { wrappedCCIntel = wrapCCWith {
inherit bintools extraPackages; inherit cc bintools extraPackages;
cc = cc.override { gcc = gcc13; }; # Intel uses gcc13, so we have to match it
# extraPackages adds packages to depsTargetTargetPropagated # extraPackages adds packages to depsTargetTargetPropagated
extraBuildCommands = intelExtraBuildCommands + envExports; extraBuildCommands = intelExtraBuildCommands + envExports;
}; };

View File

@@ -22,11 +22,7 @@ stdenv.mkDerivation rec {
''; '';
buildInputs = [ libtirpc ]; buildInputs = [ libtirpc ];
patches = [ patches = [ ./fix-install.patch ./gcc-14.patch ];
./fix-install.patch
./gcc-14.patch
./fix-cross.patch
];
hardeningDisable = [ "all" ]; hardeningDisable = [ "all" ];
@@ -39,8 +35,6 @@ stdenv.mkDerivation rec {
CFLAGS=-Wno-implicit-int CFLAGS=-Wno-implicit-int
CPPFLAGS=-I${libtirpc.dev}/include/tirpc CPPFLAGS=-I${libtirpc.dev}/include/tirpc
LDFLAGS=-ltirpc LDFLAGS=-ltirpc
CC=${stdenv.cc.targetPrefix}cc
AR=${stdenv.cc.targetPrefix}ar
) )
''; '';

View File

@@ -1,13 +0,0 @@
diff --git a/src/Makefile b/src/Makefile
index 2555014..356eeb3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -36,7 +36,7 @@ SHELL=/bin/sh
CC=`../scripts/compiler`
MAKE=`../scripts/make`
-AR=ar
+AR?=ar
ARCREATE=cr
# base of installation location

View File

@@ -16,7 +16,6 @@
, jemallocNanos6 ? null , jemallocNanos6 ? null
, cachelineBytes ? 64 , cachelineBytes ? 64
, enableGlibcxxDebug ? false , enableGlibcxxDebug ? false
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
, useGit ? false , useGit ? false
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6" , gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
, gitBranch ? "master" , gitBranch ? "master"
@@ -48,8 +47,6 @@ let
}; };
source = if (useGit) then git else release; source = if (useGit) then git else release;
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
in in
stdenv.mkDerivation (source // { stdenv.mkDerivation (source // {
pname = "nanos6"; pname = "nanos6";
@@ -74,11 +71,9 @@ in
"--disable-all-instrumentations" "--disable-all-instrumentations"
"--enable-ovni-instrumentation" "--enable-ovni-instrumentation"
"--with-ovni=${ovni}" "--with-ovni=${ovni}"
"--with-boost=${boost.dev}"
] ++ ] ++
(optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++ (optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG") ++ (optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
(optional isCross "--with-symbol-resolution=ifunc");
postConfigure = lib.optionalString (!enableDebug) '' postConfigure = lib.optionalString (!enableDebug) ''
# Disable debug # Disable debug
@@ -102,14 +97,16 @@ in
# TODO: papi_version is needed for configure: # TODO: papi_version is needed for configure:
# ./configure: line 27378: papi_version: command not found # ./configure: line 27378: papi_version: command not found
# This probably breaks cross-compilation # This probably breaks cross-compilation
] ++ lib.optionals enablePapi [ papi ]; papi
];
buildInputs = [ buildInputs = [
boost boost
numactl numactl
hwloc hwloc
papi
ovni ovni
] ++ lib.optionals enablePapi [ papi ]; ];
# Create a script that sets NANOS6_HOME # Create a script that sets NANOS6_HOME
postInstall = '' postInstall = ''

View File

@@ -7,7 +7,7 @@
, numactl , numactl
, hwloc , hwloc
, papi , papi
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling , enablePapi ? true
, cacheline ? 64 # bits , cacheline ? 64 # bits
, ovni ? null , ovni ? null
, useGit ? false , useGit ? false

View File

@@ -1,18 +1,19 @@
{ stdenv {
, fetchFromGitHub stdenv,
, autoreconfHook fetchFromGitHub,
, boost autoreconfHook,
, libxml2 boost,
, xml2 libxml2,
, wxGTK32 xml2,
, autoconf wxGTK32,
, automake autoconf,
, paraverKernel automake,
, openssl paraverKernel,
, glibcLocales openssl,
, wrapGAppsHook glibcLocales,
wrapGAppsHook,
, enableDebug ? false enableDebug ? false,
}: }:
let let

View File

@@ -1,15 +1,16 @@
{ stdenv {
, fetchFromGitHub stdenv,
, autoreconfHook fetchFromGitHub,
, boost autoreconfHook,
, libxml2 boost,
, xml2 libxml2,
, autoconf xml2,
, automake autoconf,
, pkg-config automake,
, zlib pkg-config,
zlib,
, enableDebug ? false enableDebug ? false,
}: }:
let let

View File

@@ -1,4 +1,6 @@
{ stdenv { stdenv
, lib
, withCFlags
, fetchFromGitHub , fetchFromGitHub
, automake , automake
, autoconf , autoconf
@@ -6,24 +8,21 @@
, gnumake , gnumake
, autoreconfHook , autoreconfHook
, boost , boost
, cudaPackages
, useGit ? false , useGit ? false
, gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tacuda/tacuda.git" , gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tacuda/tacuda.git"
, gitBranch ? "main" , gitBranch ? "main"
, gitCommit ? "35234f9445e6149a2bd38d119841e2485d6ee05e" , gitCommit ? ""
}: }:
let let
release = rec {
release_ver = "2.1.0"; version = "2.1.0";
release = {
version = release_ver;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "bsc-pm"; owner = "bsc-pm";
repo = "tacuda"; repo = "tacuda";
rev = release_ver; rev = version;
hash = "sha256-Cj3EiLVJSLvRv0ydeg7Vp4SpkniEqHkcWF+YOJQ8EcM="; hash = "";
}; };
}; };
@@ -55,14 +54,8 @@ stdenv.mkDerivation {
gnumake gnumake
]; ];
patches = [ ./fix_config.patch ];
configureFlags = [ "--with-cuda-include=${cudaPackages.cudatoolkit}/include" ];
buildInputs = [ buildInputs = [
boost boost
cudaPackages.libcublas
cudaPackages.cuda_cudart
]; ];
} }

View File

@@ -1,13 +0,0 @@
diff --git a/m4/cuda.m4 b/m4/cuda.m4
index 23f5c94..8f9b534 100644
--- a/m4/cuda.m4
+++ b/m4/cuda.m4
@@ -40,7 +40,7 @@ search_libs="cuda cublas cudart"
required_libs=""
m4_foreach([function],
- [cuInit,
+ [
cublasSgemm,
cudaStreamCreate,
cudaLaunchKernel,

View File

@@ -17,7 +17,7 @@ stdenv.mkDerivation (finalAttrs: {
version = finalAttrs.src.shortRev; version = finalAttrs.src.shortRev;
src = builtins.fetchGit { src = builtins.fetchGit {
url = "git@gitlab-internal.bsc.es:task-awareness/taopencl/taopencl.git"; url = "git@gitlab-internal.bsc.es:task-awareness/taopencl/taopencl.git";
ref = "master"; ref = "master";
rev = "c3b7b32ae8fa4af7ceff598532a881f8f1490aaf"; rev = "c3b7b32ae8fa4af7ceff598532a881f8f1490aaf";
}; };