summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth R. Johnson <johnsonsr@ornl.gov>2021-07-01 05:13:21 -0400
committerGitHub <noreply@github.com>2021-07-01 03:13:21 -0600
commit406117148d3e416e518eb911b0768716b00245d6 (patch)
treea2bfa027c87ebe4380cfd5755c3f8cc3bc104ace
parente6700d47aa7e4978bcb3c0241b8908d72a078257 (diff)
downloadspack-406117148d3e416e518eb911b0768716b00245d6.tar.gz
spack-406117148d3e416e518eb911b0768716b00245d6.tar.bz2
spack-406117148d3e416e518eb911b0768716b00245d6.tar.xz
spack-406117148d3e416e518eb911b0768716b00245d6.zip
trilinos: improve behavior of `gotype` (#24565)
* trilinos: add teko conflict * trilinos: improve gotype variant Instead of 'none' and 'long' typically being the same (but not for older trilinos versions), add an explicit 'all' variant that only works for older trilinos which supports multiple simultaneous tpetra instantiations. * trilinos: add self as maintainer * trilinos: disable vendored gtest by default
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py33
1 files changed, 15 insertions, 18 deletions
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index cc42c5eeaa..cf03fa5ec5 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -5,6 +5,7 @@
import os
import sys
+
from spack import *
from spack.operating_systems.mac_os import macos_version
from spack.pkg.builtin.kokkos import Kokkos
@@ -29,7 +30,7 @@ class Trilinos(CMakePackage, CudaPackage):
url = "https://github.com/trilinos/Trilinos/archive/trilinos-release-12-12-1.tar.gz"
git = "https://github.com/trilinos/Trilinos.git"
- maintainers = ['keitat']
+ maintainers = ['keitat', 'sethrj']
# ###################### Versions ##########################
@@ -70,7 +71,7 @@ class Trilinos(CMakePackage, CudaPackage):
variant('float', default=False,
description='Enable single precision (float) numbers in Trilinos')
variant('gotype', default='long',
- values=('none', 'int', 'long', 'long_long'),
+ values=('int', 'long', 'long_long', 'all'),
multi=False,
description='global ordinal type for Tpetra')
variant('fortran', default=True,
@@ -100,7 +101,7 @@ class Trilinos(CMakePackage, CudaPackage):
description='Enable ADIOS2')
variant('glm', default=True,
description='Compile with GLM')
- variant('gtest', default=True,
+ variant('gtest', default=False,
description='Compile with Gtest')
variant('hdf5', default=True,
description='Compile with HDF5')
@@ -306,6 +307,7 @@ class Trilinos(CMakePackage, CudaPackage):
conflicts('+teko', when='~ml')
conflicts('+teko', when='~teuchos')
conflicts('+teko', when='~tpetra')
+ conflicts('+teko', when='gotype=long')
conflicts('+tempus', when='~nox')
conflicts('+tempus', when='~teuchos')
conflicts('+tpetra', when='~kokkos')
@@ -369,12 +371,15 @@ class Trilinos(CMakePackage, CudaPackage):
conflicts('+scorec', when='~stk')
conflicts('+scorec', when='~zoltan')
+ # Multi-value gotype only applies to trilinos through 12.14
+ conflicts('gotype=all', when='@12.15:')
+
# All compilers except for pgi are in conflict:
for __compiler in spack.compilers.supported_compilers():
if __compiler != 'clang':
conflicts('+cuda', when='~wrapper %{0}'.format(__compiler),
- msg='trilinos~wrapper+cuda can only be built with the\
- Clang compiler')
+ msg='trilinos~wrapper+cuda can only be built with the '
+ 'Clang compiler')
# ###################### Dependencies ##########################
@@ -875,21 +880,13 @@ class Trilinos(CMakePackage, CudaPackage):
])
gotype = spec.variants['gotype'].value
- # default in older Trilinos versions to enable multiple GOs
- if ((gotype == 'none') and spec.satisfies('@:12.14.1')):
- options.extend([
- '-DTpetra_INST_INT_INT:BOOL=ON',
- '-DTpetra_INST_INT_LONG:BOOL=ON',
- '-DTpetra_INST_INT_LONG_LONG:BOOL=ON'
- ])
- # set default GO in newer versions to long
- elif (gotype == 'none'):
+ if gotype == 'all':
+ # default in older Trilinos versions to enable multiple GOs
options.extend([
- '-DTpetra_INST_INT_INT:BOOL=OFF',
- '-DTpetra_INST_INT_LONG:BOOL=ON',
- '-DTpetra_INST_INT_LONG_LONG:BOOL=OFF'
+ define('Tpetra_INST_INT_INT', True),
+ define('Tpetra_INST_INT_LONG', True),
+ define('Tpetra_INST_INT_LONG_LONG', True),
])
- # if another GO is specified, use this
else:
options.extend([
define('Tpetra_INST_INT_INT', gotype == 'int'),