Slurm job, knowing what node it is on

Viewed 6730

Is there a way in bash/slurm for the script to know which node it is running on?

so I sbatch a bash script called wrapCode.sh, and I am monitoring script time as well as which node it is running on. I know how to monitor the script time, but is there a way to echo out at the end which node I was on?

sstat does this, but I need to know what my job id is, which the script also doesn't seem to know (or at least I haven't been able to find it).

4 Answers

Knowing the job id from previous answers, you can also use sacct in a terminal to get resources allocated to your job, including node names:

sacct -j JOB_ID --format=JobID,Start,End,Elapsed,NCPUS,NodeList,NTasks
Related