[gridengine users] e-mail when job array finishes

Txema Heredia txema.llistes at gmail.com
Thu Nov 7 16:42:21 UTC 2013


El 07/11/13 16:32, Reuti escribió:
> Hi,
>
> Am 07.11.2013 um 15:28 schrieb Arnau Bria:
>
>> I'd like to get an e-mail when job a job array finishes.
>>
>> I was looking at
>> http://comments.gmane.org/gmane.comp.clustering.gridengine.users/19962
>> and did a simple condition when SGE_TASK = SGE_TASK_LAST then e-mail,
>> but someone told me that maybe the last task is not the last one to
>> finish, so, i.e, in a array of 10 jobs, the 3th is the one that
>> finish last so I won't be getting the e-mail when the array finishes
>> but when last task finishes.
>>
>>
>> So, I'm thinking in how to manage this, and I'm wondering if there's
>> another solution than doing/parsing a qstat every time a task finishes
>> for guessing if it's the last one.
>>
>> * I'd like to leave this in the job side, nothing like "daemons"
>>   running in the server or even prolog... (if possible).
>>
>> Anyone with something more elegant?
> Instead of getting an email from a particular task, you could submit a follow up job with -hold_jid which depends on this one. For this followup job you will then just get one email. Depending on your cluster setup, it might be necessary to have some kind of dummy-queue with a cpu time limit of 10 seconds or so, which will always accept jobs (i.e. maybe a forced "mail_only" boolean complex, it could even reside on the master node).
>
> -- Reuti
>
That is a good solution, but it would rely on the users/is not automated.

The best "automatic" solution would be using an epilog script that 
checks qstat | grep $JOBID | wc -l == 1 and acts accordingly. But then 
again you have the problem of 2 jobs finishing at once (rare), and users 
that request "-m e" in their task jobs.


>> TIA,
>> Arnau
>> _______________________________________________
>> users mailing list
>> users at gridengine.org
>> https://gridengine.org/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> users at gridengine.org
> https://gridengine.org/mailman/listinfo/users




More information about the users mailing list