[GE users] setJobEnvironment() method in DRMAA

Daniel Templeton Dan.Templeton at Sun.COM
Thu Apr 3 22:07:04 BST 2008

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

You can set embedded directives in your script.  If a line starts with 
#$ everything after it is interpreted as command-line options:

#$ -S /bin/sh -N MyJob -v FOO=bar

The job category is a similar thing.  Whatever name you put in the job 
category property is looked up in the qtask file, and the qtask entry is 
used as additional command-line options for the job.  For example, if 
the following line is in the qtask file:

myjob -N MyJob -v FOO=baz

If you set the job category to "myjob" for your job, when it is 
submitted, the job will have its name set to MyJob and the FOO env var 
set to baz.  Of course, there's a hierarchy for processing command-line 
switches.  See here:



Shilpi Gupta wrote:
> hi Daniel,
> thnx for ur reply, i m already using drmaa.jar.
> nd with ur help i m able to use the jobEnvironment() method, but i 
> would like to know if there is any way through which i can get the job 
> environment from the job script itself, rather than me setting it with 
> job template's properties nd then retrieving it and also i would like 
> to know the same for getJobCategory() method.
> thanks in advance!!!
> Shilpi
> On 3/31/08, *Daniel Templeton* <Dan.Templeton at sun.com 
> <mailto:Dan.Templeton at sun.com>> wrote:
>     Have you looked drmaa.org <http://drmaa.org>?  BTW, you're looking
>     at an old version of the
>     Java language bindings.  I assume you're using Grid Engine
>     6.0.  Look in
>     the lib directory for a drmaa-1.0.jar.  If you have it, use it
>     instead.
>     If you don't have it, consider downloading a newer version of Grid
>     Engine.  With 6.1, drmaa.jar => drmaa-0.5.jar, and drmaa-1.0.jar =>
>     drmaa.jar.
>     The jobEnvironment property is a set of environment variables that
>     your
>     job will have set in its environment when it runs.  Create a
>     Properties
>     object, put some entries in it (e.g. put("LD_LIBRARY_PATH",
>     "/sge/lib/sol-sparc64");), and the set it with the job template's
>     property's setter method.
>     Daniel
>     Shilpi Gupta wrote:
>     > hello everybody,
>     >
>     > i have just started working on DRMAA package. i have certain
>     problems
>     > regarding it and hope that u people would help me.
>     >
>     > 1. how to use setJobEnvironment(java.util.properties env)
>     method, what
>     > is the env variable nd how to define its values?
>     >
>     > 2. which values does getJobEnvironment() method returns and how
>     these
>     > values are defined in the job script.
>     >
>     > 3. also i'll be thankful if anybody can give me some more useful
>     links
>     > and theory details of the DRMAA package except of those available at
>     > gridengine.sunsource.net <http://gridengine.sunsource.net>
>     <http://gridengine.sunsource.net>
>     >
>     > thanking you and seeking an early reply
>     > shilpi
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>     <mailto:users-unsubscribe at gridengine.sunsource.net>
>     For additional commands, e-mail:
>     users-help at gridengine.sunsource.net
>     <mailto:users-help at gridengine.sunsource.net>

To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net

More information about the gridengine-users mailing list