From a05eb11b7bd4e7bc57cfe0d9c2098fdd3debca73 Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Thu, 28 Mar 2024 17:43:10 +0100 Subject: [PATCH] steps: add version 5.0.1 (#43360) --- .../repos/builtin/packages/steps/package.py | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/steps/package.py b/var/spack/repos/builtin/packages/steps/package.py index f616d30d15..c673133d67 100644 --- a/var/spack/repos/builtin/packages/steps/package.py +++ b/var/spack/repos/builtin/packages/steps/package.py @@ -15,19 +15,20 @@ class Steps(CMakePackage): maintainers("tristan0x") license("GPL-3.0-or-later") + submodules = True - version("develop", branch="master", submodules=True) - version("4.1.1", submodules=True) + version("develop", branch="master") + version("5.0.1", tag="5.0.1", commit="1f2eb8193edc1c75e0877fe37e39452b399242c9") + version("4.1.1", tag="4.1.1", commit="fdb6d9e02a69dae698f66013117fc3f08f808f45") + variant("blender", default=False, description="Build stepsblender package") variant( "codechecks", default=False, description="Perform additional code checks like code formatting or static analysis", ) variant("lapack", default=False, description="Use new BDSystem/Lapack code for E-Field solver") - variant( - "distmesh", default=True, when="+mpi", description="Add solvers based on distributed mesh" - ) + variant("distmesh", default=True, description="Add solvers based on distributed mesh") variant("petsc", default=True, description="Use PETSc library for parallel E-Field solver") variant("mpi", default=True, description="Use MPI for parallel solvers") variant("coverage", default=False, description="Enable code coverage") @@ -45,21 +46,26 @@ class Steps(CMakePackage): variant( "likwid", default=False, description="Build in likwid support (Instrumentor Interface)" ) + variant("vesicle", default=True, when="@5:", description="Add vesicle model") # Build with `ninja` instead of `make` generator("ninja") + conflicts("+distmesh~mpi", msg="steps+distmesh requires +mpi") depends_on("benchmark", type=("build", "test")) depends_on("blas") depends_on("boost", type="build") depends_on("caliper", when="+caliper") depends_on("easyloggingpp", when="~bundle") + depends_on("eigen", when="@5:") depends_on("gmsh", when="+distmesh") + depends_on("gsl", when="+vesicle") depends_on("lapack", when="+lapack") depends_on("lcov", when="+coverage", type="build") depends_on("likwid", when="+likwid") depends_on("metis+int64") depends_on("mpi", when="+mpi") + depends_on("ninja", type="build") depends_on("omega-h+gmsh+mpi", when="~bundle+distmesh") depends_on("petsc~debug+int64+mpi", when="+petsc+mpi") depends_on("petsc~debug+int64~mpi", when="+petsc~mpi") @@ -67,24 +73,31 @@ class Steps(CMakePackage): depends_on("py-cython") depends_on("py-gcovr", when="+coverage", type="build") depends_on("py-h5py", type=("build", "test", "run")) + depends_on("py-pip", type="build", when="@5:") depends_on("py-matplotlib", type=("build", "test")) + depends_on("py-build", type="build", when="@5:") depends_on("py-mpi4py", when="+distmesh", type=("build", "test", "run")) depends_on("py-numpy", type=("build", "test", "run")) depends_on("py-scipy", type=("build", "test", "run")) depends_on("python", type=("build", "test", "run")) depends_on("random123", when="~bundle") - depends_on("sundials@:2.99.99+int64", when="~bundle") - - patch("for_aarch64.patch", when="target=aarch64:") + depends_on("sundials@:2+int64", when="@:5~bundle") + depends_on("sundials@:6+int64", when="@develop~bundle") def patch(self): # easylogging requires compilation by # its dependents: splice in disabling all errors filter_file(r"(-Wno-double-promotion)", r"-Wno-error \1", "src/steps/util/CMakeLists.txt") + # unittest2 is unmaintained, shan't be used and does not build with modern Python + filter_file("unittest2", "", "requirements.txt", ignore_absent=True) def cmake_args(self): + python_interpreter = self.spec["python"].prefix.bin.python + str( + self.spec["python"].version.up_to(1) + ) args = [ - self.define("BLAS_LIBRARIES", self.spec["blas"].libs.joined(";")), + self.define("BLAS_LIBRARIES", self.spec["blas"].libs), + self.define("PYTHON_EXECUTABLE", python_interpreter), self.define("STEPS_INSTALL_PYTHON_DEPS", False), self.define_from_variant("BUILD_STOCHASTIC_TESTS", "stochtests"), self.define_from_variant("BUILD_TESTING", "codechecks"), @@ -94,6 +107,8 @@ def cmake_args(self): self.define_from_variant("STEPS_USE_CALIPER_PROFILING", "caliper"), self.define_from_variant("STEPS_USE_DIST_MESH", "distmesh"), self.define_from_variant("STEPS_USE_LIKWID_PROFILING", "likwid"), + self.define_from_variant("STEPS_USE_STEPSBLENDER", "blender"), + self.define_from_variant("STEPS_USE_VESICLE_SOLVER", "vesicle"), self.define_from_variant("USE_BDSYSTEM_LAPACK", "lapack"), self.define_from_variant("USE_MPI", "mpi"), self.define_from_variant("USE_PETSC", "petsc"),