summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/elemental/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/elemental/package.py')
-rw-r--r--var/spack/repos/builtin/packages/elemental/package.py37
1 files changed, 21 insertions, 16 deletions
diff --git a/var/spack/repos/builtin/packages/elemental/package.py b/var/spack/repos/builtin/packages/elemental/package.py
index d86ee985f7..87317bd909 100644
--- a/var/spack/repos/builtin/packages/elemental/package.py
+++ b/var/spack/repos/builtin/packages/elemental/package.py
@@ -33,11 +33,10 @@ class Elemental(CMakePackage):
homepage = "http://libelemental.org"
url = "https://github.com/elemental/Elemental/archive/v0.87.6.tar.gz"
+ version('master', git='https://github.com/elemental/Elemental.git', branch='master')
version('0.87.7', '6c1e7442021c59a36049e37ea69b8075')
version('0.87.6', '9fd29783d45b0a0e27c0df85f548abe9')
- variant('debug', default=False,
- description='Builds a debug version of the libraries')
variant('shared', default=True,
description='Enables the build of shared libraries')
variant('hybrid', default=True,
@@ -54,6 +53,8 @@ class Elemental(CMakePackage):
description='Enable quad precision')
variant('int64', default=False,
description='Use 64bit integers')
+ variant('cublas', default=False,
+ description='Enable cuBLAS for local BLAS operations')
# When this variant is set remove the normal dependencies since
# Elemental has to build BLAS and ScaLAPACK internally
variant('int64_blas', default=False,
@@ -61,15 +62,24 @@ class Elemental(CMakePackage):
' Requires local build of BLAS library.')
variant('scalapack', default=False,
description='Build with ScaLAPACK library')
+ variant('build_type', default='Release',
+ description='The build type to build',
+ values=('Debug', 'Release'))
+ variant('blas', default='openblas', values=('openblas', 'mkl'),
+ description='Enable the use of OpenBlas/MKL')
- # Note that this forces us to use OpenBLAS until #1712 is fixed
+ # 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
# Allow Elemental to build internally when using 8-byte ints
- depends_on('openblas +openmp', when='+openmp_blas ~int64_blas')
+ depends_on('openblas +openmp', when='blas=openblas +openmp_blas ~int64_blas')
+
+ depends_on('intel-mkl', when="blas=mkl ~openmp_blas ~int64_blas")
+ depends_on('intel-mkl +openmp', when='blas=mkl +openmp_blas ~int64_blas')
+ depends_on('intel-mkl@2017.1 +openmp +ilp64', when='blas=mkl +openmp_blas +int64_blas')
# Note that this forces us to use OpenBLAS until #1712 is fixed
- depends_on('lapack', when='~openmp_blas')
+ depends_on('lapack', when='blas=openblas ~openmp_blas')
depends_on('metis')
depends_on('metis +int64', when='+int64')
depends_on('mpi')
@@ -77,6 +87,11 @@ class Elemental(CMakePackage):
depends_on('scalapack', when='+scalapack ~int64_blas')
extends('python', when='+python')
depends_on('python@:2.8', when='+python')
+ depends_on('gmp')
+ depends_on('mpc')
+ depends_on('mpfr')
+
+ patch('elemental_cublas.patch', when='+cublas')
@property
def libs(self):
@@ -85,15 +100,6 @@ class Elemental(CMakePackage):
'libEl', root=self.prefix, shared=shared, recurse=True
)
- def build_type(self):
- """Returns the correct value for the ``CMAKE_BUILD_TYPE`` variable
- :return: value for ``CMAKE_BUILD_TYPE``
- """
- if '+debug' in self.spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
spec = self.spec
@@ -134,8 +140,7 @@ class Elemental(CMakePackage):
math_libs = spec['scalapack'].libs + math_libs
args.extend([
- '-DMATH_LIBS:STRING={0}'.format(math_libs.search_flags),
- '-DMATH_LIBS:STRING={0}'.format(math_libs.link_flags)])
+ '-DMATH_LIBS:STRING={0}'.format(math_libs.ld_flags)])
if '+python' in spec:
args.extend([