Skip to content

scancel to Cancel One or More Jobs

Simplest usage#

scancel <jobid1> <jobid2> : cancel job with the specified job ids

If you have made an error in the qos, partition... and that your job is still PENDING, you can update it with scontrol command. This way, you don't loose the anteriority of your job that plays a role in the computation of its Priority.

Useful options#

  • -u <yourlogin>: cancel all jobs submitted by yourself (you are not allowed to cancel jobs belonging to others)
  • --name=<jobname> : cancel all jobs with that name (option -J of sbatch or srun)
  • --state=<STATE> : cancel all jobs with that state (RUNNING or R, PENDING or PD)
  • --nodelist=<nodename1,nodename2>: cancel all jobs running on these specific nodes (comma-separated)
  • -p <partition name>: cancel all jobs submitted in that partition (running or pending)
  • --qos=<qos name> : cancel all jobs submitted in that qos (running or pending)

Examples#

Cancel all your PENDING jobs submitted in the dedicated partition with the fast qos:

Code Block (bash)

login@maestro-submit ~ $ scancel -u <your login> --state=PD -p dedicated --qos=fast

Cancel all your jobs with name wrap:

Code Block (bash)

login@maestro-submit ~ $ scancel -u <your login> --name=wrap

Cancel all your jobs with job id in the range [ 2055871-2055884 ] and only yours:

Code Block (bash)

login@maestro-submit ~ $ scancel -u <your login>  {2055871..2055884}

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.

false5FAQAfalsemodifiedtruepagelabel = "cancel" and type = "page" and space = "FAQA"cancel

true

Related issues