MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / get_slurm_nodes

Function get_slurm_nodes

benchmarks/src/clusterutils/node_list.py:47–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46
47def get_slurm_nodes() -> List[str]:
48 assert is_inside_slurm()
49 output = subprocess.check_output(["scontrol", "show", "hostnames"])
50 return [node.strip() for node in output.decode().split("\n") if node.strip()]
51
52
53def is_inside_slurm() -> bool:

Callers 1

resolveMethod · 0.85

Calls 2

is_inside_slurmFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected