~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to doc/devel/rfe/EvaluationExpressionSupport.wiki

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
= Evaluation Expression Support in Grid Engine 6.1 =
 
2
 
 
3
== Copyright statement ==
 
4
 
 
5
'''Note:''' This document is under Grid Engine project [http://gridengine.sunsource.net/license.html SISSL license].
 
6
 
 
7
* Date 2007/01/22
 
8
 
 
9
== Introduction ==
 
10
 
 
11
Grid Engine 6.0 already supports a RESTRING in a complex configuration allowing to specify an OR delimited "|" list of patterns for limiting the jobs.
 
12
 
 
13
This document describes enhanced and more flexible RESTRING expressions (see complex(5)) for Grid Engine 6.1. As a matter of course even more flexible syntax for pattern matching is perceivable.
 
14
 
 
15
=== Project Overview ===
 
16
 
 
17
Grid Engine 6.0 introduced a new complex type RESTRING that allows logical OR connected regular expressions for string resources. Grid Engine 6.1 will introduce a more flexible syntax for pattern matching. Specifically, the NOT operator ("don't schedule my job to a 'linux' host")
 
18
 
 
19
Examples:
 
20
 
 
21
   qsub -l arch="!linux"      ... don't schedule my job to a 'linux'
 
22
   qsub -l arch="!linux|hp"   ... would work while you couldn't express "don't 
 
23
                                  schedule my job to a 'linux' but on 'hp' host"
 
24
   qsub -l arch="!(linux|hp)" ... since you need to express it as not this nor this
 
25
 
 
26
More or less, this also makes it automatically convenient to support a logical AND.
 
27
 
 
28
Examples:
 
29
 
 
30
  qsub -l arch="!(lx*|sol*)&*64*"            ... schedule my job on a 64-bit OS, but not on Solaris or Linux
 
31
  qsub -l myos="(rh_3*|suse_[89]*)&!rh_3.1"  ... schedule my job on a host which has the "myos" attribute rh_3*, 
 
32
                                                 suse_8*, or suse_9*, but do not schedule it on a rh_3.1 host
 
33
 
 
34
The regular boolean expression definition can be found in the sge_types(1) man page.
 
35
 
 
36
=== Project Aim ===
 
37
 
 
38
The new feature implementation of the regular boolean expression for the wildcard expressions or patterns should be implemented in the maintrunk.
 
39
 
 
40
=== Wildcard Matching Defined in sge_types(1) ===
 
41
 
 
42
Any wildcard matching for the following
 
43
 
 
44
* wc_project_name [optional]
 
45
* wc_user_list_name [optional]
 
46
* wc_queue
 
47
* wc_cqueue
 
48
* wc_qdoamin
 
49
* wc_qinstance
 
50
* wc_host
 
51
* wc_hostgroup
 
52
* wc_pe [optional]
 
53
 
 
54
will support the boolean expression matching function sge_eval_expression().
 
55
 
 
56
The optional types will be implemented if some real requirement is identified.
 
57
 
 
58
=== Complex String Attributes ===
 
59
 
 
60
All the complex string attributes (CSTRING, STRING, RESTRING, HOST) will support boolean wildcard expressions. This wildcard matching will be implemented by the sge_eval_expression() function.
 
61
 
 
62
=== RESTRING ===
 
63
 
 
64
RESTRING becomes obsolete. RESTRING can be kept for interface compatibility, but STRING and RESTIRNG will use the same matching code. This behavior needs to be documented. The RESTRING becomes deprecated [complex(5)] interface and 
 
65
shall disappear with the next major (7.0) release.
 
66
 
 
67
=== Hostname Expression Support ===
 
68
 
 
69
Since there is already implemented support of several matching routines for hostnames (IGNORE_FQDN={true|false}, DEFAULT_DOMAIN), the original implementation behavior would not be changed.
 
70
 
 
71
=== Support for New qsub -q <expr>@<expr> ===
 
72
Since the queue attribute -l q=XXX and the host attribute -l h=YYY support the new expression/pattern matching the "-q" also should support the new matching.
 
73
 
 
74
qsub -q <expr>@<expr>
 
75
 
 
76
=== Allowed Character Restriction ===
 
77
A clearer definition of allowed characters for an attribute, in it's definition and in the resource request, should be defined. Currently, everything is allowed, including the (for qacct) dangerous ":".
 
78
 
 
79
Allowed characters could be a broad range a-z,A-Z,0-9,_,-,#,=,<,>,.,,(comma)
 
80
 
 
81
All characters could be allowed at all positions of the attributes or hostnames. Only valid hostnames will be accepted.
 
82
 
 
83
== Project Benefit ==
 
84
The adherence to accepted industry standards of the syntax for wildcard expression matching definitions will provide a wider acceptance amongst Grid Engine users.
 
85
 
 
86
= System Enhancement =
 
87
 
 
88
The enhancement is targeting whole range of commands in a uniform and consistent way. We add this as a standard feature.
 
89
 
 
90
== Enhancement Functions ==
 
91
The new expression syntax will be supported in different commands. The new meaning of some characters requires certain verifications to be done and could introduce some restrictions on attribute values. Reserved characters change the behavior. Characters in range [,],?,*,&,|,! are accounted as an expression reserved words with syntactical meanings in patterns and they are not allowed in the compared values.
 
92
 
 
93
=== qsub,qsh,qrsh,qalter,qresub,qlogin ===
 
94
 
 
95
An overview of command line option changes:
 
96
 
 
97
   -l complex=<expression>     ... support for all string type complexes for wildcard expressions.
 
98
   -q <wc_queue_list>          ... support for hostnames, queuenames, groupnames as the wildcard expression
 
99
   -masterq <wc_queue_list>
 
100
   -pe parallel_environment (optional - see above)
 
101
 
 
102
Parallel environment wildcard match
 
103
 
 
104
=== qconf ===
 
105
 
 
106
   -cq <wc_queue_list>    .... cleans queue
 
107
   -sq <wc_queue>         .... displays one or multiple cluster queues or queue instances
 
108
   -purge <wc_queue>      .... purges a queue instances
 
109
 
 
110
=== qselect ===
 
111
 
 
112
   -q <wc_queue>          .... wildcard expression queue list to be included in the output
 
113
   -l complex=<expression> ... support for all string type complexes for wildcard expressions
 
114
 
 
115
===qstat===
 
116
 
 
117
   -q <wc_queue_list>
 
118
   -q <wc_queue_list> -g c
 
119
   -l complex=<expression>
 
120
 
 
121
===qacct===
 
122
 
 
123
   -q <wc_queue> 
 
124
   -l complex=<expression>
 
125
 
 
126
===qmod===
 
127
 
 
128
   -e <wc_queue_list>    .... enable queue expression
 
129
   -d <wc_queue_list>    .... disable queue expression
 
130
   -c <wc_queue_list> 
 
131
   -cq <wc_queue_list>    ... clear error status queue expression
 
132
   -rq <wc_queue_list>
 
133
 
 
134
Reschedule queue expression
 
135
 
 
136
   -sq <wc_queue_list>    .... suspend queue expression
 
137
   -usq <wc_queue_list>   .... 'unsuspend' queue expression
 
138
 
 
139
=Documentation Changes=
 
140
==Man Pages==
 
141
=== submit(1) ===
 
142
There is a reference to the new sge_types(1) man page describing the wildcard value. On several places an expression is mentioned instead of a pattern.
 
143
 
 
144
=== qalter ===
 
145
There is a reference to the new sge_types(1) man page decribing the wildcard value.
 
146
 
 
147
=== sge_types(1) ===
 
148
The general syntax for a wildcard expression would look as:
 
149
 
 
150
* expression   = ["!"] ["("] valExp [")"] [ AND_OR expression ]
 
151
* valExp   = pattern | expression
 
152
* AND_OR   = "&" | "|"
 
153
 
 
154
    "!"         ... not operator - negate the following pattern or expression
 
155
    "&"         ... and operator - logical and with the following expression
 
156
    "|"         ... or operator - logical or with the following expression
 
157
    "("         ... open bracket - begins the priority evaluated expression. The close bracket is required
 
158
    ")"         ... close bracket - ends the priority evaluated expression.
 
159
    "pattern"   ... see the \fIpattern\fP definition
 
160
 
 
161
The wildcard expression itself must be put into '"' to ensure that the clients get the expression.
 
162
 
 
163
The 'pattern' can be found in the sge_types(1) man page. It is a pattern expression supported by the standard C-lib fnmatch() function.
 
164
 
 
165
Examples:
 
166
 
 
167
    "!(lx*|sol*)&*64*"            ... not begin with lx or sol but contain 64
 
168
    "(rh_3*|suse_[89]*)&!rh_3.1"  ... attribute rh_3*, suse_8*, or suse_9* but not rh_3.1
 
169
 
 
170
WARNING: Reserved characters change the behavior! Characters in range [,],?,*,&,|,! are accounted as an expression reserved words with syntactical meanings in patterns and they are not allowed in the compared values.
 
171
 
 
172
This means that it is not allowed to set the complex for particular queue to the value containing this reserved characters.
 
173
 
 
174
=== complex(5) ===
 
175
The general syntax for a wildcard complex expressions is now referenced by sge_types(1) to avoid duplicate declaration
 
176
 
 
177
=== qstat(1) ===
 
178
On several places an expression is mentioned instead of a pattern
 
179
 
 
180
=== qacct(1) ===
 
181
The general syntax for a wildcard complex expressions is now in sge_types(1), so there is a simplification of some command description.
 
182
 
 
183
=== qselect(1) ===
 
184
In one place there is mentioned an expression instead of a pattern