Cancel range of job numbers with Torque

If you use Torque to submit jobs to a cluster, you will need to cancel jobs sometimes. In a previous post I showed how to cancel all jobs, but perhaps you want to leave some running. If this is the case, you could list each job number to cancel:

qdel 12240967 12240968 12240969 12240970 12240971 12240972 12240973 12240974 12240975 12240976 12240977 12240978

Not very elegant, especially if you have hundreds of jobs. Instead do something like this:

qdel {12240967..12240978}

Note: you get the job numbers by doing:

qstat -u <username>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s