dealii: add v9.5.0, v9.5.1 (#40747)
* dealii: 9.5.0 * kokkos+cuda_lambda * dealii ^kokkos@3.7: require +cuda +cuda_lambda +wrapper * Added 9.5.1, try ~cgal when +cuda * Forward Cuda architecture request * Remove workaround * Try not enforcing the Kokkos compiler * Enforce using nvcc_wrapper with Trilinos+Cuda * Don't define CMAKE_*_COMPILER to point to MPI wrappers * Use the same compiler as Trilinos/Kokkos * Only check for Trilinos compiler * Disable Trilinos+Cuda * Disable Cuda support * Try CUDA build without ninja * Combined examples and examples_compile * Use f-string for cuda_arch * p -> _package * Indentation * Fix up f-string --------- Co-authored-by: Luca Heltai <luca.heltai@sissa.it> Co-authored-by: eugeneswalker <eugenesunsetwalker@gmail.com>
This commit is contained in:
parent
9c74eda61f
commit
96f3c76052
1 changed files with 84 additions and 46 deletions
|
@ -23,9 +23,13 @@ class Dealii(CMakePackage, CudaPackage):
|
|||
# only add for immediate deps.
|
||||
transitive_rpaths = False
|
||||
|
||||
generator("ninja")
|
||||
# FIXME nvcc_wrapper (used for +clang) doesn't handle response files
|
||||
# correctly when ninja is used. Those are used automatically if paths get too long.
|
||||
generator("make")
|
||||
|
||||
version("master", branch="master")
|
||||
version("9.5.1", sha256="a818b535e6488d3aef7853311657c7b4fadc29a9abe91b7b202b131aad630f5e")
|
||||
version("9.5.0", sha256="a81f41565f0d3a22d491ee687957dd48053225da72e8d6d628d210358f4a0464")
|
||||
version("9.4.2", sha256="45a76cb400bfcff25cc2d9093d9a5c91545c8367985e6798811c5e9d2a6a6fd4")
|
||||
version("9.4.1", sha256="bfe5e4bf069159f93feb0f78529498bfee3da35baf5a9c6852aa59d7ea7c7a48")
|
||||
version("9.4.0", sha256="238677006cd9173658e5b69cdd1861f800556982db6005a3cc5eb8329cc1e36c")
|
||||
|
@ -70,10 +74,11 @@ class Dealii(CMakePackage, CudaPackage):
|
|||
values=("default", "11", "14", "17"),
|
||||
)
|
||||
variant("doc", default=False, description="Compile with documentation")
|
||||
variant("examples", default=True, description="Compile tutorial programs")
|
||||
variant("examples", default=True, description="Compile and install tutorial programs")
|
||||
variant("int64", default=False, description="Compile with 64 bit indices support")
|
||||
variant("mpi", default=True, description="Compile with MPI")
|
||||
variant("optflags", default=False, description="Compile using additional optimization flags")
|
||||
variant("platform-introspection", default=True, description="Enable platform introspection")
|
||||
variant("python", default=False, description="Compile with Python bindings")
|
||||
|
||||
# Package variants
|
||||
|
@ -81,11 +86,12 @@ class Dealii(CMakePackage, CudaPackage):
|
|||
variant("arborx", default=True, description="Compile with Arborx support")
|
||||
variant("arpack", default=True, description="Compile with Arpack and PArpack (only with MPI)")
|
||||
variant("adol-c", default=True, description="Compile with ADOL-C")
|
||||
variant("cgal", default=True, when="@9.4:", description="Compile with CGAL")
|
||||
variant("cgal", default=True, when="@9.4:~cuda", description="Compile with CGAL")
|
||||
variant("ginkgo", default=True, description="Compile with Ginkgo")
|
||||
variant("gmsh", default=True, description="Compile with GMSH")
|
||||
variant("gsl", default=True, description="Compile with GSL")
|
||||
variant("hdf5", default=True, description="Compile with HDF5 (only with MPI)")
|
||||
variant("kokkos", default=True, when="@9.5:", description="Compile with Kokkos")
|
||||
variant("metis", default=True, description="Compile with Metis")
|
||||
variant("muparser", default=True, description="Compile with muParser")
|
||||
variant("nanoflann", default=False, description="Compile with Nanoflann")
|
||||
|
@ -98,14 +104,15 @@ class Dealii(CMakePackage, CudaPackage):
|
|||
variant("slepc", default=True, description="Compile with Slepc (only with Petsc and MPI)")
|
||||
variant("symengine", default=True, description="Compile with SymEngine")
|
||||
variant("simplex", default=True, 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(
|
||||
"taskflow",
|
||||
default=True,
|
||||
when="@9.6:",
|
||||
description="Compile with multi-threading via Taskflow",
|
||||
)
|
||||
variant("threads", default=True, description="Compile with multi-threading via TBB")
|
||||
variant("trilinos", default=True, description="Compile with Trilinos (only with MPI)")
|
||||
variant("platform-introspection", default=True, description="Enable platform introspection")
|
||||
variant("vtk", default=True, when="@9.6:", description="Compile with VTK")
|
||||
|
||||
# Required dependencies: Light version
|
||||
depends_on("blas")
|
||||
|
@ -179,6 +186,8 @@ class Dealii(CMakePackage, CudaPackage):
|
|||
# TODO: next line fixes concretization with petsc
|
||||
depends_on("hdf5+mpi+hl+fortran", when="+hdf5+mpi+petsc")
|
||||
depends_on("hdf5+mpi+hl", when="+hdf5+mpi~petsc")
|
||||
depends_on("kokkos@3.7:", when="@9.5:+kokkos~trilinos")
|
||||
depends_on("kokkos@3.7:+cuda+cuda_lambda+wrapper", when="@9.5:+kokkos~trilinos+cuda")
|
||||
# TODO: concretizer bug. The two lines mimic what comes from PETSc
|
||||
# but we should not need it
|
||||
depends_on("metis@5:+int64", when="+metis+int64")
|
||||
|
@ -198,7 +207,7 @@ class Dealii(CMakePackage, CudaPackage):
|
|||
depends_on("sundials@:3~pthread", when="@9.0:9.2+sundials")
|
||||
depends_on("sundials@5:5.8", when="@9.3:9.3.3+sundials")
|
||||
depends_on("sundials@5:", when="@9.3.4:+sundials")
|
||||
# depends_on('taskflow', when='@9.3:+taskflow')
|
||||
depends_on("taskflow", when="@9.6:+taskflow")
|
||||
depends_on("trilinos gotype=int", when="+trilinos@12.18.1:")
|
||||
# TODO: next line fixes concretization with trilinos and adol-c
|
||||
depends_on("trilinos~exodus", when="@9.0:+adol-c+trilinos")
|
||||
|
@ -222,12 +231,11 @@ class Dealii(CMakePackage, CudaPackage):
|
|||
# do not require +rol to make concretization of xsdk possible
|
||||
depends_on("trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado", when="+trilinos")
|
||||
depends_on("trilinos~hypre", when="+trilinos+int64")
|
||||
# TODO: temporary disable Tpetra when using CUDA due to
|
||||
# namespace "Kokkos::Impl" has no member "cuda_abort"
|
||||
depends_on(
|
||||
"trilinos@master+rol~amesos2~ifpack2~intrepid2~kokkos~tpetra~zoltan2",
|
||||
when="+trilinos+cuda",
|
||||
)
|
||||
for _arch in CudaPackage.cuda_arch_values:
|
||||
arch_str = f"+cuda cuda_arch={_arch}"
|
||||
trilinos_spec = f"trilinos +wrapper {arch_str}"
|
||||
depends_on(trilinos_spec, when=f"@9.5:+trilinos {arch_str}")
|
||||
depends_on("vtk", when="@9.6:+vtk")
|
||||
|
||||
# Explicitly provide a destructor in BlockVector,
|
||||
# otherwise deal.II may fail to build with Intel compilers.
|
||||
|
@ -296,44 +304,60 @@ class Dealii(CMakePackage, CudaPackage):
|
|||
msg="CGAL requires the C++ standard to be set explicitly to 17 or later.",
|
||||
)
|
||||
|
||||
conflicts(
|
||||
"cxxstd=14",
|
||||
when="@9.6:",
|
||||
msg="Deal.II 9.6 onwards requires the C++ standard to be set to 17 or later.",
|
||||
)
|
||||
|
||||
# Interfaces added in 8.5.0:
|
||||
for p in ["gsl", "python"]:
|
||||
for _package in ["gsl", "python"]:
|
||||
conflicts(
|
||||
"+{0}".format(p),
|
||||
"+{0}".format(_package),
|
||||
when="@:8.4.2",
|
||||
msg="The interface to {0} is supported from version 8.5.0 "
|
||||
"onwards. Please explicitly disable this variant "
|
||||
"via ~{0}".format(p),
|
||||
"via ~{0}".format(_package),
|
||||
)
|
||||
|
||||
# Interfaces added in 9.0.0:
|
||||
for p in ["assimp", "gmsh", "nanoflann", "scalapack", "sundials", "adol-c"]:
|
||||
for _package in ["assimp", "gmsh", "nanoflann", "scalapack", "sundials", "adol-c"]:
|
||||
conflicts(
|
||||
"+{0}".format(p),
|
||||
"+{0}".format(_package),
|
||||
when="@:8.5.1",
|
||||
msg="The interface to {0} is supported from version 9.0.0 "
|
||||
"onwards. Please explicitly disable this variant "
|
||||
"via ~{0}".format(p),
|
||||
"via ~{0}".format(_package),
|
||||
)
|
||||
|
||||
# interfaces added in 9.1.0:
|
||||
for p in ["ginkgo", "symengine"]:
|
||||
for _package in ["ginkgo", "symengine"]:
|
||||
conflicts(
|
||||
"+{0}".format(p),
|
||||
"+{0}".format(_package),
|
||||
when="@:9.0",
|
||||
msg="The interface to {0} is supported from version 9.1.0 "
|
||||
"onwards. Please explicitly disable this variant "
|
||||
"via ~{0}".format(p),
|
||||
"via ~{0}".format(_package),
|
||||
)
|
||||
|
||||
# interfaces added in 9.3.0:
|
||||
for p in ["simplex", "arborx"]: # , 'taskflow']:
|
||||
for _package in ["simplex", "arborx"]:
|
||||
conflicts(
|
||||
"+{0}".format(p),
|
||||
"+{0}".format(_package),
|
||||
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),
|
||||
"via ~{0}".format(_package),
|
||||
)
|
||||
|
||||
# interfaces added after 9.5.0:
|
||||
for _package in ["vtk", "taskflow"]:
|
||||
conflicts(
|
||||
"+{0}".format(_package),
|
||||
when="@:9.5",
|
||||
msg="The interface to {0} is supported from version 9.6.0 "
|
||||
"onwards. Please explicitly disable this variant "
|
||||
"via ~{0}".format(_package),
|
||||
)
|
||||
|
||||
# Interfaces removed in 9.3.0:
|
||||
|
@ -346,18 +370,29 @@ class Dealii(CMakePackage, CudaPackage):
|
|||
|
||||
# Check that the combination of variants makes sense
|
||||
# 64-bit BLAS:
|
||||
for p in ["openblas", "intel-mkl", "intel-parallel-studio+mkl"]:
|
||||
for _package in ["openblas", "intel-mkl", "intel-parallel-studio+mkl"]:
|
||||
conflicts(
|
||||
"^{0}+ilp64".format(p), when="@:8.5.1", msg="64bit BLAS is only supported from 9.0.0"
|
||||
"^{0}+ilp64".format(_package),
|
||||
when="@:8.5.1",
|
||||
msg="64bit BLAS is only supported from 9.0.0",
|
||||
)
|
||||
|
||||
# MPI requirements:
|
||||
for p in ["arpack", "hdf5", "netcdf", "p4est", "petsc", "scalapack", "slepc", "trilinos"]:
|
||||
for _package in [
|
||||
"arpack",
|
||||
"hdf5",
|
||||
"netcdf",
|
||||
"p4est",
|
||||
"petsc",
|
||||
"scalapack",
|
||||
"slepc",
|
||||
"trilinos",
|
||||
]:
|
||||
conflicts(
|
||||
"+{0}".format(p),
|
||||
"+{0}".format(_package),
|
||||
when="~mpi",
|
||||
msg="To enable {0} it is necessary to build deal.II with "
|
||||
"MPI support enabled.".format(p),
|
||||
"MPI support enabled.".format(_package),
|
||||
)
|
||||
|
||||
# Optional dependencies:
|
||||
|
@ -432,6 +467,7 @@ def cmake_args(self):
|
|||
|
||||
# Examples / tutorial programs
|
||||
options.append(self.define_from_variant("DEAL_II_COMPONENT_EXAMPLES", "examples"))
|
||||
options.append(self.define_from_variant("DEAL_II_COMPILE_EXAMPLES", "examples"))
|
||||
|
||||
# Enforce the specified C++ standard
|
||||
if spec.variants["cxxstd"].value != "default":
|
||||
|
@ -478,9 +514,6 @@ def cmake_args(self):
|
|||
if "+mpi" in spec:
|
||||
options.extend(
|
||||
[
|
||||
self.define("CMAKE_C_COMPILER", spec["mpi"].mpicc),
|
||||
self.define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx),
|
||||
self.define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc),
|
||||
self.define("MPI_C_COMPILER", spec["mpi"].mpicc),
|
||||
self.define("MPI_CXX_COMPILER", spec["mpi"].mpicxx),
|
||||
self.define("MPI_Fortran_COMPILER", spec["mpi"].mpifc),
|
||||
|
@ -499,6 +532,9 @@ def cmake_args(self):
|
|||
self.define("CUDA_HOST_COMPILER", spec["mpi"].mpicxx),
|
||||
]
|
||||
)
|
||||
# Make sure we use the same compiler that Trilinos uses
|
||||
if "+trilinos" in spec:
|
||||
options.extend([self.define("CMAKE_CXX_COMPILER", spec["trilinos"].kokkos_cxx)])
|
||||
|
||||
# Python bindings
|
||||
if spec.satisfies("@8.5.0:"):
|
||||
|
@ -542,23 +578,25 @@ def cmake_args(self):
|
|||
# Optional dependencies for which library names are the same as CMake
|
||||
# variables:
|
||||
for library in (
|
||||
"arborx",
|
||||
"assimp",
|
||||
"cgal",
|
||||
"ginkgo",
|
||||
"gmsh",
|
||||
"gsl",
|
||||
"hdf5",
|
||||
"metis",
|
||||
"muparser",
|
||||
"nanoflann",
|
||||
"p4est",
|
||||
"petsc",
|
||||
"slepc",
|
||||
"trilinos",
|
||||
"metis",
|
||||
"sundials",
|
||||
"nanoflann",
|
||||
"assimp",
|
||||
"gmsh",
|
||||
"muparser",
|
||||
"symengine",
|
||||
"ginkgo",
|
||||
"arborx",
|
||||
"cgal",
|
||||
): # 'taskflow'):
|
||||
"taskflow",
|
||||
"trilinos",
|
||||
"vtk",
|
||||
):
|
||||
options.append(
|
||||
self.define_from_variant("DEAL_II_WITH_{0}".format(library.upper()), library)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue