Hi, I've been tasked with enhancing the load_formula expression
evaluator. I've compiled 8.1.8, added the recently discussed patches,
written an expression parser (with lex and yacc), integrated it,
temporarily I've return(true)-ed early in validate_load_formula()
and things are looking quite good! I can set load_formula to crazy
stuff like:

        10*sqrt(swap_free) + 1/atan(np_load_avg)

and the right thing seems to happen. I'll post the patch once the
code is working full, properly tested and looks cleaner, if people
are interested.

However, when I set the formula to use some specific complexes, then
things to not work as expected. To debug this, I have returned to the
pristine code without my additions, and just added a some printf()s
in sge-8.1.8/source/libs/sched/sort_hosts.c.

With the formula:

        np_load_avg

then the printf()s say:

        Tue 2015-07-14 10:45:08 CEST: sge_qmaster[42156]: get_load_value: 
attrname=np_load_avg
        Tue 2015-07-14 10:45:08 CEST: sge_qmaster[42156]: get_load_value: 
*dvalp=0.095000
        Tue 2015-07-14 10:45:08 CEST: sge_qmaster[42156]: get_load_value: 
attrname=np_load_avg
        Tue 2015-07-14 10:45:08 CEST: sge_qmaster[42156]: get_load_value: 
*dvalp=0.220000

But if I change the formula to:

        slots

then the output is:

        Tue 2015-07-14 10:55:32 CEST: sge_qmaster[42156]: get_load_value: 
attrname=slots
        Tue 2015-07-14 10:55:32 CEST: sge_qmaster[42156]: get_load_value: 
get_attribute_by_name(..., "slots", ...) failed
        Tue 2015-07-14 10:55:32 CEST: sge_qmaster[42156]: get_load_value: 
attrname=slots
        Tue 2015-07-14 10:55:32 CEST: sge_qmaster[42156]: get_load_value: 
get_attribute_by_name(..., "slots", ...) failed

So now I'm puzzled. Is there something special about 'slots' that means
it's not defined in the normal way? This is a pristine installation,
have I forgotten to configure slots somewhere?

I don't think the following points are relevant, but just in case ...

        te-ahux01# qconf -sconf | grep -i slots
        te-ahux01# qconf -ssconf | grep -i slots
        load_formula                      slots
        te-ahux01# qconf -sq all.q | grep -i slots
        slots                 1,[te-ahux02.rzg.mpg.de=4]
        te-ahux01# qconf -sconf | grep -i sensor
        load_sensor                  none
        te-ahux01# qconf -sc | grep -i slot
        slots               s          INT       <=    YES         YES        1 
       1000
        te-ahux01#

I see the same problem (get_attribute_by_name() failing) when I set the
formula to:

        seq_no

but that might be because of seq_no's requestable/consumable settings:

        te-ahux01# qconf -sc | grep -i seq_no
        seq_no              seq        INT       ==    NO          NO         0 
       0
        te-ahux01#

So does anybody have any ideas (1) why 'slots' seems to be undefined,
at least as far as get_load_value() is concerned, (2) why this doesn't
seem to trouble SGE? Many thanks!

Alexis

<<attachment: alexis_huxley.vcf>>

_______________________________________________
SGE-discuss mailing list
[email protected]
https://arc.liv.ac.uk/mailman/listinfo/sge-discuss

Reply via email to