Print the number of cpus in use per job in slurm?
We have switched to using slurm from sge for our cluster job queuing system. In sge when you used the
qstat function it printed the number of cpus/slots in use per job - is there a simple way to do this in slurm?
squeue only shows the number of nodes used per job. Thanks.
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) 1981 q run-01 root R 16:21 1 node001 1982 q run-02 root R 16:21 1 node002 1983 q run-03 root R 16:21 1 node003
squeuecommand has two parameters that allow choosing the columns displayed in the output
--Format. Each have an option (respectively
NumCPUs) to display the number of cores requested by the job.
squeue -o "%.18i %.9P %.8j %.8u %.2t %.10M %.6D %R %c"
This will show the default columns and add the number of cores as the last column. You can fiddle with the format string to arrange the columns as you want. Then, when you are happy with the output, you can set it as the value of the
SQUEUE_FORMATvariable in your
export SQUEUE_FORMAT='%.18i %.9P %.8j %.8u %.2t %.10M %.6D %R %c'
See the squeue man page for more details.