Re: [slurm-users] Getting nodes in a partition

2018-05-18 Thread Brian Andrus
I saw you got some good answers, but a quick note on mpi. For some of them, you are compiling it yourself, they can be "slurm-aware" (eg: openmpi). Then when you do 'mpirun' it automatically knows your inherited hostlist and you need do nothing extra when running. Brian Andrus On 5/18/2018 1

Re: [slurm-users] Getting nodes in a partition

2018-05-18 Thread Mahmood Naderan
>Does > >sinfo -h -O nodehost -p partition | sort > >help? Yes that also works. Thanks Henk. Regards, Mahmood

Re: [slurm-users] Getting nodes in a partition

2018-05-18 Thread Mahmood Naderan
>slurm comes with hostlist extraction: > >[mahmood@rocks7 ~]$ scontrol show hostnames $(scontrol show partition MYPART | >grep -w Nodes | cut -d '=' -f 2) Excellent. That works. Many thanks... I wrote the following method before that! [mahmood@rocks7 ~]$ cat nodes.sh #!/bin/bash NAMES=`scontr

Re: [slurm-users] Getting nodes in a partition

2018-05-18 Thread Ole Holm Nielsen
Hi, It seems to me that the sinfo command is the simplest solution to listing hosts in a partition. Here is an example: # sinfo -N -p xeon8_48 NODELIST NODES PARTITION STATE d001 1 xeon8_48 idle d002 1 xeon8_48 idle d003 1 xeon8_48 idle d004 1 xeo

Re: [slurm-users] Getting nodes in a partition

2018-05-18 Thread SLIM, HENK A.
Does sinfo -h -O nodehost -p partition | sort help? Also scontrol show hostname nodelist where nodelist is compute-0-\[4-6\] would work. Regards Henk -Original Message- From: slurm-users On Behalf Of Mahmood Naderan Sent: 18 May 2018 08:12 To: Slurm User Community List Subject

Re: [slurm-users] Getting nodes in a partition

2018-05-18 Thread Marcus Wagner
Hi Mahmood, slurm comes with hostlist extraction: [mahmood@rocks7 ~]$ scontrol show hostnames $(scontrol show partition MYPART | grep -w Nodes | cut -d '=' -f 2) This would then be compute-0-4 compute-0-5 compute-0-6 Best Marcus On 05/18/2018 09:11 AM, Mahmood Naderan wrote: Hi, Is there

Re: [slurm-users] Getting nodes in a partition

2018-05-18 Thread Renat Yakupov
Hi Mahmood, I needed something similar and here is what I was suggested to do. You need to further modify the node list to be bash-friendly using curly-bracketed ranges: MYPART=debug NODES=`scontrol show partition $MYPART | grep -w Nodes | cut -d '=' -f 2 | sed -r -e 's:[[](.*)[]]:{\1}:' -e 's:([