Added suppoer for RealRam and Gres

This commit is contained in:
Lukáš Plevač 2024-12-09 10:54:18 +01:00
parent 8bb25a2c6a
commit c2bff00c16

View File

@ -96,11 +96,10 @@ def generateSlurmConfig(source, target):
selfInfoData = selfInfo()
# TODO RealMemory={int(selfInfoData["rams"] / (1024.**2))} Gres={",".join(selfInfoData["res"])} Gres={",".join(selfInfoData["res"])}
hosts = f"NodeName={socket.gethostname()} NodeAddr={get_ip()} CPUs={os.cpu_count()} State=UNKNOWN\n" # first is my self
hosts = f"NodeName={socket.gethostname()} NodeAddr={get_ip()} CPUs={os.cpu_count()} RealMemory={int(selfInfoData["rams"] / (1024.**2))} Gres={",".join(selfInfoData["res"])} State=UNKNOWN\n" # first is my self
noMasterHosts = ""
for host in HOSTS.values():
hosts += f"NodeName={host["name"]} NodeAddr={host["ip"]} CPUs={host["cpus"]} State=UNKNOWN\n"
hosts += f"NodeName={host["name"]} NodeAddr={host["ip"]} CPUs={host["cpus"]} RealMemory={int(host["rams"] / (1024.**2))} Gres={",".join(host["res"])} State=UNKNOWN\n"
noMasterHosts += f"{host["name"]}, "
if len(noMasterHosts) > 0: