Versions Compared


    • 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:


    allows the job to be dispatched to a qualifying host.

    An expression consists of operators and operands. Operators are either text or symbolic.
    These are equivalent:

    eq, ==, =

    String and numeric comparisons are automatically resolved based upon the values they resolve to.


    Since a job requirement can include a number of operator characters, any reference to a property or resource that includes an operator should be quoted so the interpreter can differentiate between the literal character and the operator.


    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 such as ">", unless otherwise escaped, will be interpreted by the shell.


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

    Host.type operands




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


    CPU speed in MHz


    "GenuineIntel", "AuthenticAMD"




    Version reported by the operating system.


    "intel", "mips"

    Host name


    Comma delimited list of group names


    Cluster specification string


    Host state


    List of restricted cluster specification strings


    Numeric representation of the Worker's flags


    Worker version of Qube!


    Comma delimited list of job types

    true if the flag exists

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


    % qbsub --requirements "host.os eq linux" ls
    % qbsub --requirements " eq host01" ls
    % qbsub --requirements "host.flag.remove_logs has host05" ls
    % qbsub --requirements "(host.os == 'winnt') and host.processor_speed >= 100" ls

    Resource operands

    are slightly different and include those defined by your administrator host.


    % qbsub --requirements " > 10" ls

    Job operands

    The possible operands for a job.type are:


    Here are examples of job requirements that use job resource expressions:
    % qbsub --requirements "job.type in host.jobtypes" ls
    % qbsub --requirements "job.user eq" ls


    Advanced Examples

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


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

    (Also see How to restrict a host to only one instance of a given kind of job, but still allow other jobs)