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 made a note about it but I can't find my note anymore, nor the relevant message. Can someone please refresh my memory? I'll be more careful with such a note this time, I promise!
Thanks and happy new year!
Found it, I should have asked to my puppet as it's mandatory in some places :-D It is simply
scontrol show hostname gpu[01-02],node[03-04,12-22,27-32,36]
Sorry for the noise
On Mon, Jan 6, 2025 at 12:55 PM Davide DelVento davide.quantum@gmail.com 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 made a note about it but I can't find my note anymore, nor the relevant message. Can someone please refresh my memory? I'll be more careful with such a note this time, I promise!
Thanks and happy new year!
You want: https://slurm.schedmd.com/scontrol.html#OPT_hostnames
-Paul Edmon-
On 1/6/2025 2:58 PM, Davide DelVento via slurm-users wrote:
Found it, I should have asked to my puppet as it's mandatory in some places :-D It is simply
scontrol show hostname gpu[01-02],node[03-04,12-22,27-32,36]
Sorry for the noise
On Mon, Jan 6, 2025 at 12:55 PM Davide DelVento davide.quantum@gmail.com 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 made a note about it but I can't find my note anymore, nor the relevant message. Can someone please refresh my memory? I'll be more careful with such a note this time, I promise! Thanks and happy new year!
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.)
Best, Steffen
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.)
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
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
Hi Jeffrey,
Thanks a lot, I'd like to try out snodelist. Not knowing much about CMake, I couldn't build the tool :-( I've opened an issue on GitHub: https://github.com/University-of-Delaware-IT-RCI/snodelist/issues/1 Can you help me out?
On 07-01-2025 16:27, Jeffrey Frey via slurm-users wrote:
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
Thanks, Ole
Ole,
I added a brief "how to build" to the README.md, hope that helps. I also commented on your issue on Github — your environment doesn't seem to have the slurm.h header that's expected. What version of Slurm are you running?
-Jeff
On Jan 7, 2025, at 13:26, Ole Holm Nielsen via slurm-users slurm-users@lists.schedmd.com wrote:
Hi Jeffrey,
Thanks a lot, I'd like to try out snodelist. Not knowing much about CMake, I couldn't build the tool :-( I've opened an issue on GitHub: https://github.com/University-of-Delaware-IT-RCI/snodelist/issues/1 Can you help me out?
On 07-01-2025 16:27, Jeffrey Frey via slurm-users wrote:
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
Thanks, Ole
-- slurm-users mailing list -- slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.com
Hi Jeffrey,
We run Slurm 24.05.5. I now used the RockyLinux 8.10 versions of gcc and cmake according to the instructions in README.md, but the build is still failing.
/Ole
On 07-01-2025 20:14, Jeffrey Frey wrote:
Ole,
I added a brief "how to build" to the README.md, hope that helps. I also commented on your issue on Github — your environment doesn't seem to have the slurm.h header that's expected. What version of Slurm are you running?
-Jeff
On Jan 7, 2025, at 13:26, Ole Holm Nielsen via slurm-users slurm-users@lists.schedmd.com wrote:
Hi Jeffrey,
Thanks a lot, I'd like to try out snodelist. Not knowing much about CMake, I couldn't build the tool :-( I've opened an issue on GitHub: https://github.com/University-of-Delaware-IT-RCI/snodelist/issues/1 Can you help me out?
On 07-01-2025 16:27, Jeffrey Frey via slurm-users wrote:
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
Thanks, Ole
As cited on the issue, between Slurm 23.02 and 23.11 the defined type `hostlist_t` was changed by the developers. Prior to 23.11 it was an opaque pointer to a hostlist_t data structure; in 23.11 it is the data structure itself. This means that all hostlist API functions changed, as well, to directly use `hostlist_t*` arguments instead of `hostlist_t` arguments. The snodelist code was written against pre-23.11 releases of Slurm where `hostlist_t` is an opaque pointer. So in post-23.11 situations — where it's a data structure, not a pointer — the compilation fails because there is no definition of `struct hostlist` present in the header.
Very annoying, but I added a version-based adaptation in the source to get around it. Should compile on 23.11 and newer now...unless there are other big changes they made to the API :-)
On Jan 7, 2025, at 14:45, Ole Holm Nielsen Ole.H.Nielsen@fysik.dtu.dk wrote:
Hi Jeffrey,
We run Slurm 24.05.5. I now used the RockyLinux 8.10 versions of gcc and cmake according to the instructions in README.md, but the build is still failing.
/Ole
On 07-01-2025 20:14, Jeffrey Frey wrote:
Ole, I added a brief "how to build" to the README.md, hope that helps. I also commented on your issue on Github — your environment doesn't seem to have the slurm.h header that's expected. What version of Slurm are you running? -Jeff
On Jan 7, 2025, at 13:26, Ole Holm Nielsen via slurm-users slurm-users@lists.schedmd.com wrote:
Hi Jeffrey,
Thanks a lot, I'd like to try out snodelist. Not knowing much about CMake, I couldn't build the tool :-( I've opened an issue on GitHub: https://github.com/University-of-Delaware-IT-RCI/snodelist/issues/1 Can you help me out?
On 07-01-2025 16:27, Jeffrey Frey via slurm-users wrote:
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
Thanks, Ole
Davide, the 'nodeset' command can be used here
nodeset -e -S '\n' node[03-04,12-22,27-32,36]
On Mon, 6 Jan 2025 at 19:58, Davide DelVento via slurm-users < slurm-users@lists.schedmd.com> 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 made a note about it but I can't find my note anymore, nor the relevant message. Can someone please refresh my memory? I'll be more careful with such a note this time, I promise!
Thanks and happy new year!
-- slurm-users mailing list -- slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.com