forked from rarias/jungle
Compare commits
1 Commits
quick-shel
...
39b65d8f96
| Author | SHA1 | Date | |
|---|---|---|---|
|
39b65d8f96
|
@@ -19,7 +19,6 @@ let
|
||||
cudainfo = prev.callPackage ./pkgs/cudainfo/default.nix { };
|
||||
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
||||
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { };
|
||||
quickShell = import ./pkgs/quick-shell/default.nix { pkgs = final; };
|
||||
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
|
||||
jemallocNanos6 = callPackage ./pkgs/nanos6/jemalloc.nix { };
|
||||
# FIXME: Extend this to all linuxPackages variants. Open problem, see:
|
||||
@@ -58,6 +57,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; };
|
||||
tacuda = callPackage ./pkgs/tacuda/default.nix { };
|
||||
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
||||
tampi = callPackage ./pkgs/tampi/default.nix { };
|
||||
upc-qaire-exporter = prev.callPackage ./pkgs/upc-qaire-exporter/default.nix { };
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
{ pkgs }:
|
||||
|
||||
# This builds devshells using passthru to populate packages and inputsFrom
|
||||
# lazily.
|
||||
#
|
||||
# Packages prefixed with @ are added to inputsFrom and the rest are
|
||||
# added to packages. This makes it possible to obtain a devshell with combining
|
||||
# inputsFrom and packages from the comand line:
|
||||
#
|
||||
# $ nix develop .#quickShell.@nosv.clang-tools.ovni.@tampi
|
||||
#
|
||||
# is equivalent to:
|
||||
#
|
||||
# with pkgs; mkShell {
|
||||
# packages = [ clang-tools ovni ];
|
||||
# inputsFrom = [ nosv tampi ];
|
||||
# }
|
||||
#
|
||||
|
||||
let
|
||||
inherit (builtins) attrNames getAttr listToAttrs;
|
||||
inherit (pkgs) lib;
|
||||
|
||||
# list of all packages' names
|
||||
names = attrNames pkgs;
|
||||
|
||||
# generate a attributes containing the selected packages + all the available
|
||||
# packages in names ("" -> packages and "@" -> inputsFrom)
|
||||
go =
|
||||
selected:
|
||||
let
|
||||
mkAttrs =
|
||||
isInputs:
|
||||
(map (
|
||||
name:
|
||||
let
|
||||
pkg = getAttr name pkgs;
|
||||
in
|
||||
{
|
||||
name = (if isInputs then "@" else "") + name;
|
||||
value = go (
|
||||
if isInputs then
|
||||
{
|
||||
inherit (selected) packages;
|
||||
inputsFrom = selected.inputsFrom ++ [ pkg ];
|
||||
}
|
||||
else
|
||||
{
|
||||
inherit (selected) inputsFrom;
|
||||
packages = selected.packages ++ [ pkg ];
|
||||
}
|
||||
);
|
||||
}
|
||||
) names);
|
||||
|
||||
attrs = listToAttrs ((mkAttrs true) ++ (mkAttrs false));
|
||||
|
||||
drv = pkgs.mkShell {
|
||||
inherit (selected) inputsFrom packages;
|
||||
name = # build a label from inputsFrom
|
||||
if (selected.inputsFrom == [ ]) then
|
||||
"nix-quick-shell"
|
||||
else
|
||||
lib.concatStringsSep "-" (map (v: v.pname or v.name or "unknown") selected.inputsFrom);
|
||||
};
|
||||
in
|
||||
drv.overrideAttrs {
|
||||
passthru = attrs // {
|
||||
_passthru = drv.passthru;
|
||||
};
|
||||
};
|
||||
in
|
||||
go {
|
||||
inputsFrom = [ ];
|
||||
packages = [ ];
|
||||
}
|
||||
68
pkgs/tacuda/default.nix
Normal file
68
pkgs/tacuda/default.nix
Normal file
@@ -0,0 +1,68 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, automake
|
||||
, autoconf
|
||||
, libtool
|
||||
, gnumake
|
||||
, autoreconfHook
|
||||
, boost
|
||||
, cudaPackages
|
||||
|
||||
, useGit ? false
|
||||
, gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tacuda/tacuda.git"
|
||||
, gitBranch ? "main"
|
||||
, gitCommit ? "35234f9445e6149a2bd38d119841e2485d6ee05e"
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
release_ver = "2.1.0";
|
||||
release = {
|
||||
version = release_ver;
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "tacuda";
|
||||
rev = release_ver;
|
||||
hash = "sha256-Cj3EiLVJSLvRv0ydeg7Vp4SpkniEqHkcWF+YOJQ8EcM=";
|
||||
};
|
||||
};
|
||||
|
||||
git = rec {
|
||||
version = src.shortRev;
|
||||
src = builtins.fetchGit {
|
||||
url = gitUrl;
|
||||
ref = gitBranch;
|
||||
rev = gitCommit;
|
||||
};
|
||||
};
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "tacuda";
|
||||
inherit (source) src version;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
separateDebugInfo = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
automake
|
||||
autoconf
|
||||
libtool
|
||||
gnumake
|
||||
];
|
||||
|
||||
patches = [ ./fix_config.patch ];
|
||||
|
||||
configureFlags = [ "--with-cuda-include=${cudaPackages.cudatoolkit}/include" ];
|
||||
|
||||
buildInputs = [
|
||||
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