Add new packages: PDI (and dependencies/plugins) (#48710)

* Add new packages: PDI
* Fix style and  typos
* License and pdi python version/shebang issue
* Version update
* 1.8.0 cutoff and dependency simplifications
* Remove unused guard
This commit is contained in:
etiennemlb 2025-02-19 18:56:03 +01:00 committed by GitHub
parent 78c985fce4
commit 39620085d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 509 additions and 0 deletions

View File

@ -0,0 +1,46 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
class Paraconf(CMakePackage):
"""Paraconf is a library that provides a simple query language to access a
Yaml tree on top of libyaml."""
homepage = "https://github.com/pdidev/paraconf"
url = "https://github.com/pdidev/paraconf/archive/1.0.0.tar.gz"
license("BSD-3-Clause")
maintainers("jbigot")
version("1.0.0", sha256="9336492c292088a7d97192f2b1fa306e11f6f32373ac75f29b9af7eecd5c0c11")
version("0.4.16", sha256="d896cb5bbf1c6b311f6bed44263548c799265e1f22d50475aecbddc80b0db982")
version("0.4.15", sha256="914befa7a8d6fbf2de3466e434a9ea20363900af5519859663a24c7a51bd26a6")
version("0.4.14", sha256="8a07bdf972ce137932b0d5e08036cf90db23b69f7eaabf52eb7d495d1da01d99")
version("0.4.13", sha256="28da96ba45bcb826a387488f283baa0c88bc0b00fa74f4c110d444c0b9a8030c")
version("0.4.12", sha256="bbbaf462ed23e9a64a4d521ee469ab723fcd86a6dda9a9d9b4dddfd1a58eef93")
version("0.4.11", sha256="35f4ba41eaf675ff16ad4f0722a9e2050ee63b073c7e3e67eb74439978599499")
version("0.4.10", sha256="0a0028354b131436e70af06c9e029f738ed771088e53633b2b5d1c8ee1276e83")
version("0.4.9", sha256="e99a01584e07e4d09b026fcd9a39500fbdbc3074a2598a4bc89f400825094c5a")
variant("shared", default=True, description="Build shared libraries rather than static ones")
variant("fortran", default=True, description="Enable Fortran support")
variant("tests", default=False, description="Build tests")
depends_on("cmake@3.5:", type=("build"))
depends_on("pkgconfig", type=("build"))
depends_on("libyaml@0.1.7:", type=("link", "run"))
root_cmakelists_dir = "paraconf"
def cmake_args(self):
args = [
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("BUILD_TESTING", "tests"),
self.define_from_variant("BUILD_FORTRAN", "fortran"),
]
return args

View File

@ -0,0 +1,69 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.hooks.sbang import sbang_shebang_line
from spack.package import *
class Pdi(CMakePackage):
"""PDI is a library that aims to decouple high-performance simulation codes
from Input/Output concerns. It offers a declarative application programming
interface that enables codes to expose the buffers in which they store data
and to notify PDI of significant steps of the simulation. It supports a
plugin system to make existing libraries such as HDF5, SIONlib or FTI
available to codes, potentially mixed in a single execution."""
homepage = "https://pdi.dev"
git = "https://github.com/pdidev/pdi.git"
license("BSD-3-Clause")
maintainers("jbigot")
version("develop", branch="main", no_cache=True)
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
variant("benchs", default=False, description="Build benchmarks")
variant("docs", default=False, description="Build documentation")
variant("tests", default=False, description="Build tests")
variant("fortran", default=True, description="Enable Fortran support")
variant("python", default=True, description="Enable Python support")
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
depends_on("doxygen@1.8.17:", type=("build"), when="@1.8: +docs")
depends_on("paraconf@1:", type=("link", "run"), when="@1.6:")
depends_on("paraconf +fortran", type=("link", "run"), when="+fortran")
depends_on("paraconf@0.4.14: +shared", type=("link", "run"))
depends_on("pkgconfig", type=("build"))
depends_on("python@3.8.2:3.11.9", type=("build", "link", "run"), when="@1.8: +python")
depends_on("py-pybind11@2.3:2", type=("link"), when="+python")
depends_on("py-pybind11@2.4.3:", type=("link"), when="@1.8: +python")
depends_on("spdlog@1.5:", type=("link"), when="@1.5:")
root_cmakelists_dir = "pdi"
def patch(self):
# Run before build so that the standard Spack sbang install hook can fix
# up the path to the python binary the zpp scripts requires. We dont use
# filter_shebang("vendor/zpp-1.0.16/bin/zpp.in") because the template is
# not yet instantiated and PYTHON_EXECUTABLE is not yet large enough to
# trigger the replacement via filter_shebang.
filter_file(
r"#!@PYTHON_EXECUTABLE@ -B",
sbang_shebang_line() + "\n#!@PYTHON_EXECUTABLE@ -B",
"vendor/zpp-1.0.16/bin/zpp.in",
)
def cmake_args(self):
args = [
self.define_from_variant("BUILD_BENCHMARKING", "benchs"),
self.define_from_variant("BUILD_DOCUMENTATION", "docs"),
self.define_from_variant("BUILD_FORTRAN", "fortran"),
self.define_from_variant("BUILD_PYTHON", "python"),
self.define_from_variant("BUILD_TESTING", "tests"),
]
return args

View File

@ -0,0 +1,53 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
class PdipluginDeclHdf5(CMakePackage):
"""Decl'HDF5 plugin enables one to read and write data from HDF5 files in a
declarative way. Decl'HDF5 does not support the full HDF5 feature set but
offers a simple declarative interface to access a large subset of it for the
PDI library"""
homepage = "https://pdi.dev"
git = "https://github.com/pdidev/pdi.git"
license("BSD-3-Clause")
maintainers("jbigot")
version("develop", branch="main", no_cache=True)
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
variant("benchs", default=False, description="Build benchmarks")
variant("fortran", default=True, description="Enable Fortran (for tests only)")
variant("tests", default=False, description="Build tests")
variant("mpi", default=True, description="Enable parallel HDF5")
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
depends_on("hdf5@1.10.4:1 +shared", type=("build", "link", "run"), when="@1.8:")
depends_on("hdf5 +mpi", type=("build", "link", "run"), when="+mpi")
depends_on("pdi@develop", type=("link", "run"), when="@develop")
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
depends_on("pkgconfig", type=("build"))
root_cmakelists_dir = "plugins/decl_hdf5"
def cmake_args(self):
args = [
"-DBUILD_BENCHMARKING:BOOL={:s}".format("ON" if "+benchs" in self.spec else "OFF"),
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
"-DBUILD_FORTRAN:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
"-DBUILD_HDF5_PARALLEL:BOOL={:s}".format("ON" if "+mpi" in self.spec else "OFF"),
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
]
return args
def setup_run_environment(self, env):
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)

