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:
parent
c4237e4a10
commit
d6b0cf75ed
@ -151,6 +151,7 @@ class Dealii(CMakePackage, CudaPackage):
|
|||||||
depends_on('slepc@:3.6.3', when='@:8.4.1+slepc+petsc+mpi')
|
depends_on('slepc@:3.6.3', when='@:8.4.1+slepc+petsc+mpi')
|
||||||
depends_on('slepc~arpack', when='+slepc+petsc+mpi+int64')
|
depends_on('slepc~arpack', when='+slepc+petsc+mpi+int64')
|
||||||
depends_on('sundials@:3~pthread', when='@9.0:+sundials')
|
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.
|
# Both Trilinos and SymEngine bundle the Teuchos RCP library.
|
||||||
# This leads to conflicts between macros defined in the included
|
# This leads to conflicts between macros defined in the included
|
||||||
# headers when they are not compiled in the same mode.
|
# headers when they are not compiled in the same mode.
|
||||||
|
@ -66,6 +66,10 @@ class Trilinos(CMakePackage):
|
|||||||
description='Enable explicit template instantiation (ETI)')
|
description='Enable explicit template instantiation (ETI)')
|
||||||
variant('float', default=False,
|
variant('float', default=False,
|
||||||
description='Enable single precision (float) numbers in Trilinos')
|
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,
|
variant('fortran', default=True,
|
||||||
description='Compile with Fortran support')
|
description='Compile with Fortran support')
|
||||||
variant('openmp', default=False,
|
variant('openmp', default=False,
|
||||||
@ -744,10 +748,15 @@ def cmake_args(self):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if '+explicit_template_instantiation' in spec and '+tpetra' in spec:
|
if '+explicit_template_instantiation' in spec and '+tpetra' in spec:
|
||||||
|
gotype = spec.variants['gotype'].value
|
||||||
options.extend([
|
options.extend([
|
||||||
'-DTpetra_INST_DOUBLE:BOOL=ON',
|
'-DTpetra_INST_DOUBLE:BOOL=ON',
|
||||||
'-DTpetra_INST_INT_LONG:BOOL=ON',
|
'-DTpetra_INST_INT_INT:BOOL=%s' % (
|
||||||
'-DTpetra_INST_INT_LONG_LONG:BOOL=ON',
|
'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_DOUBLE=%s' % complex_s,
|
||||||
'-DTpetra_INST_COMPLEX_FLOAT=%s' % complex_float_s,
|
'-DTpetra_INST_COMPLEX_FLOAT=%s' % complex_float_s,
|
||||||
'-DTpetra_INST_FLOAT=%s' % float_s,
|
'-DTpetra_INST_FLOAT=%s' % float_s,
|
||||||
|
Loading…
Reference in New Issue
Block a user