Added NVML and cgroup support to the slurm package (#40638)
* Added NVML support to the slurm package * dbus package is required for cgroup support * Fixing formatting * Style fix * Added PAM support * Added ROCm SMI support
This commit is contained in:
parent
702a2250fa
commit
81997ae6d6
2 changed files with 22 additions and 0 deletions
|
@ -29,6 +29,7 @@ class Dbus(AutotoolsPackage):
|
||||||
version("1.8.2", sha256="5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08")
|
version("1.8.2", sha256="5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08")
|
||||||
|
|
||||||
variant("xml_docs", default=False, description="Build XML documentation")
|
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("pkgconfig", type="build")
|
||||||
depends_on("docbook-xml", type="build")
|
depends_on("docbook-xml", type="build")
|
||||||
|
@ -41,6 +42,9 @@ class Dbus(AutotoolsPackage):
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
args = ["--disable-systemd", "--disable-launchd"]
|
args = ["--disable-systemd", "--disable-launchd"]
|
||||||
args += self.enable_or_disable("xml-docs", variant="xml_docs")
|
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
|
return args
|
||||||
|
|
||||||
@run_after("install")
|
@run_after("install")
|
||||||
|
|
|
@ -129,6 +129,10 @@ class Slurm(AutotoolsPackage):
|
||||||
description="Set system configuration path (possibly /etc/slurm)",
|
description="Set system configuration path (possibly /etc/slurm)",
|
||||||
)
|
)
|
||||||
variant("restd", default=False, description="Enable the slurmrestd server")
|
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
|
# TODO: add variant for BG/Q and Cray support
|
||||||
|
|
||||||
|
@ -156,6 +160,11 @@ class Slurm(AutotoolsPackage):
|
||||||
depends_on("libyaml", when="+restd")
|
depends_on("libyaml", when="+restd")
|
||||||
depends_on("libjwt", 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$"]
|
executables = ["^srun$", "^salloc$"]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -213,6 +222,15 @@ def configure_args(self):
|
||||||
else:
|
else:
|
||||||
args.append("--without-pmix")
|
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
|
sysconfdir = spec.variants["sysconfdir"].value
|
||||||
if sysconfdir != "PREFIX/etc":
|
if sysconfdir != "PREFIX/etc":
|
||||||
args.append("--sysconfdir={0}".format(sysconfdir))
|
args.append("--sysconfdir={0}".format(sysconfdir))
|
||||||
|
|
Loading…
Reference in a new issue