Aktualizovat versions/slave/airootfs/discover.py
Some checks failed
Build / build (push) Has been cancelled
Some checks failed
Build / build (push) Has been cancelled
This commit is contained in:
parent
480b6f4819
commit
9a19338ce9
@ -52,6 +52,8 @@ def selfInfo():
|
|||||||
|
|
||||||
|
|
||||||
def loadHosts():
|
def loadHosts():
|
||||||
|
global HOSTS, MASTER
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open('/etc/slurm-llnl/hosts.json', 'r') as file:
|
with open('/etc/slurm-llnl/hosts.json', 'r') as file:
|
||||||
HOSTS = json.load(file)
|
HOSTS = json.load(file)
|
||||||
@ -70,6 +72,9 @@ def updateHosts():
|
|||||||
json.dump(HOSTS, outfile)
|
json.dump(HOSTS, outfile)
|
||||||
|
|
||||||
def generateSlurmConfig(source, target):
|
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
|
hosts = f"NodeName={socket.gethostname()} NodeAddr={get_ip()} CPUs={os.cpu_count()} State=UNKNOWN\n" # first is my self
|
||||||
noMasterHosts = ""
|
noMasterHosts = ""
|
||||||
for host in HOSTS.values():
|
for host in HOSTS.values():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user