I am working on power logging of a GPU cluster I am working with. I am running jobs on multiple hosts. I wanst to create a file , one for each host, which has a unique filename containing the host name. Something like clush -w $SLURM_JOB_NODELIST "touch file$(hostname)"
My foo is weak today. Help me Ole Wan Neilsen or any $Jedi
Not sure I completely understand what you need, but if I do... How about
touch whatever_prefix_$(scontrol show hostname whatever_list)
where whatever_list could be your $SLURM_JOB_NODELIST ?
On Fri, Feb 14, 2025 at 9:42 AM John Hearns via slurm-users < slurm-users@lists.schedmd.com> wrote:
I am working on power logging of a GPU cluster I am working with. I am running jobs on multiple hosts. I wanst to create a file , one for each host, which has a unique filename containing the host name. Something like clush -w $SLURM_JOB_NODELIST "touch file$(hostname)"
My foo is weak today. Help me Ole Wan Neilsen or any $Jedi
-- slurm-users mailing list -- slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.com
Actually I hit sent too quickly, what I meant (assuming bash) is
for a in $(scontrol show hostname whatever_list); do touch $a; done
with the same whatever_list being $SLURM_JOB_NODELIST
On Fri, Feb 14, 2025 at 1:18 PM Davide DelVento davide.quantum@gmail.com wrote:
Not sure I completely understand what you need, but if I do... How about
touch whatever_prefix_$(scontrol show hostname whatever_list)
where whatever_list could be your $SLURM_JOB_NODELIST ?
On Fri, Feb 14, 2025 at 9:42 AM John Hearns via slurm-users < slurm-users@lists.schedmd.com> wrote:
I am working on power logging of a GPU cluster I am working with. I am running jobs on multiple hosts. I wanst to create a file , one for each host, which has a unique filename containing the host name. Something like clush -w $SLURM_JOB_NODELIST "touch file$(hostname)"
My foo is weak today. Help me Ole Wan Neilsen or any $Jedi
-- slurm-users mailing list -- slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.com
John Hearns via slurm-users slurm-users@lists.schedmd.com writes:
I am working on power logging of a GPU cluster I am working with. I am running jobs on multiple hosts. I wanst to create a file , one for each host, which has a unique filename containing the host name. Something like clush -w $SLURM_JOB_NODELIST "touch file$(hostname)"
Doing
clush -w $SLURM_JOB_NODELIST "touch file$(hostname)"
will expand $(hostname) on the host where you run clush as the double quotes do not stop the local shell from expanding. Try single quotes instead, like
clush -w $SLURM_JOB_NODELIST 'touch file$(hostname)'
Best Regards,
-- Kent Engström, National Supercomputer Centre kent@nsc.liu.se, +46 13 28 4444