summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelly (KT) Thompson <KineticTheory@users.noreply.github.com>2020-03-18 16:05:51 -0600
committerGitHub <noreply@github.com>2020-03-18 17:05:51 -0500
commit1bcc80ec5d579c733b527bcbca5cad95fa0a3986 (patch)
tree5f9322490f70190ee9b44f17cd316c937c9fe7e5
parent432bdeee85edc7fce6b2de100daa2af8d498404f (diff)
downloadspack-1bcc80ec5d579c733b527bcbca5cad95fa0a3986.tar.gz
spack-1bcc80ec5d579c733b527bcbca5cad95fa0a3986.tar.bz2
spack-1bcc80ec5d579c733b527bcbca5cad95fa0a3986.tar.xz
spack-1bcc80ec5d579c733b527bcbca5cad95fa0a3986.zip
Trilinos: Add more variants (~netcdf ~matio ~glm) (#15483)
* Trilinos: Add more variants + Provide three new variants to allow building trilinos without netcdf, matio, or glm. + No change to defaults. * Fix style issue.
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py33
1 files changed, 25 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 66e281f28b..fd623fe8db 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -86,18 +86,24 @@ class Trilinos(CMakePackage):
description='Compile with Boost')
variant('cgns', default=False,
description='Enable CGNS')
- variant('adios2', default=False,
+ variant('adios2', default=False,
description='Enable ADIOS2')
+ variant('glm', default=True,
+ description='Compile with GLM')
variant('gtest', default=True,
description='Compile with Gtest')
variant('hdf5', default=True,
description='Compile with HDF5')
variant('hypre', default=True,
description='Compile with Hypre preconditioner')
+ variant('matio', default=True,
+ description='Compile with Matio')
variant('metis', default=True,
description='Compile with METIS and ParMETIS')
variant('mumps', default=True,
description='Compile with support for MUMPS solvers')
+ variant('netcdf', default=True,
+ description='Compile with netcdf')
variant('pnetcdf', default=False,
description='Compile with parallel-netcdf')
variant('suite-sparse', default=True,
@@ -312,6 +318,8 @@ class Trilinos(CMakePackage):
# ADIOS2 was only added after v12.14.1
conflicts('+adios2', when='@:12.14.1')
conflicts('+adios2', when='@xsdk-0.2.0')
+ conflicts('+pnetcdf', when='~netcdf')
+
# ###################### Dependencies ##########################
# Everything should be compiled position independent (-fpic)
@@ -319,17 +327,17 @@ class Trilinos(CMakePackage):
depends_on('lapack')
depends_on('boost', when='+boost')
depends_on('boost', when='+dtk')
- depends_on('matio')
- depends_on('glm')
+ depends_on('matio', when='+matio')
+ depends_on('glm', when='+glm')
depends_on('metis@5:', when='+metis')
depends_on('suite-sparse', when='+suite-sparse')
depends_on('zlib', when="+zlib")
# MPI related dependencies
depends_on('mpi')
- depends_on('netcdf-c+mpi', when="~pnetcdf")
- depends_on('netcdf-c+mpi+parallel-netcdf', when="+pnetcdf@master,12.12.1:")
- depends_on('parallel-netcdf', when="+pnetcdf@master,12.12.1:")
+ depends_on('netcdf-c+mpi', when="+netcdf~pnetcdf")
+ depends_on('netcdf-c+mpi+parallel-netcdf', when="+netcdf+pnetcdf@master,12.12.1:")
+ depends_on('parallel-netcdf', when="+netcdf+pnetcdf@master,12.12.1:")
depends_on('parmetis', when='+metis')
depends_on('cgns', when='+cgns')
depends_on('adios2', when='+adios2')
@@ -537,14 +545,23 @@ class Trilinos(CMakePackage):
'-DTPL_ENABLE_LAPACK=ON',
'-DLAPACK_LIBRARY_NAMES=%s' % ';'.join(lapack.names),
'-DLAPACK_LIBRARY_DIRS=%s' % ';'.join(lapack.directories),
- '-DTPL_ENABLE_Netcdf:BOOL=ON',
- '-DNetCDF_ROOT:PATH=%s' % spec['netcdf-c'].prefix,
+ '-DTPL_ENABLE_GLM:BOOL=%s' % ('ON' if '+glm' in spec else 'OFF'),
+ '-DTPL_ENABLE_Matio:BOOL=%s' % (
+ 'ON' if '+matio' in spec else 'OFF'),
'-DTPL_ENABLE_X11:BOOL=%s' % (
'ON' if '+x11' in spec else 'OFF'),
'-DTrilinos_ENABLE_Gtest:BOOL=%s' % (
'ON' if '+gtest' in spec else 'OFF'),
])
+ if '+netcdf' in spec:
+ options.extend([
+ '-DTPL_ENABLE_Netcdf:BOOL=ON',
+ '-DNetCDF_ROOT:PATH=%s' % spec['netcdf-c'].prefix
+ ])
+ else:
+ options.extend(['-DTPL_ENABLE_Netcdf:BOOL=OFF'])
+
if '+hypre' in spec:
options.extend([
'-DTPL_ENABLE_HYPRE:BOOL=ON',