Aktualizovat versions/slave/airootfs/discover.py
Some checks failed
Build / build (push) Has been cancelled

This commit is contained in:
Lukáš Plevač 2024-10-29 07:57:13 +01:00
parent 480b6f4819
commit 9a19338ce9

View File

@ -52,6 +52,8 @@ def selfInfo():
def loadHosts():
global HOSTS, MASTER
try:
with open('/etc/slurm-llnl/hosts.json', 'r') as file:
HOSTS = json.load(file)
@ -70,6 +72,9 @@ def updateHosts():
json.dump(HOSTS, outfile)
def generateSlurmConfig(source, target):
if MASTER is None:
return
hosts = f"NodeName={socket.gethostname()} NodeAddr={get_ip()} CPUs={os.cpu_count()} State=UNKNOWN\n" # first is my self
noMasterHosts = ""
for host in HOSTS.values():