summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index beb1b38ba5..7558430953 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -45,7 +45,10 @@ class Trilinos(CMakePackage):
homepage = "https://trilinos.org/"
base_url = "https://github.com/trilinos/Trilinos/archive"
- version('develop', git='https://github.com/trilinos/Trilinos.git', tag='master')
+ version('develop',
+ git='https://github.com/trilinos/Trilinos.git', tag='develop')
+ version('master',
+ git='https://github.com/trilinos/Trilinos.git', tag='master')
version('12.10.1', '40f28628b63310f9bd17c26d9ebe32b1')
version('12.8.1', '01c0026f1e2050842857db941060ecd5')
version('12.6.4', 'c2ea7b5aa0d10bcabdb9b9a6e3bac3ea')
@@ -71,6 +74,8 @@ class Trilinos(CMakePackage):
description='Compile with support for MUMPS solvers')
variant('superlu-dist', default=True,
description='Compile with SuperluDist solvers')
+ variant('superlu', default=False,
+ description='Compile with SuperLU solvers')
variant('hypre', default=True,
description='Compile with Hypre preconditioner')
variant('hdf5', default=True, description='Compile with HDF5')
@@ -111,6 +116,7 @@ class Trilinos(CMakePackage):
depends_on('scalapack', when='+mumps')
depends_on('superlu-dist@:4.3', when='@:12.6.1+superlu-dist')
depends_on('superlu-dist', when='@12.6.2:+superlu-dist')
+ depends_on('superlu+fpic@4.3', when='+superlu')
depends_on('hypre~internal-superlu', when='+hypre')
depends_on('hdf5+mpi', when='+hdf5')
depends_on('python', when='+python')
@@ -127,6 +133,10 @@ class Trilinos(CMakePackage):
# working.
raise RuntimeError('The superlu-dist variant can only be used' +
' with Trilinos @12.0.1:')
+ if '+superlu-dist' in self.spec and '+superlu' in self.spec:
+ # Only choose one type of superlu
+ raise RuntimeError('The superlu-dist and superlu variant' +
+ ' cannot be used together')
def cmake_args(self):
spec = self.spec
@@ -320,6 +330,20 @@ class Trilinos(CMakePackage):
'-DTPL_ENABLE_SuperLUDist:BOOL=OFF',
])
+ # superlu:
+ if '+superlu' in spec:
+ options.extend([
+ '-DTPL_ENABLE_SuperLU:BOOL=ON',
+ '-DSuperLU_LIBRARY_DIRS=%s' %
+ spec['superlu'].prefix.lib,
+ '-DSuperLU_INCLUDE_DIRS=%s' %
+ spec['superlu'].prefix.include
+ ])
+ else:
+ options.extend([
+ '-DTPL_ENABLE_SuperLU:BOOL=OFF',
+ ])
+
# python
if '+python' in spec:
options.extend([