View File

@ -0,0 +1,47 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
class PdipluginDeclNetcdf(CMakePackage):
"""The trace plugin is intended to generate a trace of what happens in PDI
"data store"."""
homepage = "https://pdi.dev"
git = "https://github.com/pdidev/pdi.git"
license("BSD-3-Clause")
maintainers("jbigot")
version("develop", branch="main", no_cache=True)
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
variant("tests", default=False, description="Build tests")
variant("mpi", default=True, description="Enable parallel NetCDF")
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
depends_on("netcdf-c@4.7.3:4", type=("link"), when="@1.8:")
depends_on("netcdf-c@4.6.2:4+mpi", type=("link"), when="+mpi")
depends_on("pdi@develop", type=("link", "run"), when="@develop")
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
depends_on("pkgconfig", type=("build"))
root_cmakelists_dir = "plugins/decl_netcdf"
def cmake_args(self):
return [
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
"-DBUILD_HDF5_PARALLEL:BOOL={:s}".format("ON" if "+mpi" in self.spec else "OFF"),
"-DBUILD_NETCDF_PARALLEL:BOOL={:s}".format("ON" if "+mpi" in self.spec else "OFF"),
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
]
def setup_run_environment(self, env):
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)

View File

@ -0,0 +1,43 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
class PdipluginMpi(CMakePackage):
"""MPI plugin for the PDI library"""
homepage = "https://pdi.dev"
git = "https://github.com/pdidev/pdi.git"
license("BSD-3-Clause")
maintainers("jbigot")
version("develop", branch="main", no_cache=True)
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
variant("tests", default=False, description="Build tests")
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
depends_on("mpi", type=("build", "link", "run"))
depends_on("pdi@develop", type=("link", "run"), when="@develop")
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
depends_on("pkgconfig", type=("build"))
root_cmakelists_dir = "plugins/mpi"
def cmake_args(self):
args = [
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
]
return args
def setup_run_environment(self, env):
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)

View File

@ -0,0 +1,41 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
class PdipluginPycall(CMakePackage):
"""pycall plugin for the PDI library"""
homepage = "https://pdi.dev"
git = "https://github.com/pdidev/pdi.git"
license("BSD-3-Clause")
maintainers("jbigot")
version("develop", branch="main", no_cache=True)
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
variant("tests", default=False, description="Build tests")
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
depends_on("pdi+python@develop", type=("link", "run"), when="@develop")
depends_on("pdi+python@1.8.1", type=("link", "run"), when="@1.8.1")
depends_on("pdi+python@1.8.0", type=("link", "run"), when="@1.8.0")
depends_on("pkgconfig", type=("build"))
root_cmakelists_dir = "plugins/pycall"
def cmake_args(self):
args = [
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
]
return args
def setup_run_environment(self, env):
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)

View File

