Updating Trilinos with superlu variant and fixing git branch version options. (#2604)

This commit is contained in:
Jon Rood 2016-12-16 15:14:50 -07:00 committed by becker33
parent 36072c4776
commit d7ff4b8f34

View file

@ -45,7 +45,10 @@ class Trilinos(CMakePackage):
homepage = "https://trilinos.org/" homepage = "https://trilinos.org/"
base_url = "https://github.com/trilinos/Trilinos/archive" 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.10.1', '40f28628b63310f9bd17c26d9ebe32b1')
version('12.8.1', '01c0026f1e2050842857db941060ecd5') version('12.8.1', '01c0026f1e2050842857db941060ecd5')
version('12.6.4', 'c2ea7b5aa0d10bcabdb9b9a6e3bac3ea') version('12.6.4', 'c2ea7b5aa0d10bcabdb9b9a6e3bac3ea')
@ -71,6 +74,8 @@ def url_for_version(self, version):
description='Compile with support for MUMPS solvers') description='Compile with support for MUMPS solvers')
variant('superlu-dist', default=True, variant('superlu-dist', default=True,
description='Compile with SuperluDist solvers') description='Compile with SuperluDist solvers')
variant('superlu', default=False,
description='Compile with SuperLU solvers')
variant('hypre', default=True, variant('hypre', default=True,
description='Compile with Hypre preconditioner') description='Compile with Hypre preconditioner')
variant('hdf5', default=True, description='Compile with HDF5') variant('hdf5', default=True, description='Compile with HDF5')
@ -111,6 +116,7 @@ def url_for_version(self, version):
depends_on('scalapack', when='+mumps') depends_on('scalapack', when='+mumps')
depends_on('superlu-dist@:4.3', when='@:12.6.1+superlu-dist') 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-dist', when='@12.6.2:+superlu-dist')
depends_on('superlu+fpic@4.3', when='+superlu')
depends_on('hypre~internal-superlu', when='+hypre') depends_on('hypre~internal-superlu', when='+hypre')
depends_on('hdf5+mpi', when='+hdf5') depends_on('hdf5+mpi', when='+hdf5')
depends_on('python', when='+python') depends_on('python', when='+python')
@ -127,6 +133,10 @@ def variants_check(self):
# working. # working.
raise RuntimeError('The superlu-dist variant can only be used' + raise RuntimeError('The superlu-dist variant can only be used' +
' with Trilinos @12.0.1:') ' 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): def cmake_args(self):
spec = self.spec spec = self.spec
@ -320,6 +330,20 @@ def cmake_args(self):
'-DTPL_ENABLE_SuperLUDist:BOOL=OFF', '-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 # python
if '+python' in spec: if '+python' in spec:
options.extend([ options.extend([