cherry-picking global ordinal type variant from https://github.com/spack/spack/pull/14215 and setting dealii to GO int, to make it compile again (#15288)

Co-authored-by: Andrey Prokopenko <andrey.prok@gmail.com>
This commit is contained in:
Mathias Anselmann 2020-03-03 18:26:20 +01:00 committed by GitHub
parent c4237e4a10
commit d6b0cf75ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -151,6 +151,7 @@ class Dealii(CMakePackage, CudaPackage):
depends_on('slepc@:3.6.3', when='@:8.4.1+slepc+petsc+mpi')
depends_on('slepc~arpack', when='+slepc+petsc+mpi+int64')
depends_on('sundials@:3~pthread', when='@9.0:+sundials')
depends_on('trilinos gotype=int', when='+trilinos')
# Both Trilinos and SymEngine bundle the Teuchos RCP library.
# This leads to conflicts between macros defined in the included
# headers when they are not compiled in the same mode.

View File

@ -66,6 +66,10 @@ class Trilinos(CMakePackage):
description='Enable explicit template instantiation (ETI)')
variant('float', default=False,
description='Enable single precision (float) numbers in Trilinos')
variant('gotype', default='long',
values=('int', 'long', 'long_long'),
multi=False,
description='global ordinal type for Tpetra')
variant('fortran', default=True,
description='Compile with Fortran support')
variant('openmp', default=False,
@ -744,10 +748,15 @@ def cmake_args(self):
)
if '+explicit_template_instantiation' in spec and '+tpetra' in spec:
gotype = spec.variants['gotype'].value
options.extend([
'-DTpetra_INST_DOUBLE:BOOL=ON',
'-DTpetra_INST_INT_LONG:BOOL=ON',
'-DTpetra_INST_INT_LONG_LONG:BOOL=ON',
'-DTpetra_INST_INT_INT:BOOL=%s' % (
'ON' if gotype == 'int' else 'OFF'),
'-DTpetra_INST_INT_LONG:BOOL=%s' % (
'ON' if gotype == 'long' else 'OFF'),
'-DTpetra_INST_INT_LONG_LONG:BOOL=%s' % (
'ON' if gotype == 'long_long' else 'OFF'),
'-DTpetra_INST_COMPLEX_DOUBLE=%s' % complex_s,
'-DTpetra_INST_COMPLEX_FLOAT=%s' % complex_float_s,
'-DTpetra_INST_FLOAT=%s' % float_s,