Add fabulous, maphyspp, paddle packages. (#42287)

This commit is contained in:
fpruvost 2024-01-29 19:06:35 +01:00 committed by GitHub
parent cc866efba1
commit ed5ed3e31e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 142 additions and 0 deletions

View file

@ -0,0 +1,40 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Fabulous(CMakePackage):
"""FABuLOuS (Fast Accurate Block Linear krylOv Solver)
Library implementing Block-GMres with Inexact Breakdown and Deflated Restarting"""
homepage = "https://gitlab.inria.fr/solverstack/fabulous/"
git = "https://gitlab.inria.fr/solverstack/fabulous.git"
url = "https://gitlab.inria.fr/api/v4/projects/2083/packages/generic/source/v1.1.3/fabulous-1.1.3.tar.gz"
maintainers("fpruvost")
version("master", branch="master", submodules=True)
version("1.1.3", sha256="a75a5461984360286c26b104c1d01ac6cf7c3151bfaa42d8e980eb072981f3ef")
variant("blasmt", default=False, description="use multi-threaded blas and lapack kernels")
variant("examples", default=False, description="build examples and tests")
depends_on("blas")
depends_on("lapack")
def cmake_args(self):
args = [
self.define("BUILD_SHARED_LIBS", True),
self.define("FABULOUS_BUILD_C_API", True),
self.define("FABULOUS_BUILD_Fortran_API", True),
self.define("FABULOUS_LAPACKE_NANCHECK", True),
self.define("FABULOUS_USE_CHAMELEON", False),
self.define_from_variant("FABULOUS_BLASMT", "blasmt"),
self.define_from_variant("FABULOUS_BUILD_EXAMPLES", "examples"),
self.define_from_variant("FABULOUS_BUILD_TESTS", "examples"),
]
return args

View file

@ -0,0 +1,66 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Maphyspp(CMakePackage):
"""a Massively Parallel Hybrid Solver in C++"""
homepage = "https://gitlab.inria.fr/solverstack/maphys/maphyspp"
git = "https://gitlab.inria.fr/solverstack/maphys/maphyspp.git"
url = "https://gitlab.inria.fr/api/v4/projects/6194/packages/generic/source/v1.1.9/maphyspp-1.1.9.tar.gz"
maintainers("fpruvost")
version("master", branch="master", submodules=True)
version("1.1.9", sha256="472deef05f69c26337a6f8e769cf36cbe0a50e6ec096757389ed10286a0d7e04")
# User options
variant("armadillo", default=False, description="Enable Armadillo interface")
variant("arpack-ng", default=True, description="Enable arpack eigen/singular value solvers")
variant("eigen", default=True, description="Enable Eigen interface")
variant("fabulous", default=True, description="Enable Fabulous Iterative Block Krylov solvers")
variant("paddle", default=True, description="Enable Paddle for matrix partitioning")
variant("pastix", default=True, description="Enable Pastix sparse direct solver")
# Executables to compile
variant("examples", default=True, description="Compile examples")
variant("tests", default=False, description="Compile tests")
# Required dependencies
depends_on("pkgconfig", type="build")
depends_on("blaspp")
depends_on("lapackpp")
depends_on("mpi")
# Optional dependencies
depends_on("armadillo", when="+armadillo")
depends_on("arpack-ng+icb", when="+arpack-ng")
depends_on("eigen", when="+eigen")
depends_on("fabulous", when="+fabulous")
depends_on("paddle", when="+paddle")
depends_on("pastix+mpi", when="+pastix")
def cmake_args(self):
args = [
self.define("BUILD_SHARED_LIBS", True),
self.define("MAPHYSPP_C_DRIVER", True),
self.define("MAPHYSPP_Fortran_DRIVER", True),
self.define("MAPHYSPP_COMPILE_BENCH", False),
self.define("MAPHYSPP_USE_MUMPS", False),
self.define("MAPHYSPP_USE_QRMUMPS", False),
self.define("MAPHYSPP_USE_SZ_COMPRESSOR", False),
self.define_from_variant("MAPHYSPP_COMPILE_EXAMPLES", "examples"),
self.define_from_variant("MAPHYSPP_COMPILE_TESTS", "tests"),
self.define_from_variant("MAPHYSPP_USE_ARMADILLO", "armadillo"),
self.define_from_variant("MAPHYSPP_USE_ARPACK", "arpack-ng"),
self.define_from_variant("MAPHYSPP_USE_EIGEN", "eigen"),
self.define_from_variant("MAPHYSPP_USE_FABULOUS", "fabulous"),
self.define_from_variant("MAPHYSPP_USE_PADDLE", "paddle"),
self.define_from_variant("MAPHYSPP_USE_PASTIX", "pastix"),
]
return args

View file

@ -0,0 +1,36 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Paddle(CMakePackage):
"""Parallel algebraic domain decomposition for linear algebra software package."""
homepage = "https://gitlab.inria.fr/solverstack/paddle"
git = "https://gitlab.inria.fr/solverstack/paddle.git"
maintainers("fpruvost")
version("master", branch="master", submodules=True)
version("0.3.7", tag="0.3.7", submodules=True)
variant("parmetis", default=False, description="Enable ParMETIS ordering")
variant("tests", default=False, description="Enable tests")
depends_on("mpi")
depends_on("scotch~metis+mpi")
depends_on("parmetis", when="+parmetis")
root_cmakelists_dir = "src"
def cmake_args(self):
args = [
self.define("BUILD_SHARED_LIBS", True),
self.define_from_variant("PADDLE_ORDERING_PARMETIS", "parmetis"),
self.define_from_variant("PADDLE_BUILD_TESTS", "tests"),
]
return args