The scontrol command has options to translate:

$ scontrol show hostlist tux1,tux3,tux4
tux[1,3-4]
$ scontrol show hostnames tux[1,3-4]
tux1
tux3
tux4


Quoting Sergey Linev <s.li...@gsi.de>:

Hi,

When running batch job, two variables defines number and list of nodes, where job should be run: SLURM_JOB_NUM_NODES and SLURM_JOB_NODELIST.

Is there easy way (shell command) to extract node name for every node, listed in SLURM_JOB_NODELIST?

With best regards,
Sergey

--

Dr. Sergey Linev,
GSI Helmholtzzentrum für Schwerionenforschung GmbH




Reply via email to