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
>Does
>
>sinfo -h -O nodehost -p partition | sort
>
>help?
Yes that also works. Thanks Henk.
Regards,
Mahmood
>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
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
Subject: [slurm-users] Getting nodes in a partition
Hi,
Is there any slurm variable to read the node names of a partition?
There is an MPI option --hostfile which we can write the node names.
I want to use something like this in the sbatch script:
#SBATCH --partition=MYPART
... --hostfile
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
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:([
Hi,
Is there any slurm variable to read the node names of a partition?
There is an MPI option --hostfile which we can write the node names.
I want to use something like this in the sbatch script:
#SBATCH --partition=MYPART
... --hostfile $SLURM_NODES_IN_PARTITION
I can manually manipulate