8
$\begingroup$

I have a job already submitted to a TORQUE queue. The system I submitted it on has several queues, and I want to change which queue I'm running it in. I found this question, which recommends the use of qalter, but qalter's man page doesn't have instructions for changing the queue.

EDIT: I tried qalter -q <queuename> <jobid> and I get an error message qalter: illegally formed job identifier: <queuename>

How can I change which queue a job is submitted to using a PBS system?

$\endgroup$
8
$\begingroup$

I know this is an old question, but the correct command to move a queued job from one queue to another in torque is "qmove" and not qalter.

From man page:

Usage: qmove destination job_identifier ...

Description:

To move a job is to remove the job from the queue in which it resides and instantiate the job in another queue. The qmove command issues a Move Job batch request to the batch server that currently owns each job specified by job_identifier. A job in the running state cannot be moved by the user.

$\endgroup$
  • $\begingroup$ qmove is the only command that would work! $\endgroup$ – Alone Programmer Dec 24 '18 at 16:23
7
+50
$\begingroup$

The command

qalter -q <new queue name> <jobid>

should work for already submitted jobs. For new jobs use the same syntax with qsub

qsub -q <new queue name> <scriptname>

Please note that if your job is already running, the qalter will not make it switch queues. Only if the running job gets interrupted and restarted, it will switch queue.

$\endgroup$
  • $\begingroup$ This doesn't work on my machine. $\endgroup$ – Dan May 29 '13 at 21:37
  • $\begingroup$ Are the angle brackets part of the syntax of the qalter command? $\endgroup$ – Dan May 29 '13 at 21:42
  • 1
    $\begingroup$ @Dan: No, they are not. if you want to move the job with jobid 1234 to the queue named DansQueue, you should enter the command qalter -q DansQueue 1234. Make sure that you are allowed by your sysadmin to submit in that queue $\endgroup$ – GertVdE May 30 '13 at 6:50
6
$\begingroup$

In Torque only this works:

   qalter <jobid> -W queue=<new queue name>
$\endgroup$
  • 1
    $\begingroup$ This is the only command that worked for me. Thanks! $\endgroup$ – Melanie Shebel Oct 8 '16 at 18:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.