@ -0,0 +1,43 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
class PdipluginSerialize(CMakePackage):
"""The trace plugin is intended to generate a trace of what happens in PDI
"data store"."""
homepage = "https://pdi.dev"
git = "https://github.com/pdidev/pdi.git"
license("BSD-3-Clause")
maintainers("jbigot")
version("develop", branch="main", no_cache=True)
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
variant("tests", default=False, description="Build tests")
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
depends_on("pdi@develop", type=("link", "run"), when="@develop")
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
depends_on("pkgconfig", type=("build"))
root_cmakelists_dir = "plugins/serialize"
def cmake_args(self):
return [
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
"-DBUILD_FORTRAN:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
]
def setup_run_environment(self, env):
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)

View File

@ -0,0 +1,43 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
class PdipluginSetValue(CMakePackage):
"""The trace plugin is intended to generate a trace of what happens in PDI
"data store"."""
homepage = "https://pdi.dev"
git = "https://github.com/pdidev/pdi.git"
license("BSD-3-Clause")
maintainers("jbigot")
version("develop", branch="main", no_cache=True)
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
variant("tests", default=False, description="Build tests")
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
depends_on("pdi@develop", type=("link", "run"), when="@develop")
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
depends_on("pkgconfig", type=("build"))
depends_on("spdlog@1.5:", type=("link"), when="@1.5:")
root_cmakelists_dir = "plugins/set_value"
def cmake_args(self):
return [
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
]
def setup_run_environment(self, env):
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)

View File

@ -0,0 +1,42 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
class PdipluginTrace(CMakePackage):
"""The trace plugin is intended to generate a trace of what happens in PDI
"data store"."""
homepage = "https://pdi.dev"
git = "https://github.com/pdidev/pdi.git"
license("BSD-3-Clause")
maintainers("jbigot")
version("develop", branch="main", no_cache=True)
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
variant("tests", default=False, description="Build tests")
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
depends_on("pdi@develop", type=("link", "run"), when="@develop")
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
depends_on("pkgconfig", type=("build"))
root_cmakelists_dir = "plugins/trace"
def cmake_args(self):
return [
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
]
def setup_run_environment(self, env):
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)

View File

@ -0,0 +1,44 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
class PdipluginUserCode(CMakePackage):
"""The user-code plugin for the PDI librarie enables one to call a
user-defined function when a specified event occur or certain data becomes
available"""
homepage = "https://pdi.dev"
git = "https://github.com/pdidev/pdi.git"
license("BSD-3-Clause")
maintainers("jbigot")
version("develop", branch="main", no_cache=True)
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
variant("tests", default=False, description="Build tests")
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
depends_on("pdi@develop", type=("link", "run"), when="@develop")
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
depends_on("pkgconfig", type=("build"))
root_cmakelists_dir = "plugins/user_code"
def cmake_args(self):
args = [
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
]
return args
def setup_run_environment(self, env):
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)

View File

@ -0,0 +1,38 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
class Zpp(PythonPackage):
"""ZPP, the Z Pre-Processor. ZPP transforms bash in a pre-processor for F90
source files. It offers a set of functions specifically tailored to build
clean Fortran90 interfaces by generating code for all types, kinds, and
array ranks supported by a given compiler."""
homepage = "https://github.com/jbigot/zpp"
pypi = "zpp/zpp-1.0.16.tar.gz"
license("BSD-3-Clause")
maintainers("jbigot")
version("1.1.0", sha256="4cd07ef18df5d44798e213aaaf17af78449739b01c0bf41e046c95b8a1aad6bd")
version("1.0.16", sha256="3238d27b4158edabb09ee6d82ba6331540950cb4dcdcf4978f19370b4e384241")
version("1.0.15", sha256="33d49280ca0d8e5221faa4c694949647146d15f16dacc09c36f20e7c34831135")
version("1.0.14", sha256="c52962a9d9c3aa28d513090ef327e05eccc7923473415d9dcbdacf22911d6c9f")
version("1.0.13", sha256="c76985c172491667677eba01072656eb04a59791d8b6a4e396721eddb570c548")
version("1.0.12", sha256="1fcc206096a144d24dd8cc7d2278d1eb4d0b4a5e2e3aa4936e7de30fe2d435ce")
version("1.0.11", sha256="e6a3e98b6be5ae7853fd0f66f58e9607cecaa66caefc57418d3163df695a2a90")
version("1.0.10", sha256="b0bb95303fe2f09918f1ce833027fda429746c3e51a859f7e051f9deb360c4d5")
version(
"1.0.9-fixed", sha256="6aa5f4a42b8ba7c000e7b186d5ef2be99fd0f8f47e1d360c42c1b371d0bacf23"
)
version(
"1.0.8-fixed", sha256="dc5f423f019f1af92ff020372b458ab539890d2de2133bb9602cce419486faea"
)
depends_on("python@3:", type=("build", "run"))
depends_on("py-setuptools", type=("build", "run"))