1 | # This file was created automatically by SWIG. |
---|
2 | # Don't modify this file, modify the SWIG interface instead. |
---|
3 | # This file is compatible with both classic and new-style classes. |
---|
4 | |
---|
5 | import _pbs |
---|
6 | |
---|
7 | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): |
---|
8 | if (name == "this"): |
---|
9 | if isinstance(value, class_type): |
---|
10 | self.__dict__[name] = value.this |
---|
11 | if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown |
---|
12 | del value.thisown |
---|
13 | return |
---|
14 | method = class_type.__swig_setmethods__.get(name,None) |
---|
15 | if method: return method(self,value) |
---|
16 | if (not static) or hasattr(self,name) or (name == "thisown"): |
---|
17 | self.__dict__[name] = value |
---|
18 | else: |
---|
19 | raise AttributeError("You cannot add attributes to %s" % self) |
---|
20 | |
---|
21 | def _swig_setattr(self,class_type,name,value): |
---|
22 | return _swig_setattr_nondynamic(self,class_type,name,value,0) |
---|
23 | |
---|
24 | def _swig_getattr(self,class_type,name): |
---|
25 | method = class_type.__swig_getmethods__.get(name,None) |
---|
26 | if method: return method(self) |
---|
27 | raise AttributeError,name |
---|
28 | |
---|
29 | import types |
---|
30 | try: |
---|
31 | _object = types.ObjectType |
---|
32 | _newclass = 1 |
---|
33 | except AttributeError: |
---|
34 | class _object : pass |
---|
35 | _newclass = 0 |
---|
36 | del types |
---|
37 | |
---|
38 | |
---|
39 | |
---|
40 | new_attrl = _pbs.new_attrl |
---|
41 | |
---|
42 | new_attropl = _pbs.new_attropl |
---|
43 | |
---|
44 | new_batch_status = _pbs.new_batch_status |
---|
45 | |
---|
46 | get_error = _pbs.get_error |
---|
47 | ATTR_a = _pbs.ATTR_a |
---|
48 | ATTR_c = _pbs.ATTR_c |
---|
49 | ATTR_e = _pbs.ATTR_e |
---|
50 | ATTR_g = _pbs.ATTR_g |
---|
51 | ATTR_h = _pbs.ATTR_h |
---|
52 | ATTR_j = _pbs.ATTR_j |
---|
53 | ATTR_k = _pbs.ATTR_k |
---|
54 | ATTR_l = _pbs.ATTR_l |
---|
55 | ATTR_m = _pbs.ATTR_m |
---|
56 | ATTR_o = _pbs.ATTR_o |
---|
57 | ATTR_p = _pbs.ATTR_p |
---|
58 | ATTR_q = _pbs.ATTR_q |
---|
59 | ATTR_r = _pbs.ATTR_r |
---|
60 | ATTR_u = _pbs.ATTR_u |
---|
61 | ATTR_v = _pbs.ATTR_v |
---|
62 | ATTR_A = _pbs.ATTR_A |
---|
63 | ATTR_M = _pbs.ATTR_M |
---|
64 | ATTR_N = _pbs.ATTR_N |
---|
65 | ATTR_S = _pbs.ATTR_S |
---|
66 | ATTR_depend = _pbs.ATTR_depend |
---|
67 | ATTR_inter = _pbs.ATTR_inter |
---|
68 | ATTR_stagein = _pbs.ATTR_stagein |
---|
69 | ATTR_stageout = _pbs.ATTR_stageout |
---|
70 | ATTR_ctime = _pbs.ATTR_ctime |
---|
71 | ATTR_exechost = _pbs.ATTR_exechost |
---|
72 | ATTR_mtime = _pbs.ATTR_mtime |
---|
73 | ATTR_qtime = _pbs.ATTR_qtime |
---|
74 | ATTR_session = _pbs.ATTR_session |
---|
75 | ATTR_euser = _pbs.ATTR_euser |
---|
76 | ATTR_egroup = _pbs.ATTR_egroup |
---|
77 | ATTR_hashname = _pbs.ATTR_hashname |
---|
78 | ATTR_hopcount = _pbs.ATTR_hopcount |
---|
79 | ATTR_security = _pbs.ATTR_security |
---|
80 | ATTR_sched_hint = _pbs.ATTR_sched_hint |
---|
81 | ATTR_substate = _pbs.ATTR_substate |
---|
82 | ATTR_name = _pbs.ATTR_name |
---|
83 | ATTR_owner = _pbs.ATTR_owner |
---|
84 | ATTR_used = _pbs.ATTR_used |
---|
85 | ATTR_state = _pbs.ATTR_state |
---|
86 | ATTR_queue = _pbs.ATTR_queue |
---|
87 | ATTR_server = _pbs.ATTR_server |
---|
88 | ATTR_maxrun = _pbs.ATTR_maxrun |
---|
89 | ATTR_total = _pbs.ATTR_total |
---|
90 | ATTR_comment = _pbs.ATTR_comment |
---|
91 | ATTR_cookie = _pbs.ATTR_cookie |
---|
92 | ATTR_qrank = _pbs.ATTR_qrank |
---|
93 | ATTR_altid = _pbs.ATTR_altid |
---|
94 | ATTR_etime = _pbs.ATTR_etime |
---|
95 | ATTR_aclgren = _pbs.ATTR_aclgren |
---|
96 | ATTR_aclgroup = _pbs.ATTR_aclgroup |
---|
97 | ATTR_aclhten = _pbs.ATTR_aclhten |
---|
98 | ATTR_aclhost = _pbs.ATTR_aclhost |
---|
99 | ATTR_acluren = _pbs.ATTR_acluren |
---|
100 | ATTR_acluser = _pbs.ATTR_acluser |
---|
101 | ATTR_altrouter = _pbs.ATTR_altrouter |
---|
102 | ATTR_chkptmin = _pbs.ATTR_chkptmin |
---|
103 | ATTR_enable = _pbs.ATTR_enable |
---|
104 | ATTR_fromroute = _pbs.ATTR_fromroute |
---|
105 | ATTR_killdelay = _pbs.ATTR_killdelay |
---|
106 | ATTR_maxgrprun = _pbs.ATTR_maxgrprun |
---|
107 | ATTR_maxque = _pbs.ATTR_maxque |
---|
108 | ATTR_maxuserrun = _pbs.ATTR_maxuserrun |
---|
109 | ATTR_qtype = _pbs.ATTR_qtype |
---|
110 | ATTR_rescassn = _pbs.ATTR_rescassn |
---|
111 | ATTR_rescdflt = _pbs.ATTR_rescdflt |
---|
112 | ATTR_rescmax = _pbs.ATTR_rescmax |
---|
113 | ATTR_rescmin = _pbs.ATTR_rescmin |
---|
114 | ATTR_rndzretry = _pbs.ATTR_rndzretry |
---|
115 | ATTR_routedest = _pbs.ATTR_routedest |
---|
116 | ATTR_routeheld = _pbs.ATTR_routeheld |
---|
117 | ATTR_routewait = _pbs.ATTR_routewait |
---|
118 | ATTR_routeretry = _pbs.ATTR_routeretry |
---|
119 | ATTR_routelife = _pbs.ATTR_routelife |
---|
120 | ATTR_rsvexpdt = _pbs.ATTR_rsvexpdt |
---|
121 | ATTR_rsvsync = _pbs.ATTR_rsvsync |
---|
122 | ATTR_start = _pbs.ATTR_start |
---|
123 | ATTR_count = _pbs.ATTR_count |
---|
124 | ATTR_number = _pbs.ATTR_number |
---|
125 | ATTR_reqprop = _pbs.ATTR_reqprop |
---|
126 | ATTR_aclroot = _pbs.ATTR_aclroot |
---|
127 | ATTR_managers = _pbs.ATTR_managers |
---|
128 | ATTR_dfltque = _pbs.ATTR_dfltque |
---|
129 | ATTR_defnode = _pbs.ATTR_defnode |
---|
130 | ATTR_locsvrs = _pbs.ATTR_locsvrs |
---|
131 | ATTR_logevents = _pbs.ATTR_logevents |
---|
132 | ATTR_logfile = _pbs.ATTR_logfile |
---|
133 | ATTR_mailfrom = _pbs.ATTR_mailfrom |
---|
134 | ATTR_nodepack = _pbs.ATTR_nodepack |
---|
135 | ATTR_operators = _pbs.ATTR_operators |
---|
136 | ATTR_queryother = _pbs.ATTR_queryother |
---|
137 | ATTR_resccost = _pbs.ATTR_resccost |
---|
138 | ATTR_rescavail = _pbs.ATTR_rescavail |
---|
139 | ATTR_schedit = _pbs.ATTR_schedit |
---|
140 | ATTR_scheduling = _pbs.ATTR_scheduling |
---|
141 | ATTR_status = _pbs.ATTR_status |
---|
142 | ATTR_syscost = _pbs.ATTR_syscost |
---|
143 | ATTR_pingrate = _pbs.ATTR_pingrate |
---|
144 | ATTR_ndchkrate = _pbs.ATTR_ndchkrate |
---|
145 | ATTR_procpack = _pbs.ATTR_procpack |
---|
146 | ATTR_NODE_state = _pbs.ATTR_NODE_state |
---|
147 | ATTR_NODE_np = _pbs.ATTR_NODE_np |
---|
148 | ATTR_NODE_properties = _pbs.ATTR_NODE_properties |
---|
149 | ATTR_NODE_ntype = _pbs.ATTR_NODE_ntype |
---|
150 | ATTR_NODE_jobs = _pbs.ATTR_NODE_jobs |
---|
151 | CHECKPOINT_UNSPECIFIED = _pbs.CHECKPOINT_UNSPECIFIED |
---|
152 | NO_HOLD = _pbs.NO_HOLD |
---|
153 | NO_JOIN = _pbs.NO_JOIN |
---|
154 | NO_KEEP = _pbs.NO_KEEP |
---|
155 | MAIL_AT_ABORT = _pbs.MAIL_AT_ABORT |
---|
156 | DELDELAY = _pbs.DELDELAY |
---|
157 | USER_HOLD = _pbs.USER_HOLD |
---|
158 | OTHER_HOLD = _pbs.OTHER_HOLD |
---|
159 | SYSTEM_HOLD = _pbs.SYSTEM_HOLD |
---|
160 | ND_free = _pbs.ND_free |
---|
161 | ND_offline = _pbs.ND_offline |
---|
162 | ND_down = _pbs.ND_down |
---|
163 | ND_reserve = _pbs.ND_reserve |
---|
164 | ND_job_exclusive = _pbs.ND_job_exclusive |
---|
165 | ND_job_sharing = _pbs.ND_job_sharing |
---|
166 | ND_busy = _pbs.ND_busy |
---|
167 | ND_state_unknown = _pbs.ND_state_unknown |
---|
168 | ND_timeshared = _pbs.ND_timeshared |
---|
169 | ND_cluster = _pbs.ND_cluster |
---|
170 | MAX_ENCODE_BFR = _pbs.MAX_ENCODE_BFR |
---|
171 | MGR_CMD_CREATE = _pbs.MGR_CMD_CREATE |
---|
172 | MGR_CMD_DELETE = _pbs.MGR_CMD_DELETE |
---|
173 | MGR_CMD_SET = _pbs.MGR_CMD_SET |
---|
174 | MGR_CMD_UNSET = _pbs.MGR_CMD_UNSET |
---|
175 | MGR_CMD_LIST = _pbs.MGR_CMD_LIST |
---|
176 | MGR_CMD_PRINT = _pbs.MGR_CMD_PRINT |
---|
177 | MGR_CMD_ACTIVE = _pbs.MGR_CMD_ACTIVE |
---|
178 | MGR_OBJ_NONE = _pbs.MGR_OBJ_NONE |
---|
179 | MGR_OBJ_SERVER = _pbs.MGR_OBJ_SERVER |
---|
180 | MGR_OBJ_QUEUE = _pbs.MGR_OBJ_QUEUE |
---|
181 | MGR_OBJ_JOB = _pbs.MGR_OBJ_JOB |
---|
182 | MGR_OBJ_NODE = _pbs.MGR_OBJ_NODE |
---|
183 | MSG_OUT = _pbs.MSG_OUT |
---|
184 | MSG_ERR = _pbs.MSG_ERR |
---|
185 | SHUT_SIG = _pbs.SHUT_SIG |
---|
186 | SHUT_IMMEDIATE = _pbs.SHUT_IMMEDIATE |
---|
187 | SHUT_DELAY = _pbs.SHUT_DELAY |
---|
188 | SHUT_QUICK = _pbs.SHUT_QUICK |
---|
189 | SIG_RESUME = _pbs.SIG_RESUME |
---|
190 | SIG_SUSPEND = _pbs.SIG_SUSPEND |
---|
191 | PBS_MAXHOSTNAME = _pbs.PBS_MAXHOSTNAME |
---|
192 | MAXPATHLEN = _pbs.MAXPATHLEN |
---|
193 | MAXNAMLEN = _pbs.MAXNAMLEN |
---|
194 | PBS_MAXUSER = _pbs.PBS_MAXUSER |
---|
195 | PBS_MAXGRPN = _pbs.PBS_MAXGRPN |
---|
196 | PBS_MAXQUEUENAME = _pbs.PBS_MAXQUEUENAME |
---|
197 | PBS_MAXSERVERNAME = _pbs.PBS_MAXSERVERNAME |
---|
198 | PBS_MAXSEQNUM = _pbs.PBS_MAXSEQNUM |
---|
199 | PBS_MAXPORTNUM = _pbs.PBS_MAXPORTNUM |
---|
200 | PBS_MAXSVRJOBID = _pbs.PBS_MAXSVRJOBID |
---|
201 | PBS_MAXCLTJOBID = _pbs.PBS_MAXCLTJOBID |
---|
202 | PBS_MAXDEST = _pbs.PBS_MAXDEST |
---|
203 | PBS_MAXROUTEDEST = _pbs.PBS_MAXROUTEDEST |
---|
204 | PBS_USE_IFF = _pbs.PBS_USE_IFF |
---|
205 | PBS_INTERACTIVE = _pbs.PBS_INTERACTIVE |
---|
206 | PBS_TERM_BUF_SZ = _pbs.PBS_TERM_BUF_SZ |
---|
207 | PBS_TERM_CCA = _pbs.PBS_TERM_CCA |
---|
208 | PBS_BATCH_SERVICE_NAME = _pbs.PBS_BATCH_SERVICE_NAME |
---|
209 | PBS_BATCH_SERVICE_PORT = _pbs.PBS_BATCH_SERVICE_PORT |
---|
210 | PBS_BATCH_SERVICE_NAME_DIS = _pbs.PBS_BATCH_SERVICE_NAME_DIS |
---|
211 | PBS_BATCH_SERVICE_PORT_DIS = _pbs.PBS_BATCH_SERVICE_PORT_DIS |
---|
212 | PBS_MOM_SERVICE_NAME = _pbs.PBS_MOM_SERVICE_NAME |
---|
213 | PBS_MOM_SERVICE_PORT = _pbs.PBS_MOM_SERVICE_PORT |
---|
214 | PBS_MANAGER_SERVICE_NAME = _pbs.PBS_MANAGER_SERVICE_NAME |
---|
215 | PBS_MANAGER_SERVICE_PORT = _pbs.PBS_MANAGER_SERVICE_PORT |
---|
216 | PBS_SCHEDULER_SERVICE_NAME = _pbs.PBS_SCHEDULER_SERVICE_NAME |
---|
217 | PBS_SCHEDULER_SERVICE_PORT = _pbs.PBS_SCHEDULER_SERVICE_PORT |
---|
218 | SET = _pbs.SET |
---|
219 | UNSET = _pbs.UNSET |
---|
220 | INCR = _pbs.INCR |
---|
221 | DECR = _pbs.DECR |
---|
222 | EQ = _pbs.EQ |
---|
223 | NE = _pbs.NE |
---|
224 | GE = _pbs.GE |
---|
225 | GT = _pbs.GT |
---|
226 | LE = _pbs.LE |
---|
227 | LT = _pbs.LT |
---|
228 | DFLT = _pbs.DFLT |
---|
229 | class attrl(_object): |
---|
230 | __swig_setmethods__ = {} |
---|
231 | __setattr__ = lambda self, name, value: _swig_setattr(self, attrl, name, value) |
---|
232 | __swig_getmethods__ = {} |
---|
233 | __getattr__ = lambda self, name: _swig_getattr(self, attrl, name) |
---|
234 | def __init__(self): raise RuntimeError, "No constructor defined" |
---|
235 | def __repr__(self): |
---|
236 | return "<%s.%s; proxy of C attrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) |
---|
237 | __swig_setmethods__["name"] = _pbs.attrl_name_set |
---|
238 | __swig_getmethods__["name"] = _pbs.attrl_name_get |
---|
239 | if _newclass:name = property(_pbs.attrl_name_get, _pbs.attrl_name_set) |
---|
240 | __swig_setmethods__["resource"] = _pbs.attrl_resource_set |
---|
241 | __swig_getmethods__["resource"] = _pbs.attrl_resource_get |
---|
242 | if _newclass:resource = property(_pbs.attrl_resource_get, _pbs.attrl_resource_set) |
---|
243 | __swig_setmethods__["value"] = _pbs.attrl_value_set |
---|
244 | __swig_getmethods__["value"] = _pbs.attrl_value_get |
---|
245 | if _newclass:value = property(_pbs.attrl_value_get, _pbs.attrl_value_set) |
---|
246 | __swig_setmethods__["op"] = _pbs.attrl_op_set |
---|
247 | __swig_getmethods__["op"] = _pbs.attrl_op_get |
---|
248 | if _newclass:op = property(_pbs.attrl_op_get, _pbs.attrl_op_set) |
---|
249 | def __str__(*args): return _pbs.attrl___str__(*args) |
---|
250 | |
---|
251 | class attrlPtr(attrl): |
---|
252 | def __init__(self, this): |
---|
253 | _swig_setattr(self, attrl, 'this', this) |
---|
254 | if not hasattr(self,"thisown"): _swig_setattr(self, attrl, 'thisown', 0) |
---|
255 | _swig_setattr(self, attrl,self.__class__,attrl) |
---|
256 | _pbs.attrl_swigregister(attrlPtr) |
---|
257 | |
---|
258 | class attropl(_object): |
---|
259 | __swig_setmethods__ = {} |
---|
260 | __setattr__ = lambda self, name, value: _swig_setattr(self, attropl, name, value) |
---|
261 | __swig_getmethods__ = {} |
---|
262 | __getattr__ = lambda self, name: _swig_getattr(self, attropl, name) |
---|
263 | def __init__(self): raise RuntimeError, "No constructor defined" |
---|
264 | def __repr__(self): |
---|
265 | return "<%s.%s; proxy of C attropl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) |
---|
266 | __swig_setmethods__["name"] = _pbs.attropl_name_set |
---|
267 | __swig_getmethods__["name"] = _pbs.attropl_name_get |
---|
268 | if _newclass:name = property(_pbs.attropl_name_get, _pbs.attropl_name_set) |
---|
269 | __swig_setmethods__["resource"] = _pbs.attropl_resource_set |
---|
270 | __swig_getmethods__["resource"] = _pbs.attropl_resource_get |
---|
271 | if _newclass:resource = property(_pbs.attropl_resource_get, _pbs.attropl_resource_set) |
---|
272 | __swig_setmethods__["value"] = _pbs.attropl_value_set |
---|
273 | __swig_getmethods__["value"] = _pbs.attropl_value_get |
---|
274 | if _newclass:value = property(_pbs.attropl_value_get, _pbs.attropl_value_set) |
---|
275 | __swig_setmethods__["op"] = _pbs.attropl_op_set |
---|
276 | __swig_getmethods__["op"] = _pbs.attropl_op_get |
---|
277 | if _newclass:op = property(_pbs.attropl_op_get, _pbs.attropl_op_set) |
---|
278 | def __str__(*args): return _pbs.attropl___str__(*args) |
---|
279 | |
---|
280 | class attroplPtr(attropl): |
---|
281 | def __init__(self, this): |
---|
282 | _swig_setattr(self, attropl, 'this', this) |
---|
283 | if not hasattr(self,"thisown"): _swig_setattr(self, attropl, 'thisown', 0) |
---|
284 | _swig_setattr(self, attropl,self.__class__,attropl) |
---|
285 | _pbs.attropl_swigregister(attroplPtr) |
---|
286 | |
---|
287 | class batch_status(_object): |
---|
288 | __swig_setmethods__ = {} |
---|
289 | __setattr__ = lambda self, name, value: _swig_setattr(self, batch_status, name, value) |
---|
290 | __swig_getmethods__ = {} |
---|
291 | __getattr__ = lambda self, name: _swig_getattr(self, batch_status, name) |
---|
292 | def __init__(self): raise RuntimeError, "No constructor defined" |
---|
293 | def __repr__(self): |
---|
294 | return "<%s.%s; proxy of C batch_status instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) |
---|
295 | __swig_setmethods__["name"] = _pbs.batch_status_name_set |
---|
296 | __swig_getmethods__["name"] = _pbs.batch_status_name_get |
---|
297 | if _newclass:name = property(_pbs.batch_status_name_get, _pbs.batch_status_name_set) |
---|
298 | __swig_setmethods__["attribs"] = _pbs.batch_status_attribs_set |
---|
299 | __swig_getmethods__["attribs"] = _pbs.batch_status_attribs_get |
---|
300 | if _newclass:attribs = property(_pbs.batch_status_attribs_get, _pbs.batch_status_attribs_set) |
---|
301 | __swig_setmethods__["text"] = _pbs.batch_status_text_set |
---|
302 | __swig_getmethods__["text"] = _pbs.batch_status_text_get |
---|
303 | if _newclass:text = property(_pbs.batch_status_text_get, _pbs.batch_status_text_set) |
---|
304 | |
---|
305 | class batch_statusPtr(batch_status): |
---|
306 | def __init__(self, this): |
---|
307 | _swig_setattr(self, batch_status, 'this', this) |
---|
308 | if not hasattr(self,"thisown"): _swig_setattr(self, batch_status, 'thisown', 0) |
---|
309 | _swig_setattr(self, batch_status,self.__class__,batch_status) |
---|
310 | _pbs.batch_status_swigregister(batch_statusPtr) |
---|
311 | |
---|
312 | RESOURCE_T_NULL = _pbs.RESOURCE_T_NULL |
---|
313 | RESOURCE_T_ALL = _pbs.RESOURCE_T_ALL |
---|
314 | |
---|
315 | avail = _pbs.avail |
---|
316 | |
---|
317 | pbs_asyrunjob = _pbs.pbs_asyrunjob |
---|
318 | |
---|
319 | pbs_alterjob = _pbs.pbs_alterjob |
---|
320 | |
---|
321 | pbs_connect = _pbs.pbs_connect |
---|
322 | |
---|
323 | pbs_query_max_connections = _pbs.pbs_query_max_connections |
---|
324 | |
---|
325 | pbs_default = _pbs.pbs_default |
---|
326 | |
---|
327 | pbs_deljob = _pbs.pbs_deljob |
---|
328 | |
---|
329 | pbs_disconnect = _pbs.pbs_disconnect |
---|
330 | |
---|
331 | pbs_holdjob = _pbs.pbs_holdjob |
---|
332 | |
---|
333 | pbs_locjob = _pbs.pbs_locjob |
---|
334 | |
---|
335 | pbs_manager = _pbs.pbs_manager |
---|
336 | |
---|
337 | pbs_movejob = _pbs.pbs_movejob |
---|
338 | |
---|
339 | pbs_msgjob = _pbs.pbs_msgjob |
---|
340 | |
---|
341 | pbs_orderjob = _pbs.pbs_orderjob |
---|
342 | |
---|
343 | pbs_rescquery = _pbs.pbs_rescquery |
---|
344 | |
---|
345 | pbs_rescreserve = _pbs.pbs_rescreserve |
---|
346 | |
---|
347 | pbs_rescrelease = _pbs.pbs_rescrelease |
---|
348 | |
---|
349 | pbs_rerunjob = _pbs.pbs_rerunjob |
---|
350 | |
---|
351 | pbs_rlsjob = _pbs.pbs_rlsjob |
---|
352 | |
---|
353 | pbs_runjob = _pbs.pbs_runjob |
---|
354 | |
---|
355 | pbs_selectjob = _pbs.pbs_selectjob |
---|
356 | |
---|
357 | pbs_sigjob = _pbs.pbs_sigjob |
---|
358 | |
---|
359 | pbs_statfree = _pbs.pbs_statfree |
---|
360 | |
---|
361 | pbs_statjob = _pbs.pbs_statjob |
---|
362 | |
---|
363 | pbs_selstat = _pbs.pbs_selstat |
---|
364 | |
---|
365 | pbs_statque = _pbs.pbs_statque |
---|
366 | |
---|
367 | pbs_statserver = _pbs.pbs_statserver |
---|
368 | |
---|
369 | pbs_statnode = _pbs.pbs_statnode |
---|
370 | |
---|
371 | pbs_submit = _pbs.pbs_submit |
---|
372 | |
---|
373 | pbs_terminate = _pbs.pbs_terminate |
---|
374 | |
---|
375 | totpool = _pbs.totpool |
---|
376 | |
---|
377 | usepool = _pbs.usepool |
---|
378 | |
---|
379 | openrm = _pbs.openrm |
---|
380 | |
---|
381 | closerm = _pbs.closerm |
---|
382 | |
---|
383 | downrm = _pbs.downrm |
---|
384 | |
---|
385 | configrm = _pbs.configrm |
---|
386 | |
---|
387 | addreq = _pbs.addreq |
---|
388 | |
---|
389 | allreq = _pbs.allreq |
---|
390 | |
---|
391 | flushreq = _pbs.flushreq |
---|
392 | |
---|
393 | activereq = _pbs.activereq |
---|
394 | |
---|
395 | fullresp = _pbs.fullresp |
---|
396 | |
---|
397 | getreq = _pbs.getreq |
---|
398 | LOG_BUF_SIZE = _pbs.LOG_BUF_SIZE |
---|
399 | |
---|
400 | log_close = _pbs.log_close |
---|
401 | |
---|
402 | log_err = _pbs.log_err |
---|
403 | |
---|
404 | log_event = _pbs.log_event |
---|
405 | |
---|
406 | log_open = _pbs.log_open |
---|
407 | |
---|
408 | log_record = _pbs.log_record |
---|
409 | |
---|
410 | setup_env = _pbs.setup_env |
---|
411 | |
---|
412 | chk_file_sec = _pbs.chk_file_sec |
---|
413 | PBSEVENT_ERROR = _pbs.PBSEVENT_ERROR |
---|
414 | PBSEVENT_SYSTEM = _pbs.PBSEVENT_SYSTEM |
---|
415 | PBSEVENT_ADMIN = _pbs.PBSEVENT_ADMIN |
---|
416 | PBSEVENT_JOB = _pbs.PBSEVENT_JOB |
---|
417 | PBSEVENT_JOB_USAGE = _pbs.PBSEVENT_JOB_USAGE |
---|
418 | PBSEVENT_SECURITY = _pbs.PBSEVENT_SECURITY |
---|
419 | PBSEVENT_SCHED = _pbs.PBSEVENT_SCHED |
---|
420 | PBSEVENT_DEBUG = _pbs.PBSEVENT_DEBUG |
---|
421 | PBSEVENT_DEBUG2 = _pbs.PBSEVENT_DEBUG2 |
---|
422 | PBSEVENT_FORCE = _pbs.PBSEVENT_FORCE |
---|
423 | PBS_EVENTCLASS_SERVER = _pbs.PBS_EVENTCLASS_SERVER |
---|
424 | PBS_EVENTCLASS_QUEUE = _pbs.PBS_EVENTCLASS_QUEUE |
---|
425 | PBS_EVENTCLASS_JOB = _pbs.PBS_EVENTCLASS_JOB |
---|
426 | PBS_EVENTCLASS_REQUEST = _pbs.PBS_EVENTCLASS_REQUEST |
---|
427 | PBS_EVENTCLASS_FILE = _pbs.PBS_EVENTCLASS_FILE |
---|
428 | PBS_EVENTCLASS_ACCT = _pbs.PBS_EVENTCLASS_ACCT |
---|
429 | PBS_EVENTCLASS_NODE = _pbs.PBS_EVENTCLASS_NODE |
---|
430 | PBSEVENT_MASK = _pbs.PBSEVENT_MASK |
---|
431 | # PBS python interface |
---|
432 | # Author: Bas van der Vlies <basv@sara.nl> |
---|
433 | # Date : 27 Feb 2002 |
---|
434 | # Desc. : This is python wrapper class for getting the resource |
---|
435 | # mom values. |
---|
436 | # |
---|
437 | # CVS info |
---|
438 | # $Id: pbs.py 144 2006-11-16 13:35:53Z bas $ |
---|
439 | # $Date: 2002/10/21 14:14:47 $ |
---|
440 | # $Revision: 1.6 $ |
---|
441 | # |
---|
442 | import string |
---|
443 | import types |
---|
444 | |
---|
445 | # Default linux resources to get from the mom |
---|
446 | # |
---|
447 | default_linux_res = [ |
---|
448 | "availmem", # available memory size in KB |
---|
449 | "ideal_load", # static ideal_load value |
---|
450 | "loadave", # the current load average |
---|
451 | "max_load", # static max_load value |
---|
452 | "ncpus", # number of cpus |
---|
453 | "physmem", # physical memory size in KB |
---|
454 | "resi", # resident memory size for a pid or session in KB |
---|
455 | "totmem", # total memory size in KB |
---|
456 | "walltime", # wall clock time for a pid |
---|
457 | ] |
---|
458 | |
---|
459 | # Default irix6 resources to get from the mom |
---|
460 | # |
---|
461 | default_irix6_res = [ |
---|
462 | "availmem", # available memory size in KB |
---|
463 | "loadave", # the current load average |
---|
464 | "ncpus", # number of cpus |
---|
465 | "physmem", # physical memory size in KB |
---|
466 | "resi", # resident memory size for a pid or session in KB |
---|
467 | "walltime", # wall clock time for a pid |
---|
468 | "quota", # quota information (sizes in KB) |
---|
469 | ] |
---|
470 | |
---|
471 | default_mom_res = [ |
---|
472 | "arch", # the architecture of the machine |
---|
473 | "uname", # the architecture of the machine |
---|
474 | "cput", # cpu time for a pid or session |
---|
475 | "idletime", # seconds of idle time |
---|
476 | "mem", # memory size for a pid or session in KB |
---|
477 | "sessions", # list of sessions in the system |
---|
478 | "pids", # list of pids in a session |
---|
479 | "nsessions", # number of sessions in the system |
---|
480 | "nusers", # number of users in the system |
---|
481 | "size", # size of a file or filesystem |
---|
482 | "host", # Name of host on which job should be run |
---|
483 | "nodes", # Number and/or type of nodes to be reserved for exclusive use by the job |
---|
484 | "other", # Allows a user to specify site specific information |
---|
485 | "software", # Allows a user to specify software required by the job |
---|
486 | ] |
---|
487 | |
---|
488 | def check_resp(dict, str): |
---|
489 | """ |
---|
490 | Check the daemon response. If we have no permission to |
---|
491 | query the values then we got a 'None' response. Else |
---|
492 | if we supplied a keyword that does not exits we get a |
---|
493 | '?' response |
---|
494 | """ |
---|
495 | if not str: |
---|
496 | return |
---|
497 | |
---|
498 | key, val = string.split(str, '=') |
---|
499 | key = string.strip(key) |
---|
500 | val = string.strip(val) |
---|
501 | |
---|
502 | # Did we got a valid response |
---|
503 | # |
---|
504 | if not val[0] == '?': |
---|
505 | dict[key] = val |
---|
506 | |
---|
507 | def use_default_keywords(id, d): |
---|
508 | """ |
---|
509 | Get the default values from the mom daemon |
---|
510 | """ |
---|
511 | for res in default_mom_res: |
---|
512 | addreq(id, res) |
---|
513 | resp = getreq(id) |
---|
514 | check_resp(d, resp) |
---|
515 | |
---|
516 | # Do not proceed if we have an empty dictionary |
---|
517 | # |
---|
518 | if not d: |
---|
519 | return |
---|
520 | |
---|
521 | if d['arch' ] == 'linux': |
---|
522 | for res in default_linux_res: |
---|
523 | addreq(id, res) |
---|
524 | resp = getreq(id) |
---|
525 | check_resp(d, resp) |
---|
526 | |
---|
527 | def use_user_keywords(id, d, l): |
---|
528 | for res in l: |
---|
529 | if type(res) is types.StringType: |
---|
530 | addreq(id, res) |
---|
531 | resp = getreq(id) |
---|
532 | check_resp(d, resp) |
---|
533 | else: |
---|
534 | raise TypeError, 'Expected a string got %s :%s' %(type(res), res) |
---|
535 | |
---|
536 | def get_mom_values(id, list = None): |
---|
537 | """ |
---|
538 | This function will query the mom with a default resmon keywords |
---|
539 | and 'arch' depended keywords. Supported archs are: |
---|
540 | linux |
---|
541 | irix6 |
---|
542 | User can also supply their own list of keywords as second parameter. |
---|
543 | arguments: |
---|
544 | id : connection number with mom daemon on a node |
---|
545 | list : optional parameter. If supplied then use this. A list |
---|
546 | of mom keywords. |
---|
547 | """ |
---|
548 | |
---|
549 | d = {} |
---|
550 | if not list: |
---|
551 | use_default_keywords(id, d) |
---|
552 | else: |
---|
553 | use_user_keywords(id, d , list) |
---|
554 | |
---|
555 | return d |
---|
556 | |
---|
557 | def version(): |
---|
558 | """ |
---|
559 | Returns the pbs python interface version as a string. |
---|
560 | """ |
---|
561 | return '2.9.4' |
---|
562 | |
---|
563 | # A useful dict with error codes to text |
---|
564 | # |
---|
565 | # SVN Info: |
---|
566 | # $Id: pbs.py 144 2006-11-16 13:35:53Z bas $ |
---|
567 | # |
---|
568 | errors_txt = { |
---|
569 | 0 : 'no error', |
---|
570 | 15001 : 'Unknown Job Identifier', |
---|
571 | 15002 : 'Undefined Attribute', |
---|
572 | 15003 : 'attempt to set READ ONLY attribute', |
---|
573 | 15004 : 'Invalid request', |
---|
574 | 15005 : 'Unknown batch request', |
---|
575 | 15006 : 'Too many submit retries', |
---|
576 | 15007 : 'No permission', |
---|
577 | 15008 : 'access from host not allowed', |
---|
578 | 15009 : 'job already exists', |
---|
579 | 15010 : 'system error occurred', |
---|
580 | 15011 : 'internal server error occurred', |
---|
581 | 15012 : 'parent job of dependent in rte que', |
---|
582 | 15013 : 'unknown signal name', |
---|
583 | 15014 : 'bad attribute value', |
---|
584 | 15015 : 'Cannot modify attrib in run state', |
---|
585 | 15016 : 'request invalid for job state', |
---|
586 | 15018 : 'Unknown queue name', |
---|
587 | 15019 : 'Invalid Credential in request', |
---|
588 | 15020 : 'Expired Credential in request', |
---|
589 | 15021 : 'Queue not enabled', |
---|
590 | 15022 : 'No access permission for queue', |
---|
591 | 15023 : 'Bad user - no password entry', |
---|
592 | 15024 : 'Max hop count exceeded', |
---|
593 | 15025 : 'Queue already exists', |
---|
594 | 15026 : 'incompatable queue attribute type', |
---|
595 | 15027 : 'Queue Busy (not empty)', |
---|
596 | 15028 : 'Queue name too long', |
---|
597 | 15029 : 'Feature', |
---|
598 | 15030 : 'Cannot enable queue,needs add def', |
---|
599 | 15031 : 'Protocol (ASN.1) error', |
---|
600 | 15032 : 'Bad attribute list structure', |
---|
601 | 15033 : 'No free connections', |
---|
602 | 15034 : 'No server to connect to', |
---|
603 | 15035 : 'Unknown resource', |
---|
604 | 15036 : 'Job exceeds Queue resource limits', |
---|
605 | 15037 : 'No Default Queue Defined', |
---|
606 | 15038 : 'Job Not Rerunnable', |
---|
607 | 15039 : 'Route rejected by all destinations', |
---|
608 | 15040 : 'Time in Route Queue Expired', |
---|
609 | 15041 : 'Request to MOM failed', |
---|
610 | 15042 : '(qsub) cannot access script file', |
---|
611 | 15043 : 'Stage In of files failed', |
---|
612 | 15044 : 'Resources temporarily unavailable', |
---|
613 | 15045 : 'Bad Group specified', |
---|
614 | 15046 : 'Max number of jobs in queue', |
---|
615 | 15047 : 'Checkpoint Busy, may be retries', |
---|
616 | 15048 : 'Limit exceeds allowable', |
---|
617 | 15049 : 'Bad Account attribute value', |
---|
618 | 15050 : 'Job already in exit state', |
---|
619 | 15051 : 'Job files not copied', |
---|
620 | 15052 : 'unknown job id after clean init', |
---|
621 | 15053 : 'No Master in Sync Set', |
---|
622 | 15054 : 'Invalid dependency', |
---|
623 | 15055 : 'Duplicate entry in List', |
---|
624 | 15056 : 'Bad DIS based Request Protocol', |
---|
625 | 15057 : 'cannot execute there', |
---|
626 | 15058 : 'sister rejected', |
---|
627 | 15059 : 'sister could not communicate', |
---|
628 | 15060 : 'req rejected -server shutting down', |
---|
629 | 15061 : 'not all tasks could checkpoint', |
---|
630 | 15062 : 'Named node is not in the list', |
---|
631 | 15063 : 'node-attribute not recognized', |
---|
632 | 15064 : 'Server has no node list', |
---|
633 | 15065 : 'Node name is too big', |
---|
634 | 15066 : 'Node name already exists', |
---|
635 | 15067 : 'Bad node-attribute value', |
---|
636 | 15068 : 'State values are mutually exclusive', |
---|
637 | 15069 : 'Error(s) during global modification of nodes', |
---|
638 | 15070 : 'could not contact Mom', |
---|
639 | 15071 : 'no time-shared nodes', |
---|
640 | 15201 : 'resource unknown', |
---|
641 | 15202 : 'parameter could not be used', |
---|
642 | 15203 : 'a parameter needed did not exist', |
---|
643 | 15204 : "something specified didn't exist", |
---|
644 | 15205 : 'a system error occured', |
---|
645 | 15206 : 'only part of reservation made' |
---|
646 | } |
---|
647 | |
---|
648 | def error(): |
---|
649 | """ |
---|
650 | Check if there is an error, if so fetch the error message string. |
---|
651 | It says more then a number! |
---|
652 | """ |
---|
653 | e = get_error() |
---|
654 | if errors_txt.has_key(e): |
---|
655 | return (e, errors_txt[e]) |
---|
656 | else: |
---|
657 | return (e, "Could not find a text for this error, uhhh") |
---|
658 | |
---|
659 | cvar = _pbs.cvar |
---|
660 | |
---|