[GE issues] [Issue 3175] New - Empty boolean resource request becomes 0 when using JSV

eddale eddale at cs.unc.edu
Tue Nov 10 11:06:08 GMT 2009


http://gridengine.sunsource.net/issues/show_bug.cgi?id=3175
                 Issue #|3175
                 Summary|Empty boolean resource request becomes 0 when using JS
                        |V
               Component|gridengine
                 Version|6.2u3
                Platform|All
                     URL|
              OS/Version|Linux
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|scheduling
             Assigned to|andreas
             Reported by|eddale






------- Additional comments from eddale at sunsource.net Tue Nov 10 03:06:03 -0800 2009 -------
If I submit a job with an empty boolean resoure request and a JSV modifies the resource request list, that empty boolean resource request is
returned as zero, which is evaluated as false.  Here's a command line transcript that exhibits the bug.

# This is my JSV
eddale at bass-comp0 ~$ cat test.pl
#!/usr/bin/perl

use strict;
use warnings;
no warnings qw/uninitialized/;

use Env qw(SGE_ROOT SGE_CELL);
use lib "$SGE_ROOT/util/resources/jsv";
use JSV qw( :DEFAULT jsv_sub_add_param jsv_sub_get_param jsv_send_env jsv_log_info jsv_is_param jsv_get_param );

jsv_on_start(sub {
   jsv_send_env();
});

jsv_on_verify(sub {
   jsv_sub_add_param('l_hard','h_rt','500');
   jsv_accept('Job is accepted');
   return;
}); 

jsv_main();

# No resource request, no JSV, no problem
eddale at bass-comp0 ~$ qsub -b y qstat -r
Your job 338257 ("qstat") has been submitted
eddale at bass-comp0 ~$ cat qstat.o338257 
job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID 
-----------------------------------------------------------------------------------------------------------------
 338257 0.13241 qstat      eddale       r     11/10/2009 05:34:34 all.q at bass-comp6.cs.unc.edu        1        
       Full jobname:     qstat
       Master Queue:     all.q at bass-comp6.cs.unc.edu
       Hard Resources:   h_rt=172800 (0.000000)
       Soft Resources:   

# Empty boolean resource request is evaluated as true.  Still no JSV, no problem
eddale at bass-comp0 ~$ qsub -b y -l himem qstat -r
Your job 338258 ("qstat") has been submitted
eddale at bass-comp0 ~$ cat qstat.o338258 
job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID 
-----------------------------------------------------------------------------------------------------------------
 338258 0.13241 qstat      eddale       r     11/10/2009 05:34:48 himem.q at bass-himem.cs.unc.edu      1        
       Full jobname:     qstat
       Master Queue:     himem.q at bass-himem.cs.unc.edu
       Hard Resources:   h_rt=172800 (0.000000)
                         himem=TRUE (0.000000)
       Soft Resources:   

# Now the JSV has been requested.  The empty boolean resource request has been
# converted to 0, which evaluates as false, causing the job to queue.
eddale at bass-comp0 ~$ qsub -b y -l himem -jsv /home/eddale/test.pl qstat -r
Your job 338259 ("qstat") has been submitted
eddale at bass-comp0 ~$ cat qstat.o338259
cat: qstat.o338259: No such file or directory
eddale at bass-comp0 ~$ qstat -r
job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID 
-----------------------------------------------------------------------------------------------------------------
 338259 0.13241 qstat      eddale       qw    11/10/2009 05:34:53                                    1        
       Full jobname:     qstat
       Hard Resources:   himem=0.000000 (0.000000)
                         h_rt=500 (0.000000)
       Soft Resources:   

# The boolean resource request has been specified explicitly as TRUE.
# The request remains TRUE after the JSV.
eddale at bass-comp0 ~$ qsub -b y -l himem=TRUE -jsv /home/eddale/test.pl qstat -r
Your job 338260 ("qstat") has been submitted
eddale at bass-comp0 ~$ cat qstat.o338260 
job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID 
-----------------------------------------------------------------------------------------------------------------
 338260 0.06648 qstat      eddale       r     11/10/2009 05:36:18 himem.q at bass-himem.cs.unc.edu      1        
       Full jobname:     qstat
       Master Queue:     himem.q at bass-himem.cs.unc.edu
       Hard Resources:   himem=TRUE (0.000000)
                         h_rt=500 (0.000000)
       Soft Resources:   

# This is the output of the JSV logging
# Notice that the empty boolean resource request is interpreted as 0 when it
# is sent to the JSV.
eddale at bass-comp0 ~$ cat /tmp/jsv.log 
/home/eddale/test.pl started on Tue Nov 10 05:47:03 2009

This file contains logging output from a GE JSV script. Lines beginning
with >>> contain the data which was send by a command line client or
sge_qmaster to the JSV script. Lines beginning with <<< contain data
which is send from this JSV script to the client or sge_qmaster

>>> START
<<< SEND ENV
<<< STARTED
>>> PARAM VERSION 1.0
>>> PARAM CONTEXT client
>>> PARAM CLIENT qsub
>>> PARAM USER eddale
>>> PARAM GROUP compsci
>>> PARAM CMDNAME qstat
>>> PARAM CMDARGS 1
>>> PARAM CMDARG0 -r
>>> PARAM b y
>>> PARAM l_hard h_rt=48:00:00,himem=0.000000
>>> PARAM M eddale at bass-comp0.cs.unc.edu
>>> PARAM N qstat
>>> PARAM p -1023
>>> BEGIN
<<< PARAM l_hard himem=0.000000,h_rt=500
<<< RESULT STATE ACCEPT Job is accepted
/home/eddale/test.pl is terminating on Tue Nov 10 05:47:03 2009
/home/eddale/test.pl started on Tue Nov 10 05:47:10 2009

This file contains logging output from a GE JSV script. Lines beginning
with >>> contain the data which was send by a command line client or
sge_qmaster to the JSV script. Lines beginning with <<< contain data
which is send from this JSV script to the client or sge_qmaster

>>> START
<<< SEND ENV
<<< STARTED
>>> PARAM VERSION 1.0
>>> PARAM CONTEXT client
>>> PARAM CLIENT qsub
>>> PARAM USER eddale
>>> PARAM GROUP compsci
>>> PARAM CMDNAME qstat
>>> PARAM CMDARGS 1
>>> PARAM CMDARG0 -r
>>> PARAM b y
>>> PARAM l_hard h_rt=48:00:00,himem=TRUE
>>> PARAM M eddale at bass-comp0.cs.unc.edu
>>> PARAM N qstat
>>> PARAM p -1023
>>> BEGIN
<<< PARAM l_hard himem=TRUE,h_rt=500
<<< RESULT STATE ACCEPT Job is accepted
/home/eddale/test.pl is terminating on Tue Nov 10 05:47:10 2009

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

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



More information about the gridengine-users mailing list