Bash script + PBS

Associate
Joined
8 May 2014
Posts
2
I copy here a question I put also on SO:
I've access to a low priority queue on a large national system. I can allocate in the queue only 1 job at the time.
The PBS job contains a program who is not likely to complete before the wall-time ends. Jobs on hold can't be queued in a number that exceeds 3.
It means that:

  1. I can not use -W depend=afterok:$ID_of_previous_job . The script would submit all the job at once, but just the first 3 will enter the queue (the last 2 in H state)
  2. I can not modify the submission script with a last line that submit the next_job (it is very likely that the actual program won't finish before the walltime ends and then the last line is not executed.
  3. I can not install any software so I am limited to use a Bash Script, rather than Torque
  4. I'd rather not use a "time check" script (such as: every 5 minute check if previous_job is over)
 
What limits are there on the queue for your user?
Dependency lists should still work and the 'H' is done on the queue level - the job is still scheduled for execution, i.e.
Code:
$ cat  testsub.sh
#!/bin/bash

# Initial Job
ID=$(qsub -q workq -- /bin/sleep 30)

for i in $(seq 1 10); do
    ID=$(qsub -q workq -W depend=afterok:$ID -- /bin/sleep 30)
done

qstat -u $USER

Output

Code:
$ qstat -u USERNAME

HOSTNAME0:
                                                            Req'd  Req'd   Elap
Job ID          Username Queue    Jobname    SessID NDS TSK Memory Time  S Time
--------------- -------- -------- ---------- ------ --- --- ------ ----- - -----
1.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: Q   --
2.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: Q   --
3.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: H   --
4.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: H   --
5.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: H   --
6.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: H   --
7.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: H   --
8.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: H   --
9.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: H   --
10.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: H   --
11.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: H   --
12.HOSTNAME USERNAME workq    STDIN         --    1   1    --  8736: H   --
 
Back
Top Bottom