[GE users] job dependency question

Mag Gam magawake at gmail.com
Wed Oct 8 03:41:39 BST 2008


    [ The following text is in the "UTF-8" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some characters may be displayed incorrectly. ]

As usualy, thanks Rayson.

So, I have these 2 commands.

I suppose I can do:

qsub -N pre commandA.sh
qsub -hold_pre commandB.sh


 commandA.sh
 #!/bin/bash
 #$ -o output
#$ -S /bin/bash
#$ -S -V
tar -cvf file.tar /large_directory

CommandB.sh
#!/bin/bash
 #$ -o output
 #$ -S /bin/bash
#$ -S -V
gzip file.tar

Does this sound right?

TIA


On Tue, Oct 7, 2008 at 10:38 PM, Rayson Ho <rayrayson at gmail.com> wrote:
> Basically, you submit the first job, and qsub will return its job id.
> You then pass first job's job id to -hold_jid when you submit the 2nd
> job.
>
> A more advanced way is to use job names, by using -N.
>
> Anyway, play with a few dummy jobs and you will get the concept.
>
> Rayson
>
>
>
> On 10/7/08, Mag Gam <magawake at gmail.com> wrote:
>> Thanks for the quick reponse.
>>
>> I believe I have tried this too, but I am still confused with the job
>> name and job id.
>>
>> I looked at https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/2007-June/025538.html,
>>  and http://gridengine.sunsource.net/servlets/ReadMsg?list=users&msgNo=447
>>
>> Do I need another script to check for jobs? Sorry for such a newbie question
>>
>>
>> TIA
>>
>>
>>
>> On Tue, Oct 7, 2008 at 10:25 PM, Rayson Ho <rayrayson at gmail.com> wrote:
>> > The link in your email is for job arrays.
>> >
>> > You should read the qsub manpage instead, and look up the "hold_jid"
>> > option. If you google "qsub" and "hold_jid", the results should at
>> > least include a few examples.
>> >
>> > Rayson
>> >
>> >
>> >
>> > On 10/7/08, Mag Gam <magawake at gmail.com> wrote:
>> >> I have been reading many SGE job dependency pages online (such as
>> >> http://open.rsp.com.au/?page_id=11) but I am still not able to do the
>> >> task I wanted to do. Or perhaps I may be looking at the wrong thing.
>> >> Here is what I am looking for:
>> >>
>> >> I have 2 commands. Command A and Command B. Command A needs to run
>> >> first and then execute Command B once Command A is completed. In other
>> >> words Command B depends on Command A.
>> >>
>> >> commandA.sh
>> >>
>> >> #!/bin/bash
>> >> #$ -o output
>> >> #$ -S /bin/bash
>> >> #$ -S -V
>> >> tar -cvf file.tar /large_directory
>> >>
>> >>
>> >> CommandB.sh
>> >> #!/bin/bash
>> >> #$ -o output
>> >> #$ -S /bin/bash
>> >> #$ -S -V
>> >> gzip file.tar
>> >>
>> >>
>> >> Basically, I want to submit both of the jobs to our GRID but with
>> >> commandB running after CommandA
>> >>
>> >> TIA
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>> >> For additional commands, e-mail: users-help at gridengine.sunsource.net
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>> > For additional commands, e-mail: users-help at gridengine.sunsource.net
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>> For additional commands, e-mail: users-help at gridengine.sunsource.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list