Alexis Huxley <[email protected]> writes:
> However, when I switch to running the job in a PE by insertion of:
>
> #$ -pe testpe 4
>
> then I see:
>
> $ qacct -j 49897 | grep exit_status
> exit_status 0
> $
>
> This is regardless of which PE I use.
I'm surprised I haven't noticed that, even though people round here
generally don't submit jobs which return a useful status anyhow. (The
exit status is reported interactively for -sync y and qrsh.)
> Poking around in the shepherd source code, in function start_child(), I
> see the following interesting comment and code:
>
> /*
> * we are not interested in exit status of job
> * except it was the RESCHEDULE_EXIT_STATUS or APPERROR_EXIT_STATUS
> */
> if( exit_status != RESCHEDULE_EXIT_STATUS
> && exit_status != APPERROR_EXIT_STATUS ) {
> exit_status = 0;
> } ...
>
> Just before this block of code resets exit_staus, it copies it into the
> environment variable SGE_JOBEXIT_STAT, which is later readable from an
> epilog script.
That's because execd gets t from the "exit_status" file.
> Is it a bug that the exit status is lost when running in a PE or have I
> misunderstood something?
I think it's a bug. I'll look at it when I get a chance.
_______________________________________________
SGE-discuss mailing list
[email protected]
https://arc.liv.ac.uk/mailman/listinfo/sge-discuss