forked from rarias/bscpkgs
Compare commits
1 Commits
pkgs/clspa
...
pkgs/tacud
| Author | SHA1 | Date | |
|---|---|---|---|
|
dbfebf2b92
|
@@ -16,7 +16,6 @@ let
|
|||||||
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmpv; };
|
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmpv; };
|
||||||
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
|
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
|
||||||
cudainfo = prev.callPackage ./pkgs/cudainfo/default.nix { };
|
cudainfo = prev.callPackage ./pkgs/cudainfo/default.nix { };
|
||||||
clsparse = callPackage ./pkgs/clsparse/package.nix { };
|
|
||||||
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
||||||
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { };
|
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { };
|
||||||
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
|
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
|
||||||
@@ -59,6 +58,7 @@ 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 { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 3d139ed..15ffc14 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -176,32 +179,22 @@ if( BUILD_clSPARSE OR BUILD_SAMPLES )
|
|
||||||
if( BUILD_clSPARSE )
|
|
||||||
message( STATUS "Setting up clSPARSE external..." )
|
|
||||||
|
|
||||||
- if ( BUILD_SAMPLES )
|
|
||||||
- # If the user elects to build samples, then we must build and install clSPARSE
|
|
||||||
- # The install location is set as a subdirectory of the SuperBuild
|
|
||||||
- ExternalProject_Add(
|
|
||||||
- clSPARSE
|
|
||||||
- DEPENDS ${clSPARSE.Dependencies}
|
|
||||||
- SOURCE_DIR ${PROJECT_SOURCE_DIR}/src
|
|
||||||
- BINARY_DIR clSPARSE-build
|
|
||||||
- INSTALL_DIR clSPARSE-package
|
|
||||||
- CMAKE_ARGS ${clSPARSE.Cmake.Args} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
|
||||||
- -DBUILD_CLVERSION=${BUILD_CLVERSION} -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
|
|
||||||
- -DUSE_SYSTEM_CL2HPP:BOOL=${USE_SYSTEM_CL2HPP}
|
|
||||||
- )
|
|
||||||
- else( )
|
|
||||||
- # If the user does not want to build samples, then build clSPARSE but don't automatically
|
|
||||||
- # install it
|
|
||||||
- ExternalProject_Add(
|
|
||||||
- clSPARSE
|
|
||||||
- DEPENDS ${clSPARSE.Dependencies}
|
|
||||||
- SOURCE_DIR ${PROJECT_SOURCE_DIR}/src
|
|
||||||
- BINARY_DIR clSPARSE-build
|
|
||||||
- CMAKE_ARGS ${clSPARSE.Cmake.Args} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
|
||||||
- -DBUILD_CLVERSION=${BUILD_CLVERSION} -DUSE_SYSTEM_CL2HPP:BOOL=${USE_SYSTEM_CL2HPP}
|
|
||||||
- INSTALL_COMMAND ""
|
|
||||||
- )
|
|
||||||
- endif( )
|
|
||||||
+ ExternalProject_Add(
|
|
||||||
+ clSPARSE
|
|
||||||
+ DEPENDS ${clSPARSE.Dependencies}
|
|
||||||
+ SOURCE_DIR ${PROJECT_SOURCE_DIR}/src
|
|
||||||
+ BINARY_DIR clSPARSE-build
|
|
||||||
+ INSTALL_DIR clSPARSE-package
|
|
||||||
+ CMAKE_ARGS ${clSPARSE.Cmake.Args} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
|
||||||
+ -DBUILD_CLVERSION=${BUILD_CLVERSION} -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
|
|
||||||
+ -DUSE_SYSTEM_CL2HPP:BOOL=${USE_SYSTEM_CL2HPP}
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ install(
|
|
||||||
+ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/clSPARSE-package/
|
|
||||||
+ DESTINATION ${CMAKE_INSTALL_PREFIX}
|
|
||||||
+ USE_SOURCE_PERMISSIONS
|
|
||||||
+ )
|
|
||||||
|
|
||||||
endif( )
|
|
||||||
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
stdenv,
|
|
||||||
fetchFromGitHub,
|
|
||||||
fetchpatch,
|
|
||||||
boost,
|
|
||||||
gtest,
|
|
||||||
ocl-icd,
|
|
||||||
opencl-headers,
|
|
||||||
opencl-clhpp,
|
|
||||||
cmake,
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "clsparse";
|
|
||||||
version = "0.10.2.0";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "clMathLibraries";
|
|
||||||
repo = "clSPARSE";
|
|
||||||
rev = "v${version}";
|
|
||||||
hash = "sha256-jIauCtUyPEIx7pFI3qH0WagV+t/fvro0OsGgONBJm0s=";
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./pass_include_dir.patch
|
|
||||||
./install_target.patch
|
|
||||||
(fetchpatch {
|
|
||||||
name = "remove-gettypecode.patch";
|
|
||||||
url = "https://patch-diff.githubusercontent.com/raw/clMathLibraries/clSPARSE/pull/210.patch";
|
|
||||||
hash = "sha256-9Q+tk7RMdWE4MCnbvWlsI0MIgBYKIWR2jIC1bICtIjU=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postInstallPhase = ''
|
|
||||||
mv $installDir/lib64 lib
|
|
||||||
ln -s lib/ lib64
|
|
||||||
'';
|
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = "-std=c++17";
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
cmake
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
boost
|
|
||||||
ocl-icd
|
|
||||||
opencl-headers
|
|
||||||
opencl-clhpp
|
|
||||||
];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DBUILD_Boost=OFF"
|
|
||||||
"-DBUILD_gMock=OFF"
|
|
||||||
"-DBUILD_MTX=OFF"
|
|
||||||
"-DBUILD_SAMPLES=OFF"
|
|
||||||
"-DUSE_SYSTEM_CL2HPP=ON"
|
|
||||||
"-DGMOCK_ROOT=${gtest}"
|
|
||||||
"-DGTEST_INCLUDE_DIR=${gtest.src}/googletest/include"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "A software library containing Sparse functions written in OpenCL";
|
|
||||||
homepage = "https://github.com/clMathLibraries/clSPARSE";
|
|
||||||
license = lib.licenses.asl20;
|
|
||||||
maintainers = with lib.maintainers; [ leixb ];
|
|
||||||
platforms = lib.platforms.all;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 3d139ed..b7ea2d3 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -132,6 +132,9 @@ else( )
|
|
||||||
set( GMOCK_ROOT "$ENV{GMOCK_ROOT}" )
|
|
||||||
endif( )
|
|
||||||
list( APPEND clSPARSE.Cmake.Args -DGTEST_ROOT=${GMOCK_ROOT} )
|
|
||||||
+ if( DEFINED GTEST_INCLUDE_DIR )
|
|
||||||
+ list( APPEND clSPARSE.Cmake.Args -DGTEST_INCLUDE_DIR=${GTEST_INCLUDE_DIR} )
|
|
||||||
+ endif( )
|
|
||||||
endif( )
|
|
||||||
endif( )
|
|
||||||
|
|
||||||
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