> Am 23.03.2018 um 09:33 schrieb William Hay <w....@ucl.ac.uk>:
> 
> On Fri, Mar 23, 2018 at 12:27:48AM +0100, Reuti wrote:
>> Hi,
>> 
>> Am 22.03.2018 um 20:51 schrieb Mun Johl:
>> 
>>> Hi,
>>> 
>>> I?m using SGE v8.1.9 on RHEL6.8 .  In my script that I submit via qsub 
>>> (let?s call it scriptA), I have a gxmessage (gxmessage is similar to 
>>> xmessage, postnote, etc) statement which pops up a small status window 
>>> notifying the user of the results of the qsub job.
>> 
>> Is SGE and your job running local on your workstation only? I wonder how the 
>> gxmessage could display something on the terminal of the user when the job 
>> runs on an exechost in the cluster and was submitted at some time in the 
>> past.
>> 
>> 
>>> However, I don?t want the gxmessage to exit when scriptA terminates.  So 
>>> far, I have not figured out a what to satisfy my wants.  That is, when 
>>> scriptA terminates, so does gxmessage.  nohup  does not help because 
>>> gxmessage gets a SIGKILL.
>> 
>> SGE kills the complete process group when the jobs ends (or is canceled), 
>> not just a single process. One might circumvent this with a `setsid foobar 
>> &` command. The `nohup` isn't necessary here.
>> 
>> As a second measure to kill orphaned processes one can use the additional 
>> group id, which is attached to all SGE processes. Although it would be 
>> counterproductive in your case as it would kill the leftover process despite 
>> the newly created process group. This would need to set:
>> 
>> $ qconf -sconf
>> #global:
>> ...
>> execd_params                 ENABLE_ADDGRP_KILL=TRUE
>> 
> According to https://arc.liv.ac.uk/repos/darcs/sge/NEWS
> ENABLE_ADDGRP_KILL defaults to on after SoGE 8.1.7 so it probably needs to be 
> explicitly set false.
> 
> As this is about notifying the user of a completed job I'm wondering if an 
> alternative might be 
> to write a mail compatible wrapper for gxmessage and specify  that as the 
> mailer in sge_conf.
> The wrapper might need to be somewhat smart to distinguish different uses of 
> mailer by SGE though.

Indeed, this might be an option. I use a prolog and epilog to write certain 
settings to persistent file to be send by the mail wrapper then. It's important 
to realize, that the email from the exechost is send *after* the job left the 
exechost already and usually there are no traces about any settings of it.

Latest additions to my wrapper even send the last 1MB of the output text file 
as attachment in the email, while the file to look for is specified in a 
context variable which will be saved in the persistent file.

-- Reuti
_______________________________________________
users mailing list
users@gridengine.org
https://gridengine.org/mailman/listinfo/users

Reply via email to