dealii: added support for simplices, updated sundials (#20621)
This commit is contained in:
parent
c52e95d681
commit
8a7487773b
1 changed files with 40 additions and 13 deletions
|
@ -78,6 +78,7 @@ class Dealii(CMakePackage, CudaPackage):
|
||||||
description='Compile with Metis')
|
description='Compile with Metis')
|
||||||
variant('muparser', default=True,
|
variant('muparser', default=True,
|
||||||
description='Compile with muParser')
|
description='Compile with muParser')
|
||||||
|
# TODO @9.3: disable by default
|
||||||
variant('nanoflann', default=True,
|
variant('nanoflann', default=True,
|
||||||
description='Compile with Nanoflann')
|
description='Compile with Nanoflann')
|
||||||
variant('netcdf', default=False,
|
variant('netcdf', default=False,
|
||||||
|
@ -96,6 +97,14 @@ class Dealii(CMakePackage, CudaPackage):
|
||||||
description='Compile with Slepc (only with Petsc and MPI)')
|
description='Compile with Slepc (only with Petsc and MPI)')
|
||||||
variant('symengine', default=True,
|
variant('symengine', default=True,
|
||||||
description='Compile with SymEngine')
|
description='Compile with SymEngine')
|
||||||
|
# TODO @9.3: enable by default
|
||||||
|
variant('simplex', default=False,
|
||||||
|
description='Compile with Simplex support')
|
||||||
|
# TODO @9.3: enable by default, when we know what to do
|
||||||
|
# variant('taskflow', default=False,
|
||||||
|
# description='Compile with multi-threading via Taskflow')
|
||||||
|
# TODO @9.3: disable by default
|
||||||
|
# (NB: only if tbb is removed in 9.3, as planned!!!)
|
||||||
variant('threads', default=True,
|
variant('threads', default=True,
|
||||||
description='Compile with multi-threading via TBB')
|
description='Compile with multi-threading via TBB')
|
||||||
variant('trilinos', default=True,
|
variant('trilinos', default=True,
|
||||||
|
@ -159,10 +168,10 @@ class Dealii(CMakePackage, CudaPackage):
|
||||||
depends_on('ginkgo', when='@9.1:+ginkgo')
|
depends_on('ginkgo', when='@9.1:+ginkgo')
|
||||||
depends_on('gmsh+tetgen+netgen+oce', when='@9.0:+gmsh', type=('build', 'run'))
|
depends_on('gmsh+tetgen+netgen+oce', when='@9.0:+gmsh', type=('build', 'run'))
|
||||||
depends_on('gsl', when='@8.5.0:+gsl')
|
depends_on('gsl', when='@8.5.0:+gsl')
|
||||||
# FIXME: next line fixes concretization with petsc
|
# TODO: next line fixes concretization with petsc
|
||||||
depends_on('hdf5+mpi+hl+fortran', when='+hdf5+mpi+petsc')
|
depends_on('hdf5+mpi+hl+fortran', when='+hdf5+mpi+petsc')
|
||||||
depends_on('hdf5+mpi+hl', when='+hdf5+mpi~petsc')
|
depends_on('hdf5+mpi+hl', when='+hdf5+mpi~petsc')
|
||||||
# FIXME: concretizer bug. The two lines mimic what comes from PETSc
|
# TODO: concretizer bug. The two lines mimic what comes from PETSc
|
||||||
# but we should not need it
|
# but we should not need it
|
||||||
depends_on('metis@5:+int64', when='+metis+int64')
|
depends_on('metis@5:+int64', when='+metis+int64')
|
||||||
depends_on('metis@5:~int64', when='+metis~int64')
|
depends_on('metis@5:~int64', when='+metis~int64')
|
||||||
|
@ -180,15 +189,17 @@ class Dealii(CMakePackage, CudaPackage):
|
||||||
depends_on('slepc', when='+slepc+petsc+mpi')
|
depends_on('slepc', when='+slepc+petsc+mpi')
|
||||||
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:9.2+sundials')
|
||||||
# FIXME: next line fixes concretization with trilinos and adol-c
|
depends_on('sundials@5:', when='@9.3:+sundials')
|
||||||
depends_on('trilinos~exodus~netcdf', when='@9.0:+adol-c+trilinos')
|
# depends_on('taskflow', when='@9.3:+taskflow')
|
||||||
depends_on('trilinos gotype=int', when='+trilinos@12.18.1:')
|
depends_on('trilinos gotype=int', when='+trilinos@12.18.1:')
|
||||||
|
# TODO: next line fixes concretization with trilinos and adol-c
|
||||||
|
depends_on('trilinos~exodus~netcdf', when='@9.0:+adol-c+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.
|
||||||
# See https://github.com/symengine/symengine/issues/1516
|
# See https://github.com/symengine/symengine/issues/1516
|
||||||
# FIXME: uncomment when the following is fixed
|
# TODO: uncomment when the following is fixed
|
||||||
# https://github.com/spack/spack/issues/11160
|
# https://github.com/spack/spack/issues/11160
|
||||||
# depends_on("symengine@0.4: build_type=Release", when="@9.1:+symengine+trilinos^trilinos~debug") # NOQA: ignore=E501
|
# depends_on("symengine@0.4: build_type=Release", when="@9.1:+symengine+trilinos^trilinos~debug") # NOQA: ignore=E501
|
||||||
# depends_on("symengine@0.4: build_type=Debug", when="@9.1:+symengine+trilinos^trilinos+debug") # NOQA: ignore=E501
|
# depends_on("symengine@0.4: build_type=Debug", when="@9.1:+symengine+trilinos^trilinos+debug") # NOQA: ignore=E501
|
||||||
|
@ -196,12 +207,16 @@ class Dealii(CMakePackage, CudaPackage):
|
||||||
depends_on('symengine@0.6:', when='@9.2:+symengine')
|
depends_on('symengine@0.6:', when='@9.2:+symengine')
|
||||||
depends_on('tbb', when='+threads')
|
depends_on('tbb', when='+threads')
|
||||||
# do not require +rol to make concretization of xsdk possible
|
# do not require +rol to make concretization of xsdk possible
|
||||||
depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos', when='+trilinos+mpi~int64~cuda')
|
depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos',
|
||||||
depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos~hypre', when='+trilinos+mpi+int64~cuda')
|
when='+trilinos+mpi~int64~cuda')
|
||||||
# FIXME: temporary disable Tpetra when using CUDA due to
|
depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos~hypre',
|
||||||
|
when='+trilinos+mpi+int64~cuda')
|
||||||
|
# TODO: temporary disable Tpetra when using CUDA due to
|
||||||
# namespace "Kokkos::Impl" has no member "cuda_abort"
|
# namespace "Kokkos::Impl" has no member "cuda_abort"
|
||||||
depends_on('trilinos@master+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos~amesos2~ifpack2~intrepid2~kokkos~tpetra~zoltan2', when='+trilinos+mpi~int64+cuda')
|
depends_on('trilinos@master+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos~amesos2~ifpack2~intrepid2~kokkos~tpetra~zoltan2',
|
||||||
depends_on('trilinos@master+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos~hypre~amesos2~ifpack2~intrepid2~kokkos~tpetra~zoltan2', when='+trilinos+mpi+int64+cuda')
|
when='+trilinos+mpi~int64+cuda')
|
||||||
|
depends_on('trilinos@master+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos~hypre~amesos2~ifpack2~intrepid2~kokkos~tpetra~zoltan2',
|
||||||
|
when='+trilinos+mpi+int64+cuda')
|
||||||
|
|
||||||
# Explicitly provide a destructor in BlockVector,
|
# Explicitly provide a destructor in BlockVector,
|
||||||
# otherwise deal.II may fail to build with Intel compilers.
|
# otherwise deal.II may fail to build with Intel compilers.
|
||||||
|
@ -251,6 +266,13 @@ class Dealii(CMakePackage, CudaPackage):
|
||||||
'onwards. Please explicitly disable this variant '
|
'onwards. Please explicitly disable this variant '
|
||||||
'via ~{0}'.format(p))
|
'via ~{0}'.format(p))
|
||||||
|
|
||||||
|
# interfaces added in 9.3.0:
|
||||||
|
for p in ['simplex']: # , 'taskflow']:
|
||||||
|
conflicts('+{0}'.format(p), when='@:9.2',
|
||||||
|
msg='The interface to {0} is supported from version 9.3.0 '
|
||||||
|
'onwards. Please explicitly disable this variant '
|
||||||
|
'via ~{0}'.format(p))
|
||||||
|
|
||||||
# Interfaces removed in 9.3.0:
|
# Interfaces removed in 9.3.0:
|
||||||
conflicts('+nanoflann', when='@9.3.0:',
|
conflicts('+nanoflann', when='@9.3.0:',
|
||||||
msg='The interface to Nanoflann was removed from version 9.3.0. '
|
msg='The interface to Nanoflann was removed from version 9.3.0. '
|
||||||
|
@ -391,7 +413,7 @@ def cmake_args(self):
|
||||||
'deal.II only supports compilation for a single GPU!'
|
'deal.II only supports compilation for a single GPU!'
|
||||||
)
|
)
|
||||||
flags = '-arch=sm_{0}'.format(cuda_arch[0])
|
flags = '-arch=sm_{0}'.format(cuda_arch[0])
|
||||||
# FIXME: there are some compiler errors in dealii
|
# TODO: there are some compiler errors in dealii
|
||||||
# with: flags = ' '.join(self.cuda_flags(cuda_arch))
|
# with: flags = ' '.join(self.cuda_flags(cuda_arch))
|
||||||
# Stick with -arch=sm_xy for now.
|
# Stick with -arch=sm_xy for now.
|
||||||
options.append(
|
options.append(
|
||||||
|
@ -433,6 +455,11 @@ def cmake_args(self):
|
||||||
self.define('PYTHON_LIBRARY', python_library)
|
self.define('PYTHON_LIBRARY', python_library)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# Simplex support
|
||||||
|
options.append(self.define_from_variant(
|
||||||
|
'DEAL_II_WITH_SIMPLEX_SUPPORT', 'simplex'
|
||||||
|
))
|
||||||
|
|
||||||
# Threading
|
# Threading
|
||||||
options.append(self.define_from_variant(
|
options.append(self.define_from_variant(
|
||||||
'DEAL_II_WITH_THREADS', 'threads'
|
'DEAL_II_WITH_THREADS', 'threads'
|
||||||
|
@ -460,7 +487,7 @@ def cmake_args(self):
|
||||||
for library in (
|
for library in (
|
||||||
'gsl', 'hdf5', 'p4est', 'petsc', 'slepc', 'trilinos', 'metis',
|
'gsl', 'hdf5', 'p4est', 'petsc', 'slepc', 'trilinos', 'metis',
|
||||||
'sundials', 'nanoflann', 'assimp', 'gmsh', 'muparser',
|
'sundials', 'nanoflann', 'assimp', 'gmsh', 'muparser',
|
||||||
'symengine', 'ginkgo'):
|
'symengine', 'ginkgo'): # 'taskflow'):
|
||||||
options.append(self.define_from_variant(
|
options.append(self.define_from_variant(
|
||||||
'DEAL_II_WITH_{0}'.format(library.upper()), library
|
'DEAL_II_WITH_{0}'.format(library.upper()), library
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in a new issue