Hi, I've got a job running under SoGE 8.1.8:

    #$ -S /bin/bash
    #$ -j y
    #$ -cwd
    #$ -m beas
    #$ -M me@myplace
    #$ -N testjob
    #$ -l h_vmem=22G
    #$ -l h_rt=1000
    RC=7
    echo "exiting $RC ..."
    exit $RC

I run this job and see:

    $ qacct -j 49896 | grep exit_status
    exit_status  7
    $

(and the same in the mail that is sent); no problem there.

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.

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.

I interpreted these points as meaning that the exit code visible in the
qacct command (and email) is not meant to be used (for example for
filtering mails).

The slide on page 47 of
http://www.bioteam.net/wp-content/uploads/2009/09/03-SGE-Admin-Config.pdf shows
an example script for copying the exit code out of the epilog and into
the job output file, which kind of confirms my interpretation.

So now to my question:

Is it a bug that the exit status is lost when running in a PE or have I
misunderstood something?

Thanks!

Alexis

<<attachment: alexis_huxley.vcf>>

_______________________________________________
SGE-discuss mailing list
[email protected]
https://arc.liv.ac.uk/mailman/listinfo/sge-discuss

Reply via email to