forked from rarias/bscpkgs
Compare commits
38 Commits
mega-merge
...
3f1a7ae233
| Author | SHA1 | Date | |
|---|---|---|---|
|
3f1a7ae233
|
|||
|
6491ba90ad
|
|||
|
967cfba8ec
|
|||
|
e35b7100ed
|
|||
|
006bc874f3
|
|||
|
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
|
18
flake.nix
18
flake.nix
@@ -16,8 +16,24 @@
|
||||
# full nixpkgs with our overlay applied
|
||||
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 = {
|
||||
inherit (self.legacyPackages.${system}.bsc-ci) test pkgs cross;
|
||||
inherit (self.legacyPackages.x86_64-linux.bsc-ci) test;
|
||||
packages = self.packages.${system};
|
||||
};
|
||||
|
||||
# propagate nixpkgs lib, so we can do bscpkgs.lib
|
||||
|
||||
23
overlay.nix
23
overlay.nix
@@ -2,7 +2,7 @@ final: /* Future last stage */
|
||||
prev: /* Previous stage */
|
||||
|
||||
let
|
||||
inherit (prev.lib) collect isDerivation mapAttrs filterAttrs;
|
||||
inherit (prev.lib) collect isDerivation mapAttrs;
|
||||
|
||||
inherit (final) callPackage;
|
||||
|
||||
@@ -59,21 +59,10 @@ let
|
||||
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; };
|
||||
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
||||
tampi = callPackage ./pkgs/tampi/default.nix { };
|
||||
tacuda = callPackage ./pkgs/tacuda/default.nix { };
|
||||
taopencl = callPackage ./pkgs/taopencl/default.nix { };
|
||||
tasycl = callPackage ./pkgs/tasycl/default.nix { };
|
||||
tasycl-acpp = callPackage ./pkgs/tasycl/default.nix { useIntel = false; };
|
||||
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 // {
|
||||
@@ -126,21 +115,15 @@ in bscPkgs // {
|
||||
};
|
||||
};
|
||||
|
||||
pkgs = filterAttrs (_: isDerivation) bscPkgs;
|
||||
|
||||
pkgsList = final.runCommand "ci-pkgs" { }
|
||||
pkgs = final.runCommand "ci-pkgs" { }
|
||||
"printf '%s\n' ${toString (collect isDerivation bscPkgs)} > $out";
|
||||
|
||||
tests = final.runCommand "ci-tests" { }
|
||||
"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" { }
|
||||
''
|
||||
deps="${toString [ final.bsc-ci.pkgsList final.bsc-ci.tests ]}"
|
||||
deps="${toString [ final.bsc-ci.pkgs final.bsc-ci.tests ]}"
|
||||
cat $deps
|
||||
printf '%s\n' $deps > $out
|
||||
'';
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#, python3Packages
|
||||
, installShellFiles
|
||||
, symlinkJoin
|
||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -88,7 +87,7 @@ stdenv.mkDerivation rec {
|
||||
--enable-sampling
|
||||
--with-unwind=${libunwind.dev}
|
||||
--with-xml-prefix=${libxml2.dev}
|
||||
${lib.optionalString enablePapi "--with-papi=${papi}"}
|
||||
--with-papi=${papi}
|
||||
${if (mpi != null) then ''--with-mpi=${mpi}''
|
||||
else ''--without-mpi''}
|
||||
--without-dyninst)
|
||||
|
||||
@@ -22,11 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
buildInputs = [ libtirpc ];
|
||||
patches = [
|
||||
./fix-install.patch
|
||||
./gcc-14.patch
|
||||
./fix-cross.patch
|
||||
];
|
||||
patches = [ ./fix-install.patch ./gcc-14.patch ];
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
@@ -39,8 +35,6 @@ stdenv.mkDerivation rec {
|
||||
CFLAGS=-Wno-implicit-int
|
||||
CPPFLAGS=-I${libtirpc.dev}/include/tirpc
|
||||
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
|
||||
, cachelineBytes ? 64
|
||||
, enableGlibcxxDebug ? false
|
||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
||||
, useGit ? false
|
||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
|
||||
, gitBranch ? "master"
|
||||
@@ -48,8 +47,6 @@ let
|
||||
};
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
|
||||
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
|
||||
in
|
||||
stdenv.mkDerivation (source // {
|
||||
pname = "nanos6";
|
||||
@@ -74,11 +71,9 @@ in
|
||||
"--disable-all-instrumentations"
|
||||
"--enable-ovni-instrumentation"
|
||||
"--with-ovni=${ovni}"
|
||||
"--with-boost=${boost.dev}"
|
||||
] ++
|
||||
(optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++
|
||||
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG") ++
|
||||
(optional isCross "--with-symbol-resolution=ifunc");
|
||||
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
|
||||
|
||||
postConfigure = lib.optionalString (!enableDebug) ''
|
||||
# Disable debug
|
||||
@@ -102,14 +97,16 @@ in
|
||||
# TODO: papi_version is needed for configure:
|
||||
# ./configure: line 27378: papi_version: command not found
|
||||
# This probably breaks cross-compilation
|
||||
] ++ lib.optionals enablePapi [ papi ];
|
||||
papi
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
numactl
|
||||
hwloc
|
||||
papi
|
||||
ovni
|
||||
] ++ lib.optionals enablePapi [ papi ];
|
||||
];
|
||||
|
||||
# Create a script that sets NANOS6_HOME
|
||||
postInstall = ''
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
, numactl
|
||||
, hwloc
|
||||
, papi
|
||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
||||
, enablePapi ? true
|
||||
, cacheline ? 64 # bits
|
||||
, ovni ? null
|
||||
, useGit ? false
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, withCFlags
|
||||
, fetchFromGitHub
|
||||
, automake
|
||||
, autoconf
|
||||
@@ -6,24 +8,21 @@
|
||||
, gnumake
|
||||
, autoreconfHook
|
||||
, boost
|
||||
, cudaPackages
|
||||
|
||||
, useGit ? false
|
||||
, gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tacuda/tacuda.git"
|
||||
, gitBranch ? "main"
|
||||
, gitCommit ? "35234f9445e6149a2bd38d119841e2485d6ee05e"
|
||||
, gitCommit ? ""
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
release_ver = "2.1.0";
|
||||
release = {
|
||||
version = release_ver;
|
||||
release = rec {
|
||||
version = "2.1.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "tacuda";
|
||||
rev = release_ver;
|
||||
hash = "sha256-Cj3EiLVJSLvRv0ydeg7Vp4SpkniEqHkcWF+YOJQ8EcM=";
|
||||
rev = version;
|
||||
hash = "";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -55,14 +54,8 @@ stdenv.mkDerivation {
|
||||
gnumake
|
||||
];
|
||||
|
||||
patches = [ ./fix_config.patch ];
|
||||
|
||||
configureFlags = [ "--with-cuda-include=${cudaPackages.cudatoolkit}/include" ];
|
||||
|
||||
buildInputs = [
|
||||
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