Hi Paul,
On 8/9/24 18:45, Paul Edmon via slurm-users wrote:
As I recall I think OpenMPI needs a list that has an entry on each line, rather than one seperated by a space. See:
[root@holy7c26401 ~]# echo $SLURM_JOB_NODELIST holy7c[26401-26405] [root@holy7c26401 ~]# scontrol show hostnames $SLURM_JOB_NODELIST holy7c26401 holy7c26402 holy7c26403 holy7c26404 holy7c26405
[root@holy7c26401 ~]# list=$(scontrol show hostname $SLURM_NODELIST) [root@holy7c26401 ~]# echo $list holy7c26401 holy7c26402 holy7c26403 holy7c26404 holy7c26405
proper quoting does wonders here (please consult the man-page of bash). If you try
echo "$list"
you will see that you will get
holy7c26401 holy7c26402 holy7c26403 holy7c26404 holy7c26405
So you *can* pass this around in a variable if you use "$variable" whenever you provide it to a utility.
Regards, Hermann