[torqueusers] Two problems with a routing queue

Gareth.Williams at csiro.au Gareth.Williams at csiro.au
Thu Nov 3 17:42:21 MDT 2011


Getting back to this thread, Gus said:

> What makes 'afterok' to be true?
> Is it an empty stderr?
> Something else?
> Often times programs dump warning messages [not errors] in stderr,
> the job ends 'OK' but stderr is not empty.
> I prefer to use 'afterany' because of this doubt.

> Thank you,
> Gus Correa

The exit code that the job returns determines if afterok is true.  That is the exit code of the last commend in the script (assuming it doesn't get eaten by the shell logout if there is any).It's available in the server and accounting logs as Exit_status and in qstat info for complete jobs as exit_status. Sometimes you want the exit code of another command (not the last one) so do the following to make the last command exit with a saved value (in bash):

Command_I_care_about some args
myexitcode = $?
More_commands_eg_to_clean_up
exit $myexitcode

Gareth



More information about the torqueusers mailing list