[slurm-users] Getting nodes in a partition
toomuchit at gmail.com
Fri May 18 08:03:48 MDT 2018
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.
On 5/18/2018 12:11 AM, Mahmood Naderan wrote:
> 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 the output of scontrol to extract node
> names. Like this:
> [mahmood at rocks7 ~]$ scontrol show partition MYPART | grep -w Nodes |
> cut -d '=' -f 2
> But that basically is not
> Which I have to post process more. Any better idea?
More information about the slurm-users