forked from rarias/bscpkgs
Compare commits
42 Commits
8a8c324cba
...
mega-merge
| Author | SHA1 | Date | |
|---|---|---|---|
|
e595995fb3
|
|||
|
5a7cb55c77
|
|||
|
a2f265bc16
|
|||
|
2ffd3be93d
|
|||
|
958af15b7a
|
|||
|
f43cd5a35c
|
|||
|
85d50f346c
|
|||
|
63aad2bbe5
|
|||
|
b37f28a631
|
|||
|
fbcce1a137
|
|||
|
bbd9ec944b
|
|||
|
5ff58ed90e
|
|||
|
5f46bff2ca
|
|||
|
6dd25cd8ff
|
|||
|
7b59ad8e65
|
|||
|
9f72c57bdd
|
|||
|
affc80cd87
|
|||
|
148fae48ee
|
|||
|
672b84359f
|
|||
|
d0d26ccee7
|
|||
|
49b490876e
|
|||
|
92f40d2594
|
|||
|
e78fb55e48
|
|||
|
db60f992d2
|
|||
|
e0f1ef3475
|
|||
|
4292109ae0
|
|||
|
ce131fc169
|
|||
|
107952ead9
|
|||
|
cf3543690d
|
|||
|
907797dbf7
|
|||
|
46524cd2ec
|
|||
|
c9442e9859
|
|||
|
1b4b039faf
|
|||
|
e3faa29477
|
|||
|
4eb8e2bada
|
|||
|
1462d25b9b
|
|||
|
61b6de195e
|
|||
|
cb6d770992
|
|||
|
6454ff6712
|
|||
|
d40ce4fe79
|
|||
|
0bbb13d952
|
|||
| 2ffdd53d86 |
41
flake.nix
41
flake.nix
@@ -2,42 +2,25 @@
|
|||||||
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
|
||||||
overlays = [ self.overlays.default ];
|
system = "x86_64-linux";
|
||||||
};
|
pkgs = import nixpkgs {
|
||||||
in
|
inherit system;
|
||||||
|
overlays = [ self.overlays.default ];
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
bscOverlay = import ./overlay.nix;
|
bscOverlay = import ./overlay.nix;
|
||||||
overlays.default = self.bscOverlay;
|
overlays.default = self.bscOverlay;
|
||||||
|
|
||||||
# propagate nixpkgs lib, so we can do bscpkgs.lib
|
|
||||||
inherit (nixpkgs) lib;
|
|
||||||
|
|
||||||
# full nixpkgs with our overlay applied
|
# full nixpkgs with our overlay applied
|
||||||
legacyPackages.${system} = pkgs;
|
legacyPackages.${system} = pkgs;
|
||||||
|
|
||||||
# packages added by our overlay
|
|
||||||
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 { inherit (nixpkgs) lib; } ) [
|
|
||||||
attrNames
|
|
||||||
(flip getAttrs pkgs)
|
|
||||||
(flip removeAttrs [ "bsc" ])
|
|
||||||
(filterAttrs (_: isDerivation))
|
|
||||||
];
|
|
||||||
|
|
||||||
hydraJobs = {
|
hydraJobs = {
|
||||||
inherit (self.legacyPackages.x86_64-linux.bsc-ci) test;
|
inherit (self.legacyPackages.${system}.bsc-ci) test pkgs cross;
|
||||||
packages = self.packages.${system};
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
# propagate nixpkgs lib, so we can do bscpkgs.lib
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
23
overlay.nix
23
overlay.nix
@@ -2,7 +2,7 @@ final: /* Future last stage */
|
|||||||
prev: /* Previous stage */
|
prev: /* Previous stage */
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (prev.lib) collect isDerivation mapAttrs;
|
inherit (prev.lib) collect isDerivation mapAttrs filterAttrs;
|
||||||
|
|
||||||
inherit (final) callPackage;
|
inherit (final) callPackage;
|
||||||
|
|
||||||
@@ -59,10 +59,21 @@ let
|
|||||||
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 { };
|
||||||
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 // {
|
||||||
@@ -115,15 +126,21 @@ in bscPkgs // {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pkgs = final.runCommand "ci-pkgs" { }
|
pkgs = filterAttrs (_: isDerivation) bscPkgs;
|
||||||
|
|
||||||
|
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.pkgs final.bsc-ci.tests ]}"
|
deps="${toString [ final.bsc-ci.pkgsList final.bsc-ci.tests ]}"
|
||||||
cat $deps
|
cat $deps
|
||||||
printf '%s\n' $deps > $out
|
printf '%s\n' $deps > $out
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#, python3Packages
|
#, python3Packages
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, symlinkJoin
|
, symlinkJoin
|
||||||
|
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@@ -87,7 +88,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}
|
||||||
--with-papi=${papi}
|
${lib.optionalString enablePapi "--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)
|
||||||
|
|||||||
@@ -22,7 +22,11 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ libtirpc ];
|
buildInputs = [ libtirpc ];
|
||||||
patches = [ ./fix-install.patch ./gcc-14.patch ];
|
patches = [
|
||||||
|
./fix-install.patch
|
||||||
|
./gcc-14.patch
|
||||||
|
./fix-cross.patch
|
||||||
|
];
|
||||||
|
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
|
|
||||||
@@ -35,6 +39,8 @@ 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
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
13
pkgs/lmbench/fix-cross.patch
Normal file
13
pkgs/lmbench/fix-cross.patch
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
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
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
, 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"
|
||||||
@@ -47,6 +48,8 @@ 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";
|
||||||
@@ -71,9 +74,11 @@ 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
|
||||||
@@ -97,16 +102,14 @@ 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
|
||||||
papi
|
] ++ lib.optionals enablePapi [ 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 = ''
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
, numactl
|
, numactl
|
||||||
, hwloc
|
, hwloc
|
||||||
, papi
|
, papi
|
||||||
, enablePapi ? true
|
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
||||||
, cacheline ? 64 # bits
|
, cacheline ? 64 # bits
|
||||||
, ovni ? null
|
, ovni ? null
|
||||||
, useGit ? false
|
, useGit ? false
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
|
||||||
, withCFlags
|
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, automake
|
, automake
|
||||||
, autoconf
|
, autoconf
|
||||||
@@ -8,21 +6,24 @@
|
|||||||
, 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 ? ""
|
, gitCommit ? "35234f9445e6149a2bd38d119841e2485d6ee05e"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
release = rec {
|
|
||||||
version = "2.1.0";
|
release_ver = "2.1.0";
|
||||||
|
release = {
|
||||||
|
version = release_ver;
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bsc-pm";
|
owner = "bsc-pm";
|
||||||
repo = "tacuda";
|
repo = "tacuda";
|
||||||
rev = version;
|
rev = release_ver;
|
||||||
hash = "";
|
hash = "sha256-Cj3EiLVJSLvRv0ydeg7Vp4SpkniEqHkcWF+YOJQ8EcM=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -54,8 +55,14 @@ stdenv.mkDerivation {
|
|||||||
gnumake
|
gnumake
|
||||||
];
|
];
|
||||||
|
|
||||||
|
patches = [ ./fix_config.patch ];
|
||||||
|
|
||||||
|
configureFlags = [ "--with-cuda-include=${cudaPackages.cudatoolkit}/include" ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost
|
boost
|
||||||
|
cudaPackages.libcublas
|
||||||
|
cudaPackages.cuda_cudart
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
13
pkgs/tacuda/fix_config.patch
Normal file
13
pkgs/tacuda/fix_config.patch
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
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,
|
||||||
Reference in New Issue
Block a user