trilinos: extend TPetra explicit instantiations and fix missing Teuchos counterparts (#9448)
This commit is contained in:
parent
5ebdc6076f
commit
ab099e9ba3
@ -77,12 +77,14 @@ class Trilinos(CMakePackage):
|
|||||||
description='Build python wrappers')
|
description='Build python wrappers')
|
||||||
|
|
||||||
# Build options
|
# Build options
|
||||||
|
variant('complex', default=False,
|
||||||
|
description='Enable complex numbers in Trilinos')
|
||||||
|
variant('explicit_template_instantiation', default=True,
|
||||||
|
description='Enable explicit template instantiation (ETI)')
|
||||||
|
variant('float', default=False,
|
||||||
|
description='Enable single precision (float) numbers in Trilinos')
|
||||||
variant('fortran', default=True,
|
variant('fortran', default=True,
|
||||||
description='Compile with Fortran support')
|
description='Compile with Fortran support')
|
||||||
variant('instantiate', default=True,
|
|
||||||
description='Compile with explicit instantiation')
|
|
||||||
variant('instantiate_cmplx', default=False,
|
|
||||||
description='Compile with explicit instantiation for complex')
|
|
||||||
variant('openmp', default=False,
|
variant('openmp', default=False,
|
||||||
description='Enable OpenMP')
|
description='Enable OpenMP')
|
||||||
variant('shared', default=True,
|
variant('shared', default=True,
|
||||||
@ -261,6 +263,14 @@ class Trilinos(CMakePackage):
|
|||||||
# For Trilinos v11 we need to force SuperLUDist=OFF, since only the
|
# For Trilinos v11 we need to force SuperLUDist=OFF, since only the
|
||||||
# deprecated SuperLUDist v3.3 together with an Amesos patch is working.
|
# deprecated SuperLUDist v3.3 together with an Amesos patch is working.
|
||||||
conflicts('+superlu-dist', when='@11.4.1:11.14.3')
|
conflicts('+superlu-dist', when='@11.4.1:11.14.3')
|
||||||
|
# see https://github.com/trilinos/Trilinos/issues/3566
|
||||||
|
conflicts('+superlu-dist', when='+float+amesos2+explicit_template_instantiation^superlu-dist@5.3.0:')
|
||||||
|
# Amesos, conflicting types of double and complex SLU_D
|
||||||
|
# see
|
||||||
|
# https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html
|
||||||
|
# and
|
||||||
|
# https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html
|
||||||
|
conflicts('+superlu-dist', when='+complex+amesos2')
|
||||||
# PnetCDF was only added after v12.10.1
|
# PnetCDF was only added after v12.10.1
|
||||||
conflicts('+pnetcdf', when='@0:12.10.1')
|
conflicts('+pnetcdf', when='@0:12.10.1')
|
||||||
|
|
||||||
@ -581,13 +591,7 @@ def cmake_args(self):
|
|||||||
])
|
])
|
||||||
|
|
||||||
if '+superlu-dist' in spec:
|
if '+superlu-dist' in spec:
|
||||||
# Amesos, conflicting types of double and complex SLU_D
|
|
||||||
# see
|
|
||||||
# https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html
|
|
||||||
# and
|
|
||||||
# https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html
|
|
||||||
options.extend([
|
options.extend([
|
||||||
'-DTeuchos_ENABLE_COMPLEX:BOOL=OFF',
|
|
||||||
'-DKokkosTSQR_ENABLE_Complex:BOOL=OFF'
|
'-DKokkosTSQR_ENABLE_Complex:BOOL=OFF'
|
||||||
])
|
])
|
||||||
options.extend([
|
options.extend([
|
||||||
@ -649,7 +653,7 @@ def cmake_args(self):
|
|||||||
])
|
])
|
||||||
else:
|
else:
|
||||||
options.extend([
|
options.extend([
|
||||||
'-DTPL_ENABLE_GGNS:BOOL=OFF'
|
'-DTPL_ENABLE_CGNS:BOOL=OFF'
|
||||||
])
|
])
|
||||||
|
|
||||||
# ################# Miscellaneous Stuff ######################
|
# ################# Miscellaneous Stuff ######################
|
||||||
@ -677,19 +681,34 @@ def cmake_args(self):
|
|||||||
'-DTrilinos_ENABLE_Fortran=ON'
|
'-DTrilinos_ENABLE_Fortran=ON'
|
||||||
])
|
])
|
||||||
|
|
||||||
# Explicit instantiation
|
float_s = 'ON' if '+float' in spec else 'OFF'
|
||||||
if '+instantiate' in spec:
|
complex_s = 'ON' if '+complex' in spec else 'OFF'
|
||||||
|
complex_float_s = 'ON' if ('+complex' in spec and
|
||||||
|
'+float' in spec) else 'OFF'
|
||||||
|
if '+teuchos' in spec:
|
||||||
options.extend([
|
options.extend([
|
||||||
'-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON'
|
'-DTeuchos_ENABLE_COMPLEX=%s' % complex_s,
|
||||||
|
'-DTeuchos_ENABLE_FLOAT=%s' % float_s
|
||||||
|
])
|
||||||
|
|
||||||
|
# Explicit Template Instantiation (ETI) in Tpetra
|
||||||
|
# NOTE: Trilinos will soon move to fixed std::uint64_t for GO and
|
||||||
|
# std::int32_t or std::int64_t for local.
|
||||||
|
options.append(
|
||||||
|
'-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=%s' % (
|
||||||
|
'ON' if '+explicit_template_instantiation' in spec else 'OFF'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if '+explicit_template_instantiation' in spec and '+tpetra' in spec:
|
||||||
|
options.extend([
|
||||||
|
'-DTpetra_INST_DOUBLE:BOOL=ON',
|
||||||
|
'-DTpetra_INST_INT_LONG:BOOL=ON',
|
||||||
|
'-DTpetra_INST_COMPLEX_DOUBLE=%s' % complex_s,
|
||||||
|
'-DTpetra_INST_COMPLEX_FLOAT=%s' % complex_float_s,
|
||||||
|
'-DTpetra_INST_FLOAT=%s' % float_s,
|
||||||
|
'-DTpetra_INST_SERIAL=ON'
|
||||||
])
|
])
|
||||||
if '+tpetra' in spec:
|
|
||||||
options.extend([
|
|
||||||
'-DTpetra_INST_DOUBLE:BOOL=ON',
|
|
||||||
'-DTpetra_INST_INT_LONG:BOOL=ON'
|
|
||||||
'-DTpetra_INST_COMPLEX_DOUBLE=%s' % (
|
|
||||||
'ON' if '+instantiate_cmplx' in spec else 'OFF'
|
|
||||||
)
|
|
||||||
])
|
|
||||||
|
|
||||||
# disable due to compiler / config errors:
|
# disable due to compiler / config errors:
|
||||||
if spec.satisfies('%xl') or spec.satisfies('%xl_r'):
|
if spec.satisfies('%xl') or spec.satisfies('%xl_r'):
|
||||||
|
Loading…
Reference in New Issue
Block a user