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

sanfermines sanfermines at gmail.com
Wed May 27 13:49:59 BST 2009


    [ The following text is in the "utf-8" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Thank you very much for all replies :)

I think it is easier to use the qsub wrapper so I will give it a try.

I will let you know if it works.

Regards,

On Tue, May 26, 2009 at 5:11 PM, ron <ron_chen_123 at yahoo.com> wrote:
> --- On Tue, 5/26/09, sanfermines <sanfermines at gmail.com> wrote:
>> We are using SGE 6.1 right now, so
>> that feature is not included in it.
>>
>> We may upgrade the version, but not yet.
>
> Just use the same idea from Rayson, but do it in a qsub wrapper, ie. rename the original qsub binary as qsub.real, and then write a wrapper script that processes qsub parameters, and finds out what the email address is by parsing the job script, and finally calls qsub.real with the parameters needed.
>
> Of course, you will need to find out which one is the job script, and which ones are the parameters in your qsub wrapper.
>
>  -Ron
>
>
>>
>> Any other ideas or suggestions?
>>
>> I have tried to do a qalter after the job was started but
>> it seems to ignore it.
>>
>> Thank you very much.
>>
>> On Sun, May 24, 2009 at 6:33 AM, Rayson Ho <rayrayson at gmail.com>
>> wrote:
>> > 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=198956
>>
>> To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].
>>
>
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=198990
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].
>

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

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



More information about the gridengine-users mailing list