summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Ghysels <pghysels@lbl.gov>2020-11-03 10:04:12 -0800
committerGitHub <noreply@github.com>2020-11-03 12:04:12 -0600
commit8cc08bd88b9eb0d6f8c2947ac86d668100b9b9ee (patch)
tree649899b0c0cfad134dd80c7bd4b5da0a598e0282
parentcd625e597463ad6bd5880d740504bb4f49895a90 (diff)
downloadspack-8cc08bd88b9eb0d6f8c2947ac86d668100b9b9ee.tar.gz
spack-8cc08bd88b9eb0d6f8c2947ac86d668100b9b9ee.tar.bz2
spack-8cc08bd88b9eb0d6f8c2947ac86d668100b9b9ee.tar.xz
spack-8cc08bd88b9eb0d6f8c2947ac86d668100b9b9ee.zip
Trilinos: Add STRUMPACK dependency (#19560)
* Trilinos: Add STRUMPACK dependency * break long lines, flake8 cleanup * Use spec['strumpack'].libs.directories[0] instead of spec['strumpack'].prefix.lib because libraries may be in lib or lib64. Likewise use headers.directories[0] iso prefix.include. Suggested by adamjstewart
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 2b2062f1f0..37193e2d85 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -115,6 +115,8 @@ class Trilinos(CMakePackage):
description='Compile with SuperluDist solvers')
variant('superlu', default=False,
description='Compile with SuperLU solvers')
+ variant('strumpack', default=False,
+ description='Compile with STRUMPACK solvers')
variant('x11', default=False,
description='Compile with X11')
variant('zlib', default=False,
@@ -306,6 +308,8 @@ class Trilinos(CMakePackage):
# and
# https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html
conflicts('+superlu-dist', when='+complex+amesos2')
+ conflicts('+strumpack', when='@:13.0.99')
+ conflicts('+strumpack', when='~metis')
# PnetCDF was only added after v12.10.1
conflicts('+pnetcdf', when='@0:12.10.1')
# https://github.com/trilinos/Trilinos/issues/2994
@@ -356,6 +360,8 @@ class Trilinos(CMakePackage):
depends_on('superlu-dist@develop', when='@develop+superlu-dist')
depends_on('superlu-dist@xsdk-0.2.0', when='@xsdk-0.2.0+superlu-dist')
depends_on('superlu+pic@4.3', when='+superlu')
+ depends_on('strumpack+shared', when='+strumpack')
+ depends_on('scalapack', when='+strumpack+mpi')
# Trilinos can not be built against 64bit int hypre
depends_on('hypre~internal-superlu~int64', when='+hypre')
depends_on('hypre@xsdk-0.2.0~internal-superlu', when='@xsdk-0.2.0+hypre')
@@ -650,6 +656,17 @@ class Trilinos(CMakePackage):
define('SuperLU_INCLUDE_DIRS', spec['superlu'].prefix.include),
])
+ options.append(define_tpl_enable('STRUMPACK'))
+ if '+strumpack' in spec:
+ options.extend([
+ define('TPL_ENABLE_STRUMPACK', True),
+ define('Amesos2_ENABLE_STRUMPACK', True),
+ define('STRUMPACK_LIBRARY_DIRS',
+ spec['strumpack'].libs.directories[0]),
+ define('STRUMPACK_INCLUDE_DIRS',
+ spec['strumpack'].headers.directories[0]),
+ ])
+
options.append(define_tpl_enable('Pnetcdf'))
if '+pnetcdf' in spec:
options.extend([