summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/dbus/package.py4
-rw-r--r--var/spack/repos/builtin/packages/slurm/package.py18
2 files changed, 22 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py
index 69cda7b477..37a1b8a694 100644
--- a/var/spack/repos/builtin/packages/dbus/package.py
+++ b/var/spack/repos/builtin/packages/dbus/package.py
@@ -29,6 +29,7 @@ class Dbus(AutotoolsPackage):
version("1.8.2", sha256="5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08")
variant("xml_docs", default=False, description="Build XML documentation")
+ variant("system-socket", default="default", description="Location for the DBus system socket")
depends_on("pkgconfig", type="build")
depends_on("docbook-xml", type="build")
@@ -41,6 +42,9 @@ class Dbus(AutotoolsPackage):
def configure_args(self):
args = ["--disable-systemd", "--disable-launchd"]
args += self.enable_or_disable("xml-docs", variant="xml_docs")
+ socket = self.spec.variants["system-socket"].value
+ if socket != "default":
+ args += ["--with-system-socket={0}".format(socket)]
return args
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/slurm/package.py b/var/spack/repos/builtin/packages/slurm/package.py
index 61214702b0..aa4f126018 100644
--- a/var/spack/repos/builtin/packages/slurm/package.py
+++ b/var/spack/repos/builtin/packages/slurm/package.py
@@ -129,6 +129,10 @@ class Slurm(AutotoolsPackage):
description="Set system configuration path (possibly /etc/slurm)",
)
variant("restd", default=False, description="Enable the slurmrestd server")
+ variant("nvml", default=False, description="Enable NVML autodetection")
+ variant("cgroup", default=False, description="Enable cgroup plugin")
+ variant("pam", default=False, description="Enable PAM support")
+ variant("rsmi", default=False, description="Enable ROCm SMI support")
# TODO: add variant for BG/Q and Cray support
@@ -156,6 +160,11 @@ class Slurm(AutotoolsPackage):
depends_on("libyaml", when="+restd")
depends_on("libjwt", when="+restd")
+ depends_on("cuda", when="+nvml")
+ depends_on("dbus", when="+cgroup")
+ depends_on("linux-pam", when="+pam")
+ depends_on("rocm-smi-lib", when="+rsmi")
+
executables = ["^srun$", "^salloc$"]
@classmethod
@@ -213,6 +222,15 @@ class Slurm(AutotoolsPackage):
else:
args.append("--without-pmix")
+ if spec.satisfies("+nvml"):
+ args.append(f"--with-nvml={spec['cuda'].prefix}")
+
+ if spec.satisfies("+pam"):
+ args.append(f"--with-pam_dir={spec['linux-pam'].prefix}")
+
+ if spec.satisfies("+rsmi"):
+ args.append(f"--with-rsmi={spec['rocm-smi-lib'].prefix}")
+
sysconfdir = spec.variants["sysconfdir"].value
if sysconfdir != "PREFIX/etc":
args.append("--sysconfdir={0}".format(sysconfdir))