[GE users] job context and resource requests

Ara.T.Howard Ara.T.Howard at noaa.gov
Mon May 10 16:19:19 BST 2004


On Sat, 8 May 2004, Andreas Haas wrote:

> There is a undocumented hook that allows you exactly this. When you submit a
> job with an empty env var that uses SGE_COMPLEX_ prefix this is considered
> as a request to get the information you need in job's environment
> 
>    > cat bin/envtester.sh
>    #!/bin/sh
>    #
>    # -- our name ---
>    #$ -N Envtester
>    #$ -S /bin/sh
> 
>    env
>    > qsub -o "$HOME" -v SGE_COMPLEX_arch bin/envtester.sh
>    Your job 10815 ("Envtester") has been submitted.
> 
> after job was run
> 
>    > grep SGE_COMPLEX_arch  ~/*Envtest*
>    /home/ah114088/Envtester.o10814:SGE_COMPLEX_arch=sol-sparc64
>    /home/ah114088/Envtester.o10815:SGE_COMPLEX_arch=sol-sparc64
> 
> I verified it works in 60b2.
> 
> Hoping this is applicable with your setup.
> 
> I thought there was a corresponding IZ RFE requesting exactly
> this. Searched around but was not able to find it.
> 
> Andreas


andreas-

seems this does not play well with the new 'or' style resource requests:

  ~ > qsub -l "arch=lx24-x86|foobar" -v SGE_COMPLEX_arch /home/ahoward/job.sh
  ~ > grep arch job.sh.o*
  job.sh.o21:SGE_COMPLEX_arch=lx24-x86|foobar
  job.sh.o21:hard resource_list:         arch=lx24-x86|foobarmail_list: ahoward at fattire.ngdc.noaa.gov
  job.sh.o21:env_list:                   SGE_COMPLEX_arch


so this tells me nothing that i did not know at the time of job submission -
namely that the resource would be statisfied by one of two values.  (also note
the 2nd line of output from 'grep' has a bug in it - no terminating "\n")


also, i has just occured to me, i don't think these 'or' style requests __do__
actually satisfy the semantics of my original posting, namely that i'd like to
be able to run a job if one of two potential large disks have enough space: it
seems that the new 6.0 syntax

  key = val_a | val_b

allows only to express

  "that key 'key' may have the value 'val_a or val_b'"

it does not allow one to express this type request

  (key_a = val) | (key_b = val)

which is, of course, what i need.  i could create this situation fairly easily
by setting up a virtual resource and having it's value be reported by a load
monitor as 'the one available now'.  but this breaks down when BOTH are
available and is only suitable for my specific situation which effectively
toggles (more or less), eg.

  an or'ing disk load monitor:

    if disk_a has enough space

      echo "virtual_disk=disk_a"

    if disk_b has enough space

      echo "virtual_disk=disk_b"

then i could do

  qsub -l "virtual_disk=disk_a|disk_b"

but again, it does seem like there is no way to request resources in such a
way as to express the need that you have either one (with some value) or the
other (with some value) and then to discover (at run time) which one you have
aquired (which also seems impossible if boolen requests are used).

regards.

-a




> 
> 
> On Fri, 7 May 2004, Ara.T.Howard wrote:
> 
> > sge'rs-
> >
> > i posted a few things on this topic a while back, but never really got an
> > answer...
> >
> > using sge (5.3 or 6.0) is there a builtin method by which a running job may
> > generically determine which requested resources it has been granted?
> >
> > it seems that nothing is exported into the environment when a resource has
> > been granted - dosn't this seem like a logical place for it?
> >
> > -a
> > --
> > ===============================================================================
> > | EMAIL   :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
> > | PHONE   :: 303.497.6469
> > | ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
> > | URL     :: http://www.ngdc.noaa.gov/stp/
> > | TRY     :: for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done
> > ===============================================================================
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> > For additional commands, e-mail: 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
> 

-- 
===============================================================================
| EMAIL   :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE   :: 303.497.6469
| ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
| URL     :: http://www.ngdc.noaa.gov/stp/
| TRY     :: for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done 
===============================================================================



---------------------------------------------------------------------
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