Verified Commit c1cf7c0c authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Add Spack support

parent f27f60e6
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
# Copyright 2013-2023 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)

# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack.  We've put "FIXME"
# next to all the things you'll want to change. Once you've handled
# them, you can save this file and test your package like this:
#
#     spack install agios
#
# You can edit this file again by typing:
#
#     spack edit agios
#
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------

from spack.package import *


class Agios(CMakePackage):
    """AGIOS: an I/O request scheduling library at file level."""


    homepage = 'https://github.com/francielizanon/agios'
    url      = 'https://github.com/jeanbez/agios/archive/refs/tags/v1.0.tar.gz'
    git      = 'https://github.com/francielizanon/agios.git'

    version('latest', branch='development')
    version('1.0', sha256='e8383a6ab0180ae8ba9bb2deb1c65d90c00583c3d6e77c70c415de8a98534efd')

    # general dependencies
    depends_on('cmake@3.5', type='build')
    depends_on('libconfig')
+40 −0
Original line number Diff line number Diff line
# Copyright 2013-2023 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)

# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack.  We've put "FIXME"
# next to all the things you'll want to change. Once you've handled
# them, you can save this file and test your package like this:
#
#     spack install hiredis
#
# You can edit this file again by typing:
#
#     spack edit hiredis
#
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------

from spack.package import *


class Hiredis(MakefilePackage):
    """A minimalistic C client library for the Redis database."""

    homepage = "https://github.com/redis/hiredis"
    url = "https://github.com/redis/hiredis/archive/refs/tags/v1.1.0.tar.gz"
    git = "https://github.com/redis/hiredis"

    version("1.1.0", sha256='fe6d21741ec7f3fc9df409d921f47dfc73a4d8ff64f4ac6f1d95f951bf7f53d6')

    # FIXME: Add dependencies if required.
    depends_on("openssl")

    def edit(self, spec, prefix):
        env['PREFIX'] = prefix
        env['USE_SSL'] = '1'
+38 −0
Original line number Diff line number Diff line
# Copyright 2013-2023 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)

# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack.  We've put "FIXME"
# next to all the things you'll want to change. Once you've handled
# them, you can save this file and test your package like this:
#
#     spack install redis-plus-plus
#
# You can edit this file again by typing:
#
#     spack edit redis-plus-plus
#
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------

from spack.package import *


class RedisPlusPlus(CMakePackage):
    """A C++ client library for Redis"""

    # FIXME: Add a proper url for your package's homepage here.
    homepage = 'https://github.com/sewenew/redis-plus-plus'
    url = 'https://github.com/sewenew/redis-plus-plus/archive/refs/tags/1.3.3.zip'
    git = 'https://github.com/sewenew/redis-plus-plus'

    version('1.3.3', sha256='0bb1b5e459817d8edc53ecf6e893d82c0ea4b459')

    depends_on('cmake@3.2:', type='build')

    depends_on('hiredis@1.1.0:', when='@1.3.3:')
+90 −0
Original line number Diff line number Diff line
# Copyright 2013-2023 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)

# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack.  We've put "FIXME"
# next to all the things you'll want to change. Once you've handled
# them, you can save this file and test your package like this:
#
#     spack install scord
#
# You can edit this file again by typing:
#
#     spack edit scord
#
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------

from spack.package import *


class Scord(CMakePackage):
    """A parallel data stager for malleable applications."""

    homepage = "https://storage.bsc.es/gitlab/eu/admire/io-scheduler"
    url = "https://storage.bsc.es/gitlab/eu/admire/io-scheduler/-/archive/v0.2.0/scord-v0.2.0.tar.bz2"
    git = "https://storage.bsc.es/gitlab/eu/admire/io-scheduler.git"

    maintainers("alberto-miranda")

    # available versions
    version("latest", branch="main")
    version("0.2.0", sha256="cfec167dbba00a62977bde63e6ed23512bd5d053")

    # build variants
    variant('build_type',
            default='Release',
            description='CMake build type',
            values=('Debug', 'Release', 'RelWithDebInfo', 'ASan'))

    variant('tests',
            default=False,
            description='Build and run tests for scord')

    variant("ofi",
            default=True,
            when="@0.2.0:",
            description="Use OFI libfabric as transport library")

    variant("ucx",
            default=False,
            when="@0.2.0:",
            description="Use UCX as transport library")


    # general dependencies
    depends_on("cmake@3.19", type='build')

    # specific dependencies
    # v0.2.0+
    depends_on("argobots@1.1", when='@0.2.0:')
    depends_on("mochi-margo@0.9.8", when='@0.2.0:')
    depends_on("mochi-thallium@0.10.1", when='@0.2.0:')
    depends_on("boost@1.71 +program_options", when='@0.2.0:')
    depends_on("agios@latest", when='@0.2.0:')
    depends_on("redis-plus-plus@1.3.3:", when='@0.2.0:')

    with when("@0.2.0: +ofi"):
        depends_on("libfabric@1.14.0 fabrics=sockets,tcp,rxm")
        depends_on("mercury@2.1.0 +ofi")

    with when("@0.2.0: +ucx"):
        depends_on("ucx@1.12.0")
        depends_on("mercury@2.1.0 +ucx")

    def cmake_args(self):
        """Setup scord CMake arguments"""
        cmake_args = [
            self.define_from_variant('SCORD_BUILD_TESTS', 'tests')
        ]
        return cmake_args

    def check(self):
        """Run tests"""
        with working_dir(self.build_directory):
            make("test", parallel=False)

spack/repo.yaml

0 → 100644
+2 −0
Original line number Diff line number Diff line
repo:
  namespace: 'admire'