forked from rarias/bscpkgs
Compare commits
38 Commits
mega-merge
...
8a8c324cba
| Author | SHA1 | Date | |
|---|---|---|---|
|
8a8c324cba
|
|||
|
0c02ee9bd4
|
|||
|
e35b7100ed
|
|||
|
006bc874f3
|
|||
|
2a7f6618d2
|
|||
|
43074115c8
|
|||
|
b8b62b3e87
|
|||
|
092a0c3243
|
|||
|
3e7fd73ebe
|
|||
|
a2bbb6bfd6
|
|||
|
0831b7fe52
|
|||
|
a3ee080e9e
|
|||
|
a3a0dbcc55
|
|||
|
f53d4aab54
|
|||
|
b08ce80b5a
|
|||
|
57827ae5a4
|
|||
|
bed3d8ce31
|
|||
|
94068997d9
|
|||
|
a0485c06cd
|
|||
|
4722007cd9
|
|||
|
44961c186d
|
|||
|
5e2d01b71a
|
|||
|
b7e43d5b08
|
|||
|
30a91fc0ea
|
|||
|
03c351b1bb
|
|||
|
576d8628df
|
|||
|
fbdd024b03
|
|||
|
ffcb91bd8d
|
|||
|
751d9e7373
|
|||
|
ce3ae340fc
|
|||
|
163a409c80
|
|||
|
22921b9823
|
|||
|
7431fd6057
|
|||
|
b63528025d
|
|||
|
ae5345ea62
|
|||
|
29b3129517
|
|||
|
1138e46b73
|
|||
|
cf7948e3c9
|
43
flake.nix
43
flake.nix
@@ -2,25 +2,42 @@
|
|||||||
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;
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
|
||||||
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 { inherit (nixpkgs) lib; } ) [
|
||||||
|
attrNames
|
||||||
|
(flip getAttrs pkgs)
|
||||||
|
(flip removeAttrs [ "bsc" ])
|
||||||
|
(filterAttrs (_: isDerivation))
|
||||||
|
];
|
||||||
|
|
||||||
# propagate nixpkgs lib, so we can do bscpkgs.lib
|
hydraJobs = {
|
||||||
inherit (nixpkgs) lib;
|
inherit (self.legacyPackages.x86_64-linux.bsc-ci) test;
|
||||||
};
|
packages = self.packages.${system};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
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 filterAttrs;
|
inherit (prev.lib) collect isDerivation mapAttrs;
|
||||||
|
|
||||||
inherit (final) callPackage;
|
inherit (final) callPackage;
|
||||||
|
|
||||||
@@ -59,21 +59,10 @@ 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 // {
|
||||||
@@ -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
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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
|
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -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 = ''
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
|
||||||
Reference in New Issue
Block a user