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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With