forked from rarias/bscpkgs
Compare commits
3 Commits
pkgs/tacud
...
fix/crossR
| Author | SHA1 | Date | |
|---|---|---|---|
|
c5563ab111
|
|||
|
a8bfb6dcd7
|
|||
|
93e94cd370
|
@@ -58,7 +58,6 @@ let
|
|||||||
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
||||||
tampi = callPackage ./pkgs/tampi/default.nix { };
|
tampi = callPackage ./pkgs/tampi/default.nix { };
|
||||||
upc-qaire-exporter = prev.callPackage ./pkgs/upc-qaire-exporter/default.nix { };
|
upc-qaire-exporter = prev.callPackage ./pkgs/upc-qaire-exporter/default.nix { };
|
||||||
tacuda = callPackage ./pkgs/tacuda/default.nix { };
|
|
||||||
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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,68 +0,0 @@
|
|||||||
{ 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
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -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