[GE users] Qsub - o behavior

Reuti reuti at staff.uni-marburg.de
Sun Aug 13 20:14:32 BST 2006


Hi Tom,

Am 13.08.2006 um 20:45 schrieb Thomas Gilbert:

>  Please forgive what I'm sure is a newbie question, but I am a  
> newbie, and I've been unable to track down the answer to this via  
> web searches.
>
>  While no one including the developers appears to discuss this (and  
> as far as I can tell it's not in the documentation), it appears  
> that the 'qsub -o" command in SGE 6 appends to the output file  
> rather than overwriting the output file if it exists. At least,  
> that appears to be true for my setup (installed SGE binaries on  
> TRU64 5.1A). So, is this true? And if so, is there any way to  
> override this behavior? I have several scripts that rely on "qsub - 
> o" being able to overwrite a file if that file already exists, and  
> I would not enjoy changing them.

you could empty the file in a queue prolog by removing it:

#!/bin/sh
rm -f $SGE_STDOUT_PATH
exit 0

should do it. Another option might be to submit it with:

qsub -o 'myoutput_$JOB_ID' job.sh

and disregard the jobnumber in your followup script. This way you  
could keep track of the job outputs in case you run into any errors.

HTH - Reuti

---------------------------------------------------------------------
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