I submit jobs to a cluster (high-performance computer) using file1.sh
and file2.sh
.
The content of file1.sh
is
qsub job1.sh
qsub job2.sh
qsub job3.sh
...
qsub job999.sh
qsub job1000.sh
The content of file2.sh
is
qsub job1001.sh
qsub job1002.sh
qsub job1003.sh
...
qsub job1999.sh
qsub job2000.sh
After typing ./file1.sh
in putty
, job1 to job1000 are submitted.
Is there an automatic way to type ./file2.sh
ONLY after job1000 has completed? Please note, I want to type ./file2.sh
automatically only after job1000 has finished (not just successfully submitted).
The reason for doing this, is that we can only submit 1000 jobs at a time. This 1000 limit includes the jobs at running and at the queue. The use of -hold_jid
will still be considered within the limit of 1000. So I have to wait for all the first 1000 jobs finished (not simply submitted) then I am able to submit the next 1000 jobs.