summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSinan <sbulutw@gmail.com>2020-06-30 06:05:08 -0700
committerGitHub <noreply@github.com>2020-06-30 08:05:08 -0500
commit6d46fbb6f73f71e135334be774dffb9c3bd21f1a (patch)
tree22539cbfa3c40660f82ad82e9fff7525f0911d1c
parent6fb30acb77788d7fff88d8668f425b2fa82d6aed (diff)
downloadspack-6d46fbb6f73f71e135334be774dffb9c3bd21f1a.tar.gz
spack-6d46fbb6f73f71e135334be774dffb9c3bd21f1a.tar.bz2
spack-6d46fbb6f73f71e135334be774dffb9c3bd21f1a.tar.xz
spack-6d46fbb6f73f71e135334be774dffb9c3bd21f1a.zip
New package/graphblast (#17289)
* new package: GraphBlast * polish * add cuda_arch setup * flake8 * the package requires cuda variant and dependency * add comments * define cuda_arch * implement multiple and custom cuda arches * tidy up, improve * flake8 * improve style * add variant description * use patch method, add new version for latest commit building since master now fails * remove gcc conflict, tidy up * also indicate build range for boost Co-authored-by: Sinan81 <sbulut@3vgeomatics.com> Co-authored-by: Sinan81 <Sinan81@github>
-rw-r--r--var/spack/repos/builtin/packages/graphblast/package.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/graphblast/package.py b/var/spack/repos/builtin/packages/graphblast/package.py
new file mode 100644
index 0000000000..59ef3d3cb3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/graphblast/package.py
@@ -0,0 +1,42 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Graphblast(MakefilePackage, CudaPackage):
+ """High-Performance Linear Algebra-based Graph Primitives on GPUs"""
+
+ homepage = "https://github.com/gunrock/graphblast"
+ git = "https://github.com/gunrock/graphblast.git"
+
+ version('master', submodules=True)
+ version('2020-05-07', submodules=True, commit='1a052558a71f2cd67f5d6fe9db3b274c303ef8f6', preferred=True)
+
+ variant('cuda', default=True, description="Build with Cuda support")
+
+ depends_on('boost +program_options')
+
+ # This package is confirmed to compile with:
+ # gcc@:5.4.0,7.5.0 , boost@1.58.0:1.60.0 , cuda@9:
+
+ # TODO: the package doesn't compile as CMakePackage
+ # once that is fixed it should be converted to a CMakePackage type.
+
+ conflicts('cuda_arch=none', when='+cuda',
+ msg='Must specify CUDA compute capabilities of your GPU. \
+See "spack info graphblast"')
+
+ def install(self, spec, prefix):
+ install_tree(self.build_directory, self.prefix)
+
+ def patch(self):
+ cuda_arch_list = self.spec.variants['cuda_arch'].value
+ arches = 'ARCH = '
+ for i in cuda_arch_list:
+ arches = arches +\
+ ' -gencode arch=compute_{0},code=compute_{0}'.format(i)
+ makefile = FileFilter('common.mk')
+ makefile.filter(r'^ARCH =.*', arches)