Fix root node resolution in slurm environment
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Nicki Skafte <skaftenicki@gmail.com> Co-authored-by: chaton <thomas@grid.ai>
This commit is contained in:
parent
fd6b3ec349
commit
1d99530c66
|
@ -28,7 +28,7 @@ class SLURMEnvironment(ClusterEnvironment):
|
|||
# figure out the root node addr
|
||||
slurm_nodelist = os.environ.get("SLURM_NODELIST")
|
||||
if slurm_nodelist:
|
||||
root_node = slurm_nodelist.split(" ")[0]
|
||||
root_node = slurm_nodelist.split(" ")[0].split(",")[0]
|
||||
else:
|
||||
root_node = "127.0.0.1"
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ class SLURMConnector:
|
|||
# figure out the root node addr
|
||||
root_node = os.environ.get("SLURM_NODELIST")
|
||||
if root_node:
|
||||
root_node = root_node.split(" ")[0]
|
||||
root_node = root_node.split(" ")[0].split(",")[0]
|
||||
else:
|
||||
root_node = "127.0.0.1"
|
||||
|
||||
|
|
Loading…
Reference in New Issue