Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reordering item in PBS queue

Tags:

pbs

Iv'e submitted several jobs to PBS. Now, I want the job I submitted that last will be the first.

One option is to hold all the previews jobs (using qhold ). The problem is that I used -W depend=afterok: switch in order to enable jobs just after previews job ended.

Therefore, my PBS queue look something like that:

468743.server   username    queue_name job1         4828   6  36   46gb 24:00 R 16:12
468744.server   username    queue_name job1_cont     --    6  36   46gb 24:00 H   -- 
468745.server   username    queue_name job1_cont     --    6  36   46gb 24:00 H   -- 
468746.server   username    queue_name job1_cont     --    6  36   46gb 24:00 H   -- 
468747.server   username    queue_name job1_cont     --    6  36   46gb 24:00 H   -- 
468748.server   username    queue_name job1_cont     --    6  36   46gb 24:00 H   -- 
468743.server   username    queue_name job2         4828   6  36   46gb 24:00 R 16:12
468744.server   username    queue_name job2_cont     --    6  36   46gb 24:00 H   -- 
468745.server   username    queue_name job2_cont     --    6  36   46gb 24:00 H   -- 
468746.server   username    queue_name job2_cont     --    6  36   46gb 24:00 H   -- 
468747.server   username    queue_name job2_cont     --    6  36   46gb 24:00 H   -- 
468748.server   username    queue_name job2_cont     --    6  36   46gb 24:00 H   -- 
468753.server   username    queue_name NewJob        --    6  36   46gb 24:00 H   -- 
468754.server   username    queue_name NewJob_cont        --    6  36   46gb 24:00 H   -- 
468755.server   username    queue_name NewJob_cont        --    6  36   46gb 24:00 H   -- 

Now, I want NewJob, which is last on line, to run after the first job in {job1, job2} is finished, and before any of the "_cont". And I want the NewJob_cont jobs will run after NewJob.

Can I alter the position of NewJob in line without destroying the rest of the hold-queue hierarchy?

like image 627
Ronen Avatar asked Feb 11 '14 16:02

Ronen


1 Answers

You can use qalter to change dependencies for jobs. You can execute:

qalter 468744 -W depend=after:468753
qalter 468753 -W depend=after:468743

This will make it so that 468744 doesn't execute until after the new job and the new job doesn't execute until after the first job. Just as you can add after dependencies to queued jobs, you can also add other kinds of dependencies.

like image 69
dbeer Avatar answered Oct 16 '22 22:10

dbeer