[gridengine users] open the output

Vamsi Krishna vkpolisetty at gmail.com
Thu Mar 21 05:52:44 UTC 2013


if i use tail -f <outputfile> in prolog, batchjob is always in qw state. i
guess it is waiting for terminal.


On Mon, Mar 18, 2013 at 6:01 PM, Reuti <reuti at staff.uni-marburg.de> wrote:

> Hi,
>
> Am 18.03.2013 um 09:10 schrieb Mazouzi:
>
> > Hi,
> >
> > You can write a wrapper and attach the job id to qtail :
>
> redirecting the stdout/-err can be more complicated than it sounds.
>
>
> > http://wiki.gridengine.info/wiki/index.php/Utilities#qtail
>
> There is no author mentioned, but I get a path like:
>
> NONE:NONE:/home/reuti/err/foobar_$JOB_ID
>
> which doesn't help much, as at least the NONE:NONE: needs to be stripped
> off and the job number substituted. Then it might work in many cases, when:
>
> - don't use pseudo variables
> - don't specify different paths for different exechosts in `qsub`(this is
> a valid syntax and would replace the NONE partially)
> - don't use "sge_aliases" for different mount path on different exechosts
> - the output path needs to be accessible from the submission machine
>
> If you want to get a reliable path for sure: it's necessary to set the
> output path in a prolog (global or queue) as a job context, which can then
> be retrieved on the submission machine - at that point it's known. For this
> to work the exechost also needs to be a submission host and execute a
> prolog like:
>
> #!/bin/sh
> . $SGE_ROOT/default/common/settings.sh
> qalter -ac SGE_STDOUT_PATH=$SGE_STDOUT_PATH $JOB_ID
>
> This will then show up in the `qstat -j <job_id>` output:
>
> context:                    SGE_STDOUT_PATH=/home/reuti/foobar_5849
>
> $ qstat -j <job_id> | sed -n -e "/^context: */s///p"| tr "," "\n" | grep
> SGE_STDOUT_PATH
> SGE_STDOUT_PATH=/home/reuti/foobar_5849
>
> (We put even more entries in the job context, hence the `grep` here.)
>
> -- Reuti
>
>
> > Regards
> >
> >
> > On Mon, Mar 18, 2013 at 8:22 AM, Vamsi Krishna <vkpolisetty at gmail.com>
> wrote:
> > hi
> >
> > i would like to stream the output log file similar like tail -f
> output.file. is there a way to open automatically the -o 'output.file'  in
> the same terminal or in new terminal when the job is submitted to the Grid.
> >
> >
> >
> > _______________________________________________
> > users mailing list
> > users at gridengine.org
> > https://gridengine.org/mailman/listinfo/users
> >
> >
> > _______________________________________________
> > users mailing list
> > users at gridengine.org
> > https://gridengine.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gridengine.org/pipermail/users/attachments/20130321/2425296a/attachment.html>


More information about the users mailing list