Reputation: 51
My shell script involves qsub job submission and then copying the file generated by that job to some other location. How does one do that?
Here is how my shell script looks like:
...
qsub synplify.csh
cp ./rev_1/netlist.vqm ~/sample
...
Here, synplify.csh job is submitted on server but not completed. And it clears way to execute second line. Thus second line is executed while first job is being processed. I want second line to be executed after the job is completed.
Upvotes: 3
Views: 2706
Reputation: 4723
Use -sync y
the option.
qsub -sync y synplify.csh
cp ./rev_1/netlist.vqm ~/sample
From the man page:
-sync y causes qsub to wait for the job to complete before exiting.
Upvotes: 3
Reputation: 621
You can chain commands as described here:
Alternatively, you can submit separate scripts that use job dependencies (with afterok):
Upvotes: 1