[GE users] Creating a Soft consumable resource

reuti reuti at staff.uni-marburg.de
Tue Oct 19 20:42:14 BST 2010

    [ 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. ]

Am 19.10.2010 um 21:03 schrieb stephendennis <sdennis at univaud.com<mailto:sdennis at univaud.com>>:

Hi Reuti

I would like the following

Job A can optionally consume resource xyz
 qsub -soft -l xyz=1 A
Job B can always consumes resource xyz
qsub -hard -l xyz=1 B

This way job A can block job B but job B cannot block job A.

Is "xyz" a global or exechost consumable? In the latter case you could use two queues with subordination.

xyz is an exechost consumable (complex_value)

And you have only exactly one of this resource per machine, i.e. "-l xyz=2" will never be requested?

xyz will have a value of a small positive integer or zero, and some jobs may request more than one due to
asking for more than once slot (  $pe_slots > 1 )

I think this case can be disregarded then, when you set CONSUMABLE=JOB for this complex. You would need for the jobs with the hard request a second queue, which must be requested by specifying a FORCED BOOLEAN complex. So only these type of job can run in this queue.  In addition a load_threshold must be defined, to put this queue alarm state when at least one job with the soft request is running on this exechost in the normal queue (i.e. the soft request jobs will request 0.01 of this resource, while the hard request jobs will consume the complete amount of 1 which is available per node; so up to ten soft request jobs can run on this node unless there is any tighter slot limit).

-- Reuti


Would it help to use "-hold_jid <job_id/name>" to put an order between your jobs? As you can also use jobnames set by a "-N <string>" and wildcards for this hold >option, maybe you can achieve something similar.

You could even sepcify it for job A: when there is nothing with such a hold requesting name in the system, the job will be scheduled as usual.

Unfortunately they are independent jobs, and job names our not in our control so we cant use the hold.


From: reuti [reuti at staff.uni-marburg.de]
Sent: Tuesday, October 19, 2010 4:27 AM
To: <mailto:users at gridengine.sunsource.net> users at gridengine.sunsource.net<mailto:users at gridengine.sunsource.net>
Subject: Re: [GE users] Creating a Soft consumable resource


Am 19.10.2010 um 05:23 schrieb stephendennis:

This thread fizzled out in July.  Does anyone know why soft consumables are
denied, and if there is some way around this?

how do you expect soft-consumables to work? For ulimit like complexes like h_rt it's (the s_rt) like a "lower limit", but for boolean it's only like: I prefer a machine/queue with feature XYZ but I'm also happy with anything else.

- So for soft consumables it could mean either: I want at least (soft limit), but up to the max (hard limit).


- I need N of this soft complex, but I'm also happy if I don't get any at all.

Both would imply to get the information about the granted consumable complex into the job script to behave accordingly to the granted resources.

-- Reuti



I went through the source code and the code to deny soft resources consumables
was added in SGE v5.3 to fix the bug id


Quoting: (
I think there is a little bug inside SGE 5.3 .
If I have a host complex
mpi_down mpi_down BOOL false == NO NO false
and a queue with
load_thresholds      np_load_short=1.1,mpi_down=true
this queues is alarmed when no loadreport set mpi_down
to false.

From: ./daemons/qmaster/sge_job_qmaster.c
/****** sge_job/deny_soft_consumables() ****************************************
*     deny_soft_consumables() -- Deny soft consumables
*     static int deny_soft_consumables(lList **alpp, lList *srl)
*     Find out if consumables are requested and deny them.
*     lList** alpp                    - answer list pointer pointer
*     lList *srl                      - jobs JB_soft_resource_list
*     const lList *master_centry_list - the master centry list
*     static int - 0 request can pass
*                !=0 consumables requested soft
int deny_soft_consumables(lList **alpp, lList *srl, const lList
lListElem *entry, *dcep;
const char *name;

DENTER(TOP_LAYER, "deny_soft_consumables");

/* ensure no consumables are requested in JB_soft_resource_list */
for_each(entry, srl) {
  name = lGetString(entry, CE_name);

  if (!(dcep = centry_list_locate(master_centry_list, name))) {
     answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN,

  /* ignore non-consumables */
  if (lGetUlong(dcep, CE_consumable)) {
     answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN,



        if (deny_soft_consumables(alpp, lGetList(jep,
JB_soft_resource_list), master_centry_list)) {

Can someone more knowledgeable please comment on the changes or point us to some
documentation on the soft resources.


-----Original Message-----
From: Molumuri, Janardhan
Sent: Monday, July 19, 2010 8:02 PM
To: use... at gridengine.sunsource.net
Cc: svibhore
Subject: RE: [GE users] Creating a Soft consumable resource

A soft request on consumable attributes is not working.

More information about the gridengine-users mailing list