summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
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),