We use a tool that's compiled against the Slurm library itself so that the expansion/contraction of lists is always 100% in sync with Slurm itself:
https://github.com/jtfrey/snodelist
On Jan 7, 2025, at 10:12, Davide DelVento via slurm-users slurm-users@lists.schedmd.com wrote:
Wonderful. Thanks Ole for the reminder! I had bookmarked your wiki (of course!) but forgot to check it out in this case. I'll add a more prominent reminder to self in my notes to always check it!
Happy new year everybody once again
On Tue, Jan 7, 2025 at 1:58 AM Ole Holm Nielsen via slurm-users slurm-users@lists.schedmd.com wrote: Hi,
My 2 cents: I have collected various Slurm hostlist commands in this Wiki page:
https://wiki.fysik.dtu.dk/Niflheim_system/Slurm_operations/#expanding-and-co...
Best regards, Ole
On 1/7/25 09:25, Steffen Grunewald via slurm-users wrote:
On Mon, 2025-01-06 at 12:55:12 -0700, Slurm users wrote:
Hi all, I remember seeing on this list a slurm command to change a slurm-friendly list such as
gpu[01-02],node[03-04,12-22,27-32,36]
into a bash friendly list such as
gpu01 gpu02 node03 node04 node12 etc
I always forget that one as well ("scontrol show hostlist" works in the opposite direction) but I have a workaround at hand:
pdsh -w gpu[01-02],node[03-04,12-22,27-32,36] -N -R exec echo %h
You may use "-f 1", if you prefer a sorted output. (I use to pipe the output through "xargs" most of the time, too.)
-- slurm-users mailing list -- slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.com
-- slurm-users mailing list -- slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.com