How to set the SGE job execution order for nested qsub?

Dear All

I am trying to write a script to set the SGE job execution order. I named each job with 'job1', 'job2' and 'job3'. I want my script to do: When 'job1' execution is complete, 'job2' is executed; when both 'job1' and 'job2' are complete, 'job3' is executed.

First, I tried this following script and it worked well:

qsub -N job1 run1.sh  # run1.sh includes "mv file_name1 file_name2"
qsub -N job2 -hold_jid job1 run2.sh # run2.sh includes "mv file_name2 file_name3"

Then, I changed "run1.sh" to

qsub -N job1_1 run1_1.sh
qsub -N job1_2 run1_2.sh

it is just a nested qsub

I re-ran

qsub -N job1 run1.sh
qsub -N job2 -hold_jid job1 job1_1 job1_2 run2.sh

and job1 and job2 were submitted but I also got this error message:

"Unable to read script file because of error: error opening job1_1: No such file or directory"

My question is, how to deal with this kinda of nested qsub?

All your help will be greatly appreciated.