Am 01.02.2012 um 12:25 schrieb Hugh Macdonald:

> It sounds like the prolog/epilog solution will work fine for me, but I 
> thought I'd at least answer your questions, in case anything else came up.
> 
> On 31 Jan 2012, at 21:45, Reuti wrote:
> 
>> Hi,
>> 
>> Am 31.01.2012 um 21:00 schrieb Hugh Macdonald:
>> 
>>> I've got a python script here that is run through Grid. When I requeue the 
>>> job,
>> 
>> what do you mean by requeue: resubmit or reschedule? Or a plain submission?
>> 
> We, for some reason, have ended up calling rescheduling "requeueing" 
> internally. The fact that rescheduling everything on a queue instance uses 
> the flag -rq doesn't help me think of it as rescheduling!

Okay, you are doing it with `qmod` by hand; that was the question.



>>> I want to catch the signal in the script, to do a bit of cleanup before 
>>> exiting. I don't seem to be able to catch the signal, making me assume that 
>>> it's SIGKILL that is being sent. Am I right in this assumption,
>> 
>> What did you do in detail to catch it?
> 
> This is all in Python
> 
> def signalHandler(signum, frame):
>       print "Caught signal %d" % signum
> 
> import signal
> for sig in range(16):
> try:
>     signal.signal(sig, signalHandler)
>     print "Registered signal %d" % sig
> except:
>     print "Invalid signal %d" % sig

Yes, fine. SIGSTOP and SIGKILL can't be caught this way.

-- Reuti


> This was to ensure that I caught any signal that might have come through.
> 
> 
>> 
>>> and, if so, is there any way to change it to SIGTERM?
>> 
>> No. But you can submit with -notify and can catch this warning signal (`man 
>> qsub`), this signal can even be redefined (`man sge_conf`).
> 
> I think that prolog/epilog will sort me out here, so I think I'll leave this 
> as it is, but thanks for the pointer.
> 
> 
> Hugh Macdonald
> nvizible – VISUAL EFFECTS
> 
> [email protected]
> +44(0) 20 3167 3860
> +44(0) 7773 764 708
> 
> www.nvizible.com
> 
> _______________________________________________
> users mailing list
> [email protected]
> https://gridengine.org/mailman/listinfo/users


_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to