summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Knieps <alexanderrobom@web.de>2019-12-01 20:34:26 +0100
committerAdam J. Stewart <ajstewart426@gmail.com>2019-12-01 13:34:26 -0600
commit8e3ff9b39c8e9ecd9549c04ceef6665fdc6c11b1 (patch)
tree0f970eb30d1ae87b6dfeb499f8333e17830d635a
parentc7568c91468b69482225bd1e8d060ce049c31e71 (diff)
downloadspack-8e3ff9b39c8e9ecd9549c04ceef6665fdc6c11b1.tar.gz
spack-8e3ff9b39c8e9ecd9549c04ceef6665fdc6c11b1.tar.bz2
spack-8e3ff9b39c8e9ecd9549c04ceef6665fdc6c11b1.tar.xz
spack-8e3ff9b39c8e9ecd9549c04ceef6665fdc6c11b1.zip
dealii: Added 'threads' variant that controls the TBB dependency (#13931)
* dealii: Added 'threads' variant that controls the DEAL_II_WITH_THREADS cmake option and the dependency on Intel TBB * Update var/spack/repos/builtin/packages/dealii/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 9f1796f5b4..3dc407fa11 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -66,6 +66,8 @@ class Dealii(CMakePackage, CudaPackage):
description='Compile with Slepc (only with Petsc and MPI)')
variant('symengine', default=True,
description='Compile with SymEngine')
+ variant('threads', default=True,
+ description='Compile with multi-threading via TBB')
variant('trilinos', default=True,
description='Compile with Trilinos (only with MPI)')
variant('python', default=False,
@@ -110,7 +112,6 @@ class Dealii(CMakePackage, CudaPackage):
depends_on('bzip2', when='@:8.99')
depends_on('lapack')
depends_on('suite-sparse')
- depends_on('tbb')
depends_on('zlib')
# optional dependencies
@@ -159,6 +160,7 @@ class Dealii(CMakePackage, CudaPackage):
# depends_on("symengine@0.4: build_type=Release", when="@9.1:+symengine+trilinos^trilinos~debug") # NOQA: ignore=E501
# depends_on("symengine@0.4: build_type=Debug", when="@9.1:+symengine+trilinos^trilinos+debug") # NOQA: ignore=E501
depends_on('symengine@0.4:', when='@9.1:+symengine')
+ depends_on('tbb', when='+threads')
# do not require +rol to make concretization of xsdk possible
depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos', when='+trilinos+mpi~int64~cuda')
depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos~hypre', when='+trilinos+mpi+int64~cuda')
@@ -233,7 +235,6 @@ class Dealii(CMakePackage, CudaPackage):
lapack_blas_headers = spec['lapack'].headers + spec['blas'].headers
options.extend([
'-DDEAL_II_COMPONENT_EXAMPLES=ON',
- '-DDEAL_II_WITH_THREADS:BOOL=ON',
'-DBOOST_DIR=%s' % spec['boost'].prefix,
# CMake's FindBlas/Lapack may pickup system's blas/lapack instead
# of Spack's. Be more specific to avoid this.
@@ -247,7 +248,13 @@ class Dealii(CMakePackage, CudaPackage):
'-DDEAL_II_ALLOW_BUNDLED=OFF'
])
- if (spec.satisfies('^intel-parallel-studio+tbb')):
+ if '+threads' in spec:
+ options.append('-DDEAL_II_WITH_THREADS:BOOL=ON')
+ else:
+ options.extend(['-DDEAL_II_WITH_THREADS:BOOL=OFF'])
+
+ if (spec.satisfies('^intel-parallel-studio+tbb')
+ and '+threads' in spec):
# deal.II/cmake will have hard time picking up TBB from Intel.
tbb_ver = '.'.join(('%s' % spec['tbb'].version).split('.')[1:])
options.extend([