Skip to content

Commit

Permalink
mercury: add v2.3.0 (spack#38279)
Browse files Browse the repository at this point in the history
* fix Boost dependency

* fix testing and move psm2/sockets as unsupported

* fix style to separate maintainers/tags/version
  • Loading branch information
soumagne authored Jun 12, 2023
1 parent 8db5fec commit 92593fe
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions var/spack/repos/builtin/packages/mercury/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
from spack.pkg.builtin.boost import Boost


class Mercury(CMakePackage):
Expand All @@ -14,8 +13,11 @@ class Mercury(CMakePackage):
git = "https://github.com/mercury-hpc/mercury.git"

maintainers("soumagne")

tags = ["e4s"]

version("master", branch="master", submodules=True)
version("2.3.0", sha256="e9e62ce1bb2fd482f0e85ad75fa255d9750c6fed50ba441a03de93b3b8eae742")
version("2.2.0", sha256="e66490cf63907c3959bbb2932b5aaf51d96a481b17f0935f409f3a862eff97f6")
version("2.1.0", sha256="9a58437161e9273b1b1c484d2f1a477a89eea9afe84575415025d47656f3761b")
version("2.0.1", sha256="335946d9620ac669643ffd9861a5fb3ee486834bab674b7779eaac9d6662e3fa")
Expand Down Expand Up @@ -59,17 +61,9 @@ class Mercury(CMakePackage):
depends_on("libfabric@1.7:", when="@2.1.0:")
# openpa dependency is removed in 2.1.0
depends_on("openpa@1.0.3:", when="@:2.0.1%gcc@:4.8")
# We only need Boost preprocessor headers
depends_on("boost@1.48:", when="+boostsys")

# TODO: replace this with an explicit list of components of Boost,
# for instance depends_on('boost +filesystem')
# See https://github.com/spack/spack/pull/22303 for reference
depends_on(Boost.with_default_variants, when="+boostsys")
depends_on("boost", when="@:0.9") # internal boost headers were added in 1.0.0
# TODO: replace this with an explicit list of components of Boost,
# for instance depends_on('boost +filesystem')
# See https://github.com/spack/spack/pull/22303 for reference
depends_on(Boost.with_default_variants, when="@:0.9")
depends_on("ucx+thread_multiple", when="+ucx")

# Fix CMake check_symbol_exists
Expand All @@ -91,7 +85,6 @@ def cmake_args(self):

cmake_args = [
define_from_variant("BUILD_SHARED_LIBS", "shared"),
define("BUILD_TESTING", self.run_tests),
define("MERCURY_USE_BOOST_PP", True),
define_from_variant("MERCURY_USE_CHECKSUMS", "checksum"),
define("MERCURY_USE_SYSTEM_MCHECKSUM", False),
Expand All @@ -101,6 +94,9 @@ def cmake_args(self):
define_from_variant("NA_USE_SM", "sm"),
]

if "@2.3.0:" in spec:
cmake_args.append(define("BUILD_TESTING_UNIT", self.run_tests))

if "@2.2.0:" in spec:
cmake_args.extend(
[
Expand Down Expand Up @@ -147,7 +143,7 @@ def cmake_args(self):
if "gni" in ofi_fabrics:
cmake_args.append(define_from_variant("NA_OFI_GNI_USE_UDREG", "udreg"))
if self.run_tests:
supported = ["sockets", "tcp", "verbs", "psm2", "gni"]
supported = ["tcp", "verbs", "gni", "cxi"]
ofi_test_fabrics = list(filter(lambda x: x in supported, ofi_fabrics))
cmake_args.append(
define("NA_OFI_TESTING_PROTOCOL", format(";".join(ofi_test_fabrics)))
Expand All @@ -158,5 +154,5 @@ def cmake_args(self):
def check(self):
"""Unit tests fail when run in parallel."""

with working_dir(self.build_directory):
with working_dir(self.builder.build_directory):
make("test", parallel=False)

0 comments on commit 92593fe

Please sign in to comment.