Running jobs: Difference between revisions

sq instead of squeue -u $USER
(Marked this version for translation)
(sq instead of squeue -u $USER)
Line 58: Line 58:
Adding to this confusion, Slurm interprets K, M, G, etc., as [https://en.wikipedia.org/wiki/Binary_prefix binary prefixes], so <code>--mem=125G</code> is equivalent to <code>--mem=128000M</code>.  See the "available memory" column in the "Node characteristics" table for each GP cluster for the Slurm specification of the maximum memory you can request on each node: [[Béluga/en#Node_characteristics|Béluga]], [[Cedar#Node_characteristics|Cedar]], [[Graham#Node_characteristics|Graham]].
Adding to this confusion, Slurm interprets K, M, G, etc., as [https://en.wikipedia.org/wiki/Binary_prefix binary prefixes], so <code>--mem=125G</code> is equivalent to <code>--mem=128000M</code>.  See the "available memory" column in the "Node characteristics" table for each GP cluster for the Slurm specification of the maximum memory you can request on each node: [[Béluga/en#Node_characteristics|Béluga]], [[Cedar#Node_characteristics|Cedar]], [[Graham#Node_characteristics|Graham]].


==Use <code>squeue</code> to list jobs== <!--T:60-->
==Use <code>sq</code> to list jobs== <!--T:60-->


<!--T:61-->
<!--T:61-->
The [https://slurm.schedmd.com/squeue.html <code>squeue</code>] command lists pending and running jobs. Supply your username as an argument with <code>-u</code> to list only your own jobs:
The <code>sq</code> command lists pending and running jobs which belong to you:


<!--T:62-->
<!--T:62-->
<source lang="bash">
<source lang="bash">
$ squeue -u $USER
$ sq
       JOBID PARTITION      NAME    USER ST  TIME  NODES NODELIST(REASON)
       JOBID PARTITION      NAME    USER ST  TIME  NODES NODELIST(REASON)
     123456 cpubase_b  simple_j someuser  R  0:03      1 cdr234
     123456 cpubase_b  simple_j someuser  R  0:03      1 cdr234
Line 72: Line 72:


<!--T:12-->
<!--T:12-->
The ST column of the output shows the status of each job. The two most common states are "PD" for "pending" or "R" for "running". See the [https://slurm.schedmd.com/squeue.html squeue page]
The ST column of the output shows the status of each job. The two most common states are "PD" for "pending" or "R" for "running".  
for more on selecting, formatting, and interpreting the <code>squeue</code> output.
 
The general command for checking the status of Slurm jobs is <code>squeue</code>, but by default it supplies information about ''all'' jobs in the system, not just your own.  If you want to see different information about jobs than <code>sq</code> provides, use  <code>squeue</code>.  See the [https://slurm.schedmd.com/squeue.html online manual page for squeue] for more on selecting, formatting, and interpreting the <code>squeue</code> output.


<!--T:115-->
<!--T:115-->
'''Do not''' run <code>squeue</code> from a script or program at high frequency, ''e.g.,'' every few seconds. Responding to <code>squeue</code> adds load to Slurm, and may interfere with its performance or correct operation.  See [[#Email_notification|Email notification]] below for another way to learn when your job starts or ends.
'''Do not''' run <code>sq</code> or <code>squeue</code> from a script or program at high frequency, ''e.g.,'' every few seconds. Responding to <code>squeue</code> adds load to Slurm, and may interfere with its performance or correct operation.  See [[#Email_notification|Email notification]] below for another way to learn when your job starts or ends.


==Where does the output go?== <!--T:63-->
==Where does the output go?== <!--T:63-->
Bureaucrats, cc_docs_admin, cc_staff
2,879

edits