From 848d2705486117c39f6971af9b232628ce7b7b3a Mon Sep 17 00:00:00 2001 From: stepanvanecek Date: Mon, 27 Nov 2023 15:21:57 +0100 Subject: sys-sage: update repo url, rework recipe (#41005) Co-authored-by: Stepan Vanecek Co-authored-by: Massimiliano Culpo --- .../repos/builtin/packages/sys-sage/package.py | 69 +++++++++++++++++++--- 1 file changed, 61 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/sys-sage/package.py b/var/spack/repos/builtin/packages/sys-sage/package.py index 9670e01aa9..0fb153bf0e 100644 --- a/var/spack/repos/builtin/packages/sys-sage/package.py +++ b/var/spack/repos/builtin/packages/sys-sage/package.py @@ -3,23 +3,76 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - from spack.package import * class SysSage(CMakePackage): - """A library for capturing hadrware topology and attributes of compute systems.""" + """A library for capturing hardware topology and attributes of compute systems.""" - homepage = "https://github.com/stepanvanecek/sys-sage" - url = "https://github.com/stepanvanecek/sys-sage/archive/refs/tags/v0.1.1-alpha.2.tar.gz" - git = "https://github.com/stepanvanecek/sys-sage.git" + homepage = "https://github.com/caps-tum/sys-sage" + url = "https://github.com/caps-tum/sys-sage/archive/refs/tags/v0.4.3.tar.gz" + git = "https://github.com/caps-tum/sys-sage.git" maintainers("stepanvanecek") + version("0.4.3", sha256="e24313c4274576c1511a62e1b27c86a78cea7e4c123b8a53303cfc70de978faa") version("master", branch="master") - version( - "0.1.1-alpha.2", sha256="991a77cf37b061a911c8566fd4486f914de4f4c8cdf39112ec8a32903450c178" + version("develop", branch="develop") + + conflicts("%gcc@:7", msg="gcc can be used from version 8 and above") + + variant( + "nvidia_mig", + default=False, + description="Build and install functionality regarding NVidia MIG(multi-instance GPU, " + "ampere or newer).", + ) + variant( + "cpuinfo", + default=True, + description="Build and install functionality regarding Linux cpuinfo (only x86) -- " + "default ON.", + ) + variant( + "build_data_sources", + default=False, + when="platform=linux", + description="Build all data sources (programs to collect data about the machine sys-sage " + "runs on).", + ) + variant( + "ds_hwloc", + default=False, + description="Builds the hwloc data source for retrieving the CPU topology", + ) + variant( + "ds_numa", + default=False, + when="platform=linux", + description="builds the caps-numa-benchmark. If turned on, includes Linux-specific " + "libraries.", ) - depends_on("cmake@3.21:", type="build") + depends_on("cmake@3.22:", type="build") depends_on("libxml2@2.9.13:") + + depends_on("numactl", when="+build_data_sources platform=linux") + depends_on("numactl", when="+ds_numa platform=linux") + depends_on("hwloc@2.9:", when="+build_data_sources") + depends_on("hwloc@2.9:", when="+ds_hwloc") + depends_on("cuda", when="+nvidia_mig platform=linux") + depends_on("cuda", when="+build_data_sources platform=linux") + + def cmake_args(self): + spec = self.spec + args = [] + args.append(self.define_from_variant("NVIDIA_MIG", "nvidia_mig")) + if "+cpuinfo" in spec and spec.target == "x86_64" and spec.platform == "linux": + args.append(self.define("CPUINFO", True)) + else: + args.append(self.define("CPUINFO", False)) + if "+ds_hwloc" in spec or "+build_data_sources" in spec: + args.append(self.define("DS_HWLOC", True)) + if "+ds_numa" in spec or "+build_data_sources" in spec: + args.append(self.define("DS_NUMA", True)) + return args -- cgit v1.2.3-70-g09d2