[GE users] Putting e-mail address in a variable inside script

rayson rayrayson at gmail.com
Sun May 24 05:33:19 BST 2009


Not exactly a hack, but a nice new feature in SGE 6.2update2 called
"Job Submission Verifiers" (JSV).

You can use a client-side JSV to process the job script during job
submission. What you need is to get the job script via CMDNAME inside
your JSV, and then parse the job script line-by-line to extract the
email address needed. The JSV can be written in any programming
language, and you can invoke other binaries or scripts to further
lookup your mapping file.

Once you have the correct email address, the JSV can then add it as
additional parameters.

See the admin guide and also the manpage for further details.

http://gridengine.sunsource.net/nonav/source/browse/~checkout~/gridengine/doc/htmlman/htmlman1/jsv.html?pathrev=V62u2_TAG

Rayson



On 5/23/09, sanfermines <sanfermines at gmail.com> wrote:
> Michael, I have a text file like this:
>
> linux_username  --> email_address
>
> Inside every script I would like to search in that file for $USER and
> grep his e-mail address which I storage in $EMAIL_ADDRESS, but as
> Daniel told, #$ variables are not interpretated.
>
> So... there isn't any "hack" to accomplish that?
>
> Thank you very much.
>
> On Fri, May 22, 2009 at 4:29 PM, templedf <dan.templeton at sun.com> wrote:
> > Actually, that shouldn't work. The #$ line isn't interpreted by the
> > shell. It's interpreted by qsub, and qsub doesn't do variable
> > interpolation on the #$ lines.
> >
> > Daniel
> >
> > pollinger wrote:
> >> sanfermines wrote:
> >>
> >>> Hello Everybody,
> >>>
> >>> I would like to put in a script a line as follows:
> >>>
> >>  >
> >>
> >>> #$ -M $EMAIL_ADDRESS
> >>>
> >>> where $EMAIL_ADDRESS is a variable with the real e-mail address
> >>>
> >>
> >> This should work if $EMAIL_ADDRESS is defined on the execution host when
> >> the job script is executed.
> >>
> >>
> >>> But this way, SGE doesn't process properly the variable.
> >>>
> >>
> >> What exactly does SGE wrong?
> >>
> >> Regards,
> >> Harald
> >>
> >>
> >>> Any ideas?
> >>>
> >>> Thank you very much.
> >>>
> >>
> >>
> >>
> >
> > ------------------------------------------------------
> > http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=198278
> >
> > To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].
> >
>
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=198449
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].
>

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

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



More information about the gridengine-users mailing list