Versions Compared

    Key

    • This line was added.
    • This line was removed.
    • Formatting was changed.

    Qube!'s requirement specification is expression based. The proper use of these expressions will allow a user to specify the host and/or the conditions required before a job is allowed to run.
    The syntax for specifying the expression is similar to Perl or C. The evaluation of the expression where:

    ...

    &

    Operator

    Definition

    Expression

    Result

    min

    minimum

    10 min 12

    10

    max

    maximum

    10 max 12

    12

    sub, -

    subtract

    10 sub 8

    2

    add, +

    addition

    1 + 2

    3

    mul, *

    multiplication

    3 * 4

    12

    div, /

    division

    14 / 7

    2

    xor, ^

    XOR

    12 xor 8

    4

    mod, %

    modulus

    10 % 4

    2

    in

    value in list (string with commas)

    "v" in "x,y,v"

    true

    has

    list (string with commas) has value

    "x,y,v" has "v"

    true

    not, !

    NOT

    not 1

    false

    eq, =, ==

    equal

    10 == 10

    true

    ne, <>, !=

    NOT equal

    10 != 10

    false

    and, &&

    AND

    1 and 0

    false

    or, ||OR1 or 0true

    &

    bitwise AND

    12 & 8

    8

    |bitwise OR8 | 412

    lt, <

    less than

    5 < 10

    true

    gt, >

    greater than

    5 > 10

    false

    le, <=

    less than or equal

    4 >= 6

    false

    ge, >=

    greater than or equal

    4 <= 6

    true

    rs, >>

    bitwise right shift (used to divide by 2n)

    4 >> 1

    2

    ls, <<

    bitwise left shift (used to multiply by 2n)

    4 << 1

    8


    The reason for multiple definitions for most operators is to allow a programmer more flexibility in the case of Unix command line applications where reserved characters like the ">", unless otherwise escaped, will be interpreted by the shell.

    Operands in Qube! also have a syntax. They all follow a base class.type format.

    ...

    Operand

    Values

    host.os

    "linux", "irix", "winnt", "osx"

    host.processor_speed

    CPU speed in MHz

    host.processor_make

    "GenuineIntel", "AuthenticAMD"

    host.processor_model

    "pentium"

    host.kernel_version

    Version reported by the operating system.

    host.architecture

    "intel", "mips"

    host.name

    Host name

    host.groups

    Comma delimited list of group names

    host.cluster

    Cluster specification string

    host.state

    Host state

    host.restrictions

    List of restricted cluster specification strings

    host.flags

    Numeric representation of the Worker's flags

    host.qube_version

    Worker version of Qube!

    host.jobtypes

    Comma delimited list of job types

    host.flag.name

    true if the flag exists

    host.duty.property

    Comma delimited list of job properties for jobs on the worker.

    ...

    More advanced uses of the requirements expression have allowed many allow  Qube! users to route a job to a specific host and also conversely restrict a job from a host.

    ...

    Run my job only if there isn't already one of this job's subjobs instances running on it:

    not (job.id in host.duty.id)

    ...