|
|
|
|
@@ -28,6 +28,8 @@ class Dealii(CMakePackage, CudaPackage):
|
|
|
|
|
generator("make")
|
|
|
|
|
|
|
|
|
|
version("master", branch="master")
|
|
|
|
|
version("9.6.0", sha256="675323f0eb8eed2cfc93e2ced07a0ec5727c6a566ff9e7786c01a2ddcde17bed")
|
|
|
|
|
version("9.5.2", sha256="7930e5218a9807d60cc05c300a3b70f36f4af22c3551a2cd1141fbab013bbaf1")
|
|
|
|
|
version("9.5.1", sha256="a818b535e6488d3aef7853311657c7b4fadc29a9abe91b7b202b131aad630f5e")
|
|
|
|
|
version("9.5.0", sha256="a81f41565f0d3a22d491ee687957dd48053225da72e8d6d628d210358f4a0464")
|
|
|
|
|
version("9.4.2", sha256="45a76cb400bfcff25cc2d9093d9a5c91545c8367985e6798811c5e9d2a6a6fd4")
|
|
|
|
|
@@ -78,7 +80,10 @@ class Dealii(CMakePackage, CudaPackage):
|
|
|
|
|
values=("default", "11", "14", "17"),
|
|
|
|
|
)
|
|
|
|
|
variant("doc", default=False, description="Compile with documentation")
|
|
|
|
|
variant("examples", default=True, description="Compile and install tutorial programs")
|
|
|
|
|
variant("examples", default=True, description="Install source files of tutorial programs")
|
|
|
|
|
variant(
|
|
|
|
|
"examples_compile", default=True, description="Install binary files of 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")
|
|
|
|
|
@@ -91,6 +96,9 @@ class Dealii(CMakePackage, CudaPackage):
|
|
|
|
|
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:~cuda", description="Compile with CGAL")
|
|
|
|
|
variant(
|
|
|
|
|
"complex", default=False, when="@9.1.0:", description="Compile with complex value support"
|
|
|
|
|
)
|
|
|
|
|
variant("ginkgo", default=True, description="Compile with Ginkgo")
|
|
|
|
|
variant("gmsh", default=True, description="Compile with GMSH")
|
|
|
|
|
variant("gsl", default=True, description="Compile with GSL")
|
|
|
|
|
@@ -100,7 +108,8 @@ class Dealii(CMakePackage, CudaPackage):
|
|
|
|
|
variant("muparser", default=True, description="Compile with muParser")
|
|
|
|
|
variant("nanoflann", default=False, description="Compile with Nanoflann")
|
|
|
|
|
variant("netcdf", default=False, description="Compile with Netcdf (only with MPI)")
|
|
|
|
|
variant("oce", default=True, description="Compile with OCE")
|
|
|
|
|
variant("oce", default=False, description="Compile with OCE")
|
|
|
|
|
variant("opencascade", default=True, description="Compile with OPENCASCADE")
|
|
|
|
|
variant("p4est", default=True, description="Compile with P4est (only with MPI)")
|
|
|
|
|
variant("petsc", default=True, description="Compile with Petsc (only with MPI)")
|
|
|
|
|
variant("scalapack", default=True, description="Compile with ScaLAPACK (only with MPI)")
|
|
|
|
|
@@ -132,7 +141,7 @@ class Dealii(CMakePackage, CudaPackage):
|
|
|
|
|
# dealii does not build with Boost 1.80.0
|
|
|
|
|
# (https://github.com/spack/spack/pull/32879#issuecomment-1265933265)
|
|
|
|
|
depends_on(
|
|
|
|
|
"boost@1.59.0:1.63,1.65.1,1.67.0:1.79+thread+system+serialization+iostreams",
|
|
|
|
|
"boost@1.59.0:1.63,1.65.1,1.67.0:1.79,1.83:+thread+system+serialization+iostreams",
|
|
|
|
|
patches=[
|
|
|
|
|
patch("boost_1.65.1_singleton.patch", level=1, when="@1.65.1"),
|
|
|
|
|
patch("boost_1.68.0.patch", level=1, when="@1.68.0"),
|
|
|
|
|
@@ -187,13 +196,18 @@ class Dealii(CMakePackage, CudaPackage):
|
|
|
|
|
depends_on("graphviz", when="+doc")
|
|
|
|
|
depends_on("ginkgo", when="@9.1:+ginkgo")
|
|
|
|
|
depends_on("ginkgo@1.4.0:", when="@9.4:+ginkgo")
|
|
|
|
|
depends_on("gmsh+tetgen+netgen+oce", when="@9.0:+gmsh", type=("build", "run"))
|
|
|
|
|
depends_on("gmsh+oce", when="@9.0:+gmsh+oce", type=("build", "run"))
|
|
|
|
|
depends_on("gmsh+opencascade", when="@9.0:+gmsh+opencascade", type=("build", "run"))
|
|
|
|
|
depends_on("gmsh", when="@9.0:+gmsh~opencascade~oce", type=("build", "run"))
|
|
|
|
|
depends_on("gsl", when="@8.5.0:+gsl")
|
|
|
|
|
# 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")
|
|
|
|
|
depends_on("kokkos@3.7:+cuda+cuda_lambda+wrapper", when="@9.5:9.5.99+kokkos~trilinos+cuda")
|
|
|
|
|
depends_on(
|
|
|
|
|
"kokkos@3.7:+cuda+cuda_lambda+cuda_constexpr+wrapper", when="@9.6:+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")
|
|
|
|
|
@@ -204,6 +218,7 @@ class Dealii(CMakePackage, CudaPackage):
|
|
|
|
|
depends_on("netcdf-c+mpi", when="+netcdf+mpi")
|
|
|
|
|
depends_on("netcdf-cxx", when="+netcdf+mpi")
|
|
|
|
|
depends_on("oce", when="+oce")
|
|
|
|
|
depends_on("opencascade", when="+opencascade")
|
|
|
|
|
depends_on("p4est", when="+p4est+mpi")
|
|
|
|
|
depends_on("petsc+mpi~int64", when="+petsc+mpi~int64")
|
|
|
|
|
depends_on("petsc+mpi+int64", when="+petsc+mpi+int64")
|
|
|
|
|
@@ -215,6 +230,7 @@ class Dealii(CMakePackage, CudaPackage):
|
|
|
|
|
depends_on("sundials@5:6.7", when="@9.3.4:+sundials")
|
|
|
|
|
depends_on("taskflow@3.4:", when="@9.6:+taskflow")
|
|
|
|
|
depends_on("trilinos gotype=int", when="+trilinos@12.18.1:")
|
|
|
|
|
depends_on("trilinos+cuda+cuda_constexpr", when="@9.6:+trilinos+cuda")
|
|
|
|
|
# TODO: next line fixes concretization with trilinos and adol-c
|
|
|
|
|
depends_on("trilinos~exodus", when="@9.0:+adol-c+trilinos")
|
|
|
|
|
# Both Trilinos and SymEngine bundle the Teuchos RCP library.
|
|
|
|
|
@@ -319,6 +335,8 @@ class Dealii(CMakePackage, CudaPackage):
|
|
|
|
|
msg="Deal.II 9.6 onwards requires the C++ standard to be set to 17 or later.",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
conflicts("oce", when="+opencascade", msg="Only one among OCE or OPENCASCADE can be selected.")
|
|
|
|
|
|
|
|
|
|
# Interfaces added in 8.5.0:
|
|
|
|
|
for _package in ["gsl", "python"]:
|
|
|
|
|
conflicts(
|
|
|
|
|
@@ -466,7 +484,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"))
|
|
|
|
|
options.append(self.define_from_variant("DEAL_II_COMPILE_EXAMPLES", "examples_compile"))
|
|
|
|
|
|
|
|
|
|
# Enforce the specified C++ standard
|
|
|
|
|
if spec.variants["cxxstd"].value != "default":
|
|
|
|
|
@@ -535,6 +553,9 @@ def cmake_args(self):
|
|
|
|
|
if spec.satisfies("+trilinos"):
|
|
|
|
|
options.extend([self.define("CMAKE_CXX_COMPILER", spec["trilinos"].kokkos_cxx)])
|
|
|
|
|
|
|
|
|
|
# Complex support
|
|
|
|
|
options.append(self.define_from_variant("DEAL_II_WITH_COMPLEX_VALUES", "complex"))
|
|
|
|
|
|
|
|
|
|
# Python bindings
|
|
|
|
|
if spec.satisfies("@8.5.0:"):
|
|
|
|
|
options.append(self.define_from_variant("DEAL_II_COMPONENT_PYTHON_BINDINGS", "python"))
|
|
|
|
|
@@ -643,11 +664,16 @@ def cmake_args(self):
|
|
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Open Cascade
|
|
|
|
|
# Open Cascade -- OCE
|
|
|
|
|
if "+oce" in spec:
|
|
|
|
|
options.append(self.define_from_variant("DEAL_II_WITH_OPENCASCADE", "oce"))
|
|
|
|
|
if spec.satisfies("+oce"):
|
|
|
|
|
options.append(self.define("OPENCASCADE_DIR", spec["oce"].prefix))
|
|
|
|
|
|
|
|
|
|
# Open Cascade -- OpenCascade
|
|
|
|
|
if "+opencascade" in spec:
|
|
|
|
|
options.append(self.define_from_variant("DEAL_II_WITH_OPENCASCADE", "opencascade"))
|
|
|
|
|
options.append(self.define("OPENCASCADE_DIR", spec["opencascade"].prefix))
|
|
|
|
|
|
|
|
|
|
# As a final step, collect CXX flags that may have been
|
|
|
|
|
# added anywhere above:
|
|
|
|
|
if len(cxx_flags_release) > 0 and "+optflags" in spec:
|
|
|
|
|
|