summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorStephen McDowell <svenevs@users.noreply.github.com>2017-05-10 09:13:14 -0400
committerAdam J. Stewart <ajstewart426@gmail.com>2017-05-10 08:13:14 -0500
commitc0ceece9ccc251a8f9c0dd51b0504bd54d9dfae5 (patch)
treef22f7853854d36ebaae4390cba9040a9385c29f5 /var
parentb5eb298f3efde1ae32545a3363bed46e1811ab76 (diff)
downloadspack-c0ceece9ccc251a8f9c0dd51b0504bd54d9dfae5.tar.gz
spack-c0ceece9ccc251a8f9c0dd51b0504bd54d9dfae5.tar.bz2
spack-c0ceece9ccc251a8f9c0dd51b0504bd54d9dfae5.tar.xz
spack-c0ceece9ccc251a8f9c0dd51b0504bd54d9dfae5.zip
enable cuda support for suite-sparse (#4163)
* enable cuda support for suite-sparse * do not use spec.satisfies * cuda restructure, give clearer comment of why * str format compatibility * flake8 checks
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/suite-sparse/package.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py
index 375af78a48..ab0df75410 100644
--- a/var/spack/repos/builtin/packages/suite-sparse/package.py
+++ b/var/spack/repos/builtin/packages/suite-sparse/package.py
@@ -37,8 +37,9 @@ class SuiteSparse(Package):
version('4.5.3', '8ec57324585df3c6483ad7f556afccbd')
version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319')
- variant('tbb', default=False, description='Build with Intel TBB')
- variant('pic', default=True, description='Build position independent code (required to link with shared libraries)')
+ variant('tbb', default=False, description='Build with Intel TBB')
+ variant('pic', default=True, description='Build position independent code (required to link with shared libraries)')
+ variant('cuda', default=False, description='Build with CUDA')
depends_on('blas')
depends_on('lapack')
@@ -48,6 +49,8 @@ class SuiteSparse(Package):
# flags does not seem to be used, which leads to linking errors on Linux.
depends_on('tbb', when='@4.5.3:+tbb')
+ depends_on('cuda', when='+cuda')
+
patch('tbb_453.patch', when='@4.5.3:+tbb')
def install(self, spec, prefix):
@@ -65,19 +68,16 @@ class SuiteSparse(Package):
'CC=%s' % self.compiler.cc,
'CXX=%s' % self.compiler.cxx,
'F77=%s' % self.compiler.f77,
- 'CUDA_ROOT =',
- 'GPU_BLAS_PATH =',
- 'GPU_CONFIG =',
- 'CUDA_PATH =',
- 'CUDART_LIB =',
- 'CUBLAS_LIB =',
- 'CUDA_INC_PATH =',
- 'NV20 =',
- 'NV30 =',
- 'NV35 =',
- 'NVCC = echo',
- 'NVCCFLAGS =',
+ # CUDA=no does NOT disable cuda, it only disables internal search
+ # for CUDA_PATH. If in addition the latter is empty, then CUDA is
+ # completely disabled. See
+ # [SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk] for more.
+ 'CUDA=no',
+ 'CUDA_PATH={0}'.format(
+ spec['cuda'].prefix if '+cuda' in spec else ''
+ )
])
+
if '+pic' in spec:
make_args.extend([
'CFLAGS={0}'.format(self.compiler.pic_flag),