Adding support for the Accelerate library on OS X (#7068)
* Adding support for the Accelerate library on OS X * Fixed guard on variable and added another depends_on statement to make sure that openblas gets selected even when openmp_blas variant is not turned on.
This commit is contained in:
parent
fa65725263
commit
c3034b53e3
1 changed files with 7 additions and 2 deletions
|
@ -69,8 +69,8 @@ class Elemental(CMakePackage):
|
|||
variant('build_type', default='Release',
|
||||
description='The build type to build',
|
||||
values=('Debug', 'Release'))
|
||||
variant('blas', default='openblas', values=('openblas', 'mkl', 'essl'),
|
||||
description='Enable the use of OpenBlas/MKL/ESSL')
|
||||
variant('blas', default='openblas', values=('openblas', 'mkl', 'accelerate', 'essl'),
|
||||
description='Enable the use of OpenBlas/MKL/Accelerate/ESSL')
|
||||
variant('mpfr', default=False,
|
||||
description='Support GNU MPFR\'s'
|
||||
'arbitrary-precision floating-point arithmetic')
|
||||
|
@ -78,6 +78,7 @@ class Elemental(CMakePackage):
|
|||
# Note that #1712 forces us to enumerate the different blas variants
|
||||
depends_on('blas', when='~openmp_blas ~int64_blas')
|
||||
# Hack to forward variant to openblas package
|
||||
depends_on('openblas', when='blas=openblas ~openmp_blas ~int64_blas')
|
||||
# Allow Elemental to build internally when using 8-byte ints
|
||||
depends_on('openblas threads=openmp', when='blas=openblas +openmp_blas ~int64_blas')
|
||||
|
||||
|
@ -85,6 +86,8 @@ class Elemental(CMakePackage):
|
|||
depends_on('intel-mkl threads=openmp', when='blas=mkl +openmp_blas ~int64_blas')
|
||||
depends_on('intel-mkl@2017.1 +openmp +ilp64', when='blas=mkl +openmp_blas +int64_blas')
|
||||
|
||||
depends_on('veclibfort', when='blas=accelerate')
|
||||
|
||||
depends_on('essl -cuda', when='blas=essl -openmp_blas ~int64_blas')
|
||||
depends_on('essl threads=openmp', when='blas=essl +openmp_blas ~int64_blas')
|
||||
|
||||
|
@ -229,6 +232,8 @@ def cmake_args(self):
|
|||
elif 'blas=mkl' in spec:
|
||||
args.extend([
|
||||
'-DHydrogen_USE_MKL:BOOL=%s' % ('blas=mkl' in spec)])
|
||||
elif 'blas=accelerate' in spec:
|
||||
args.extend(['-DHydrogen_USE_ACCELERATE:BOOL=TRUE'])
|
||||
elif 'blas=essl' in spec:
|
||||
args.extend([
|
||||
'-DHydrogen_USE_ESSL:BOOL=%s' % ('blas=essl' in spec)])
|
||||
|
|
Loading…
Reference in a new issue