Opened 16 years ago

Last modified 9 years ago

#75 new enhancement

IZ409: provide all resource requests to job environment

Reported by: chaubal Owned by:
Priority: normal Milestone:
Component: sge Version: 5.3
Severity: Keywords: execution
Cc:

Description

[Imported from gridengine issuezilla http://gridengine.sunsource.net/issues/show_bug.cgi?id=409]

        Issue #:      409              Platform:     All           Reporter: chaubal (chaubal)
       Component:     gridengine          OS:        All
     Subcomponent:    execution        Version:      5.3              CC:    None defined
        Status:       REOPENED         Priority:     P3
      Resolution:                     Issue type:    ENHANCEMENT
                                   Target milestone: ---
      Assigned to:    andreas (andreas)
      QA Contact:     pollinger
          URL:        http://gridengine.sunsource.net/servlets/ReadMsg?msgId=18038&listName=users
       * Summary:     provide all resource requests to job environment
   Status whiteboard:
      Attachments:

     Issue 409 blocks:
   Votes for issue 409:  1


   Opened: Thu Oct 31 11:16:00 -0700 2002 
------------------------


Currently, the only way for a job method (starter,
prolog, etc, or even job script itself) to know
about the resources requested (both hard and soft)
when the job was submitted is to do qstat -j
$JOB_ID.  This puts an undue burden on the
qmaster, esp. if many such methods are executed
simultaneously (eg, array job submission).

It would be better if this information was somehow
made available to the job, either via environment
variables, or else in a file in the job spool
directory.

   ------- Additional comments from andreas Sun May 9 06:06:28 -0700 2004 -------
RESOLUTION:
For adding this as documented 6.0 feature it's too late.

WORKAROUND:
There is an 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.

   ------- Additional comments from chaubal Sat May 22 05:48:34 -0700 2004 -------
This depends upon the job submission explicitly stating certain
environment variables, which is not a good interface.  However, the
bigger problem is described on the users lists:

--- BEGIN QUOTE ---
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@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.
--- END QUOTE ---

With variable resource requests, there is now more than ever a need
for the job to know exactly what resources were granted at the time of
dispatch.

   ------- Additional comments from sgrell Mon Dec 12 03:11:40 -0700 2005 -------
Changed subcomponent.

Stephan

Change History (0)

Note: See TracTickets for help on using tickets.