Message-ID: <56968427.8439.1711662227939.JavaMail.confluence@host3.pipelinefx.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8438_1886574226.1711662227939" ------=_Part_8438_1886574226.1711662227939 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Job Requirements

Job Requirements

Synopsis

Jobs can have requirements, which are resources or other conditions whic= h must be available before the job can run. Qube!'s requirement specificati= on is expression based. The syntax for specifying the expression is si= milar to Perl or C. The proper use of these expressions will allow a user t= o specify the host and/or the conditions required.

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

eq, =3D=3D, =3D

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

Quoting

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

Operators

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, =3D, =3D=3D

equal

10 =3D=3D 10

true

ne, <>, !=3D

NOT equal

10 !=3D 10

false

and, &&

AND

1 and 0

false

or, || OR 1 or 0 true

&

bitwise AND

12 & 8

8

| bitwise OR 8 | 4 12

lt, <

less than

5 < 10

true

gt, >

greater than

5 > 10

false

le, <=3D

less than or equal

4 >=3D 6

false

ge, >=3D

greater than or equal

4 <=3D 6

true

rs, >>

bitwise right shift (used to divide by 2= n)

4 >> 1

2

ls, <<

bitwise left shift (used to multiply by 2n)

4 << 1

8


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

Operands

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

Host.type operands

Operand

Values

host.os

"linux", "irix", "wi= nnt", "osx"

host.processor_speed

CPU speed in MHz

host.processor_make

"GenuineIntel", "AuthenticAMD&= quot;

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 stri= ngs

host.flags

Numeric representation of the Worker's flags<= /p>

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 jo= bs on the worker.

 

Resource operands

are slightly different and include those defined by your administrator h= ost.

Operand (resource)

Values

host.processors.[ used | avail | total ]

<= /td>

Number of processors available on the w= orker

host.memory.[ used | avail | total ]

Memory in Mb available on the worker

host.swap.[ used | avail | total ]

Swap space available in Mb on the worke= r

 

Job operands

The possible operands for a job.type are:

Operand

Description

job.name

job name

job.id

job id

job.pid

job's parent id

job.pgrp

job process group

job.priority

job priority

job.label

job's label

job.user

job's owner

job.status

job status

job.prototype,job.type

job type

job.cluster

job's cluster value

job.restrictions

restrictions list

job.kind

user defined job "kind"

job.reservations

job's reservations

job.requirements

job's requirements

job.flags

job's flags numeric value

job.flag.[name]

true if the flag exists

job.kind job kind

Examples

Syntax Explanation
% qbsub --requirements "= ;host.processors.total > 10" set Command line example that uses a h= ost resource expression
host.os eq linux Run my job only on Linux hosts
"host.os =3D=3D 'winnt'= and host.processor_speed >=3D 3000" Run on a Windows machine that has = a processor speed of at least 3GHz
host.name ne "qb001" Run my job on any host except qb001
"maya" in host.jobtypes Run the job on a host with the Maya job type
host.processors.total =3D=3D 2 Run my job only on dual processor hosts
not (job.id in host.duty.id) Run my job only if there isn't already one of th= is job's instances running on it

job.kind =3D 'test' (or any othe= r value, your choice...)
not(job.kind in host.duty.kind)=

(Also see How t= o restrict a host to only one instance of a given kind of job, but still al= low other jobs)

Run only one "kind" of job on a wor= ker at the same time
(this will allow other kinds of jobs still to run= , different from reserving all job slots)

 

 

 

------=_Part_8438_1886574226.1711662227939--