On Thu, Jun 22, 2017 at 2:11 AM, Kent Engström <[email protected]> wrote: > slighly off topic, but if you are willing to install and use an external > program that is not part of SLURM itself, I might perhaps be allowed to > advertise the python-hostlist package?
And I'd like to also advertise the great powers of ClusterShell [1]: $ squeue -u user123 -h -o "%N" | nodeset -f with -f as in "fold". ClusterShell is incredibly useful, it provides not only a parallel shell for remote execution (and file distribution, output aggregation or diff'ing...), but also an event-driven Python library that can be used in your Python scripts, and CLI tools to manipulate node sets (any kind of logical operation between node groups, expansion, multi-dimensional folding, counting, stepping, you name it). Oh, and the tree mode [3]? You have to try it. I can only encourage you to give a look at the documentation [2], there are too many awesome features to describe here. ;) [1] https://cea-hpc.github.io/clustershell/ [2] https://clustershell.readthedocs.io/en/latest/intro.html [3] https://clustershell.readthedocs.io/en/latest/tools/clush.html#tree-mode Cheers, -- Kilian
