[GE users] pre/post action script

templedf dan.templeton at sun.com
Fri May 15 17:40:00 BST 2009


And to enable job-specific prologs, epilog, terminate methods, etc, you 
can write a queue-level prolog, et al that reads a path from the job's 
environment variables and execs it.  (The prologs, et al run with the 
full environment of the job itself.)  You have to be careful, though, 
because a prolog, et al that exits with anything other than 0 is 
considered an abnormal exit, and depending on the exit code, stuff happens.

Daniel

dev wrote:
> One thing you could consider would be to use the queue's custom 
> terminate method. Put in a call to your custom script in it, if it 
> exists and then pass on the kill signal to the process group by using 
> the process id you receive as a parameter when the custom terminate 
> script is called.
>
> /Dev
>
>
> --- On *Mon, 5/11/09, craffi /<dag at sonsorol.org>/* wrote:
>
>
>     From: craffi <dag at sonsorol.org>
>     Subject: Re: [GE users] pre/post action script
>     To: users at gridengine.sunsource.net
>     Date: Monday, May 11, 2009, 4:40 PM
>
>     At a queue level this can be done with a prolog and epilog script
>
>     At the level of parallel environment there is something similar
>     called 
>     starter and stop methods
>
>     Nothing really job or job-type specific, you have to do this at the 
>     queue or PE level, at the queue level you can write logic into the 
>     scripts such that they only work on the jobs you want them to work
>     on. 
>     Otherwise this is a valid reason for (ab)using the PE methods - just 
>     create a new PE environment to match your need and leverage that to 
>     run custom start/stop scripts.
>
>     The main caveat is that these scripts run under the UID of the job 
>     submitter, not the root user.
>
>     -Chris
>
>
>
>     On May 11, 2009, at 10:33 AM, darinper wrote:
>
>     > Is there a way to perform pre/post action scripts in SGE? I'd like 
>     > to be
>     > able to run a script once a job completes, outside of the job 
>     > itself. Is
>     > this possible?
>     >
>     > --
>     > Darin Perusich
>     > Unix Systems Administrator
>     > Cognigen Corporation
>     > 395 Youngs Rd.
>     > Williamsville, NY 14221
>     > Phone: 716-633-3463
>     > Email: darinper at cognigencorp.com
>     </mc/compose?to=darinper at cognigencorp.com>
>     >
>     > ------------------------------------------------------
>     >
>     http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=194246
>     <http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=194246>
>     >
>     > To unsubscribe from this discussion, e-mail:
>     [users-unsubscribe at gridengine.sunsource.net
>     </mc/compose?to=users-unsubscribe at gridengine.sunsource.net>
>     > ].
>
>     ------------------------------------------------------
>     http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=194249
>     <http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=194249>
>
>     To unsubscribe from this discussion, e-mail:
>     [users-unsubscribe at gridengine.sunsource.net
>     </mc/compose?to=users-unsubscribe at gridengine.sunsource.net>].
>
>

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=195967

To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list