1 | =========== 3.6.0 |
---|
2 | * pbs, new generated pbs_wrap.c, pbs.py fixes a bug in pbs_runjob() |
---|
3 | Reported by: Dennis Stam |
---|
4 | Fixed by: Bas van der Vlies |
---|
5 | |
---|
6 | =========== 3.5.0 |
---|
7 | * PBSQuery |
---|
8 | The class functions of node, job and queue support old and new data |
---|
9 | structure. |
---|
10 | |
---|
11 | Changed the behaviour of the new data stucture, We can use it as |
---|
12 | dictionary and as class attribute, this is equivalent, eg: |
---|
13 | - print node['np'] and print node.np |
---|
14 | |
---|
15 | for a node we parse the 'status' line and split on '=' char, You now can |
---|
16 | use these statements, eg |
---|
17 | - print node.status.arch (node['status'].arch or node['status']['arch']) |
---|
18 | - print node.status.nsession |
---|
19 | |
---|
20 | for a job we parse the 'Variable_List' line and split on '=' char, You now can |
---|
21 | use the statements, eg: |
---|
22 | - print job.Variable_List.PBS_O_WORKDIR |
---|
23 | - print job.Variable_List.PBS_O_HOME |
---|
24 | |
---|
25 | For more info see examples/new_interface.py |
---|
26 | |
---|
27 | Author: Bas van der Vlies |
---|
28 | |
---|
29 | * new_rack_pbsmon.py |
---|
30 | Rewrite to new data structure and automatically determine how many nodes |
---|
31 | and racks cluster has and skip printing of empty racks (default), use -w/--wide |
---|
32 | for old behaviour. |
---|
33 | |
---|
34 | Author: Bas van der Vlies |
---|
35 | |
---|
36 | |
---|
37 | =========== 3.2.0 |
---|
38 | - PBSQuery: |
---|
39 | New data structure. In the old structure it is a dictionary |
---|
40 | with a value and the value is a string. This is changed |
---|
41 | that dictionary values are now of type list or dictionary depends |
---|
42 | on the value of the keyword, eg for a node: |
---|
43 | - np = 2: |
---|
44 | * node['np'] = [ '2' ] |
---|
45 | |
---|
46 | - properties = cores2, mem4gb, parallel |
---|
47 | * node['properties'] = [ 'cores2', 'mem4gb', 'parallel' ] |
---|
48 | |
---|
49 | - status = arch=x86_64,sessions=22599,,size=70627864kb, ... |
---|
50 | * node['status']['arch'] = [ 'x86_64' ] |
---|
51 | * node['status']['sessions'] = [ '222599' ] |
---|
52 | * ... |
---|
53 | |
---|
54 | The data structure is activated by the function: |
---|
55 | * new_data_structure() |
---|
56 | |
---|
57 | In a future release it will be come the default. |
---|
58 | example: |
---|
59 | p = PBSQuery() |
---|
60 | p.new_data_structure() |
---|
61 | |
---|
62 | nodes = p.getnodes() |
---|
63 | print nodes.np, nodes['np'] |
---|
64 | |
---|
65 | Author: Bas van der Vlies |
---|
66 | |
---|
67 | - PBSQuery |
---|
68 | For old and new data structure we now can use another syntax: |
---|
69 | * node['np'] and node.np are equivalent |
---|
70 | |
---|
71 | This new syntax works for all keywords. |
---|
72 | |
---|
73 | Author: Bas van der Vlies |
---|
74 | |
---|
75 | - Added iter object for job, node, queue and server objects, eg: |
---|
76 | node = p.getnode('gb-r1n1') |
---|
77 | print node.name |
---|
78 | for attrib in node: |
---|
79 | print '%\t%s = %s' %(attrib, node[attrib]) |
---|
80 | Author: Bas van der Vlies |
---|
81 | |
---|
82 | - fixed an error in getnode, getqueue and getjob, return empty |
---|
83 | dictionary if not found |
---|
84 | Author: Bas van der Vlies |
---|
85 | |
---|
86 | - New build system for rpm packages, make -f Makefile.rpm |
---|
87 | Author: Michel Jouvin <jouvin add lal dot in2p3 dot fr> |
---|
88 | |
---|
89 | Applied: Bas van der Vlies |
---|
90 | |
---|
91 | =========== 3.0.1 |
---|
92 | - PBSQuery |
---|
93 | * Removed a testing code line |
---|
94 | Reported By: sam @ vpac dot org |
---|
95 | Fixed by: Bas van der Vlies |
---|
96 | |
---|
97 | =========== 3.0.0 |
---|
98 | - PBSQuery |
---|
99 | * Cleaned up some old lines of code which didn't do anything. |
---|
100 | * Changed the returnvalue of getqueue, getnode and getjob. Now |
---|
101 | they return an instance of the object, instead of a dict. |
---|
102 | This is API change so we bumped the version to 3.0.0 |
---|
103 | * Now the getnode-function accepts the short name as well as |
---|
104 | the long name as an argument. |
---|
105 | |
---|
106 | Author: Sil Westerveld <Sil.Westerveld@sara.nl> |
---|
107 | |
---|
108 | - pbs.py, _pbs.so, PBSQuery.py |
---|
109 | * Fixed a memory leak when used in daemon mode |
---|
110 | Author: Bas van der Vlies <basv@sara.nl> |
---|
111 | |
---|
112 | =========== 2.9.8 |
---|
113 | - pbs_python.spec file patch added libdir and python defines so it |
---|
114 | will build for RHEL5.1/CentOS 5.1 |
---|
115 | by : Michael Sternberg <sternberg add anl dot gov> |
---|
116 | applied by: Bas van der Vlies |
---|
117 | |
---|
118 | - Updated the header files for pbs_python. So it can use some new |
---|
119 | defines variables/defines, eg: |
---|
120 | * ATTR_NODE_status |
---|
121 | * ATTR_NODE_note |
---|
122 | * ... |
---|
123 | Added by: Dennis Stam <dennis.stam@sara.nl>, Bas van der Vlies |
---|
124 | |
---|
125 | - Two new functions to log.h: |
---|
126 | log_roll(int size); |
---|
127 | log_size(void); |
---|
128 | Added by: Bas van der Vlies |
---|
129 | |
---|
130 | - We now have proper destructors (free memory) in SWIG for attrl and |
---|
131 | attropl attributes. |
---|
132 | Added by: Bas van der Vlies |
---|
133 | |
---|
134 | - PBSQuery |
---|
135 | * Added getnodes_with_property() function. This will get all nodes with |
---|
136 | a certain property, eg: |
---|
137 | - get all nodes with property 'cores8' and return all attributes: |
---|
138 | getnodes_with_property('cores8') |
---|
139 | |
---|
140 | - get all nodes with property 'cores2' and only return the |
---|
141 | attributes 'state' and 'properties': |
---|
142 | attrl = [ 'state', 'properties' ] |
---|
143 | getnodes_with_property('cores2', attrl) |
---|
144 | |
---|
145 | Only for torque version > 2.1.0 |
---|
146 | |
---|
147 | Added by: Bas van der Vlies |
---|
148 | |
---|
149 | * Added to class node the function |
---|
150 | - get_jobs(self, unique=None) |
---|
151 | Returns a list of the currently running job-id('s) on the node. |
---|
152 | Added by: Sil Westerveld <Sil.Westerveld@sara.nl> |
---|
153 | |
---|
154 | * Added get_server_name() function. |
---|
155 | This will return the PBS-server's name. |
---|
156 | Added by: Sil Westerveld <Sil.Westerveld@sara.nl> |
---|
157 | |
---|
158 | * Added to class _PBSobject the function |
---|
159 | - uniq(self, list) |
---|
160 | Filters out unique items of a list. |
---|
161 | Added by: Sil Westerveld <Sil.Westerveld@sara.nl> |
---|
162 | |
---|
163 | * Added to class job the function |
---|
164 | - get_nodes(self, unique=None) |
---|
165 | Returns a list of the nodes which run the job. |
---|
166 | Added by: Sil Westerveld <Sil.Westerveld@sara.nl> |
---|
167 | |
---|
168 | =========== Version 2.9.4 |
---|
169 | - Function pbs.pbs_geterrmsg does not exits any more is |
---|
170 | replaced by pbs.error(): |
---|
171 | errno, text = pbs.error() |
---|
172 | print errno, text |
---|
173 | Reported by: pk at q-leap dot com |
---|
174 | Fixed by : Bas van der Vlies |
---|
175 | |
---|
176 | - PBSQuery.py |
---|
177 | * Added get_version() for server class, returns the version of |
---|
178 | the batch server |
---|
179 | Added by : Bas van der Vlies |
---|
180 | |
---|
181 | * Added get_nodes() for job class, returns a list of nodes on |
---|
182 | which the job is run |
---|
183 | Added by : Bas van der Vlies |
---|
184 | |
---|
185 | * PBSQuery.py rewrite make use of UserDict module. |
---|
186 | Suggested by: Ramon Bastiaans |
---|
187 | Fixed by : Bas van der Vlies |
---|
188 | |
---|
189 | =========== Version 2.9.2 |
---|
190 | - The function pbs_rescquery() did not work. Fixed it |
---|
191 | - The function avail(), did not work fixed it |
---|
192 | - The functions pbs_rescreserve and pbs_rescrelease did not work |
---|
193 | fixed it |
---|
194 | |
---|
195 | - Fixed a bug in new_rack_pbsmon.py. Counting of serial |
---|
196 | nodes was wrong and state down has topmost priority |
---|
197 | |
---|
198 | =========== Version 2.9.0 |
---|
199 | - Added support for new torque build system 2.1.0 |
---|
200 | - Added new_rack_pbsmon.py |
---|
201 | Authors: Walter de Jong & Bas van der Vlies |
---|
202 | |
---|
203 | =========== Version 2.8.2 |
---|
204 | |
---|
205 | Configure has a new option: |
---|
206 | --with-pbsdir=PATH |
---|
207 | |
---|
208 | If set it will use PATH specified as argument to |
---|
209 | find the pbs/torque libraries. If unset it will use |
---|
210 | some useful defaults to find the libaries. |
---|
211 | Suggested by: Troy Baer |
---|
212 | |
---|
213 | PBSQuery.py: |
---|
214 | - If we can not make a connection with the server |
---|
215 | then raise an exception and let the programmer |
---|
216 | decides what to do. |
---|
217 | |
---|
218 | pbs_python.spec: |
---|
219 | - It can now handle mode bits |
---|
220 | Author: Martin Pels from SARA |
---|
221 | |
---|
222 | =========== Version 2.8.0 |
---|
223 | |
---|
224 | setup.py: |
---|
225 | - Added /usr/lib to PBS_LIB_DIR |
---|
226 | |
---|
227 | pbs.py: |
---|
228 | - Added new function "pbs.error()". This function checks if |
---|
229 | an error has occured with a pbs function, eg: |
---|
230 | task_id = pbs.pbs_submit(c, attrl, "A.tsk", 'NULL', 'NULL') |
---|
231 | error_number, err_txt = pbs.error() |
---|
232 | if error_number: |
---|
233 | print error_number, err_txt |
---|
234 | |
---|
235 | prints the following message if script A.tsk does not exists: |
---|
236 | 15042 (qsub) cannot access script file |
---|
237 | |
---|
238 | pbs_python.spec: |
---|
239 | - to make rpm packages from the source package, initial version |
---|
240 | Author: Martin Pels from SARA |
---|
241 | |
---|
242 | README: |
---|
243 | - Now requires python 2.1 and higher |
---|
244 | - Explain how to build DEBIAN package |
---|
245 | |
---|
246 | =========== Version 2.7.10 |
---|
247 | |
---|
248 | PBSQuery.py: |
---|
249 | Fixed an error. You always got all resources from eg nodes |
---|
250 | even when you supplied an attribute list where you only |
---|
251 | requested the 'state' of the node. |
---|
252 | |
---|
253 | Updated the inline python documentation |
---|
254 | |
---|
255 | =========== Version 2.7.9 |
---|
256 | |
---|
257 | Fixed an error the previous version was in DEBUG mode. So |
---|
258 | you get an lot undesired output on the screen. |
---|
259 | |
---|
260 | debian package now also generated a package with the write |
---|
261 | version info. |
---|
262 | |
---|
263 | =========== Version 2.7.8 |
---|
264 | |
---|
265 | Setup.py: |
---|
266 | Can also handle ROCKS installations + the version |
---|
267 | info is now the same as pbs.py |
---|
268 | Thanks to: Roy Dragseth |
---|
269 | |
---|
270 | =========== Version 2.7.7 |
---|
271 | |
---|
272 | PBSQuery module: |
---|
273 | It can now be used in daemon programs. The pbs_server closes |
---|
274 | the connection after an certain amount of time. This is fixed, |
---|
275 | before every query there is an new connection and if the query |
---|
276 | is finished the connection is closed. |
---|
277 | |
---|
278 | =========== Version 2.7.6 |
---|
279 | |
---|
280 | Now setup.py can also handle old Oscar Installations. |
---|
281 | Thanks To: Robin Humble |
---|
282 | |
---|
283 | Fixed an print statement fix in new_interface.py: |
---|
284 | Thanks To: Robin Humble |
---|
285 | |
---|
286 | Made some improvements for PBSQuery module: |
---|
287 | - Updated the documentation |
---|
288 | - Added the has_key() function to all |
---|
289 | PBSObjects. So that the behaviour is similar to |
---|
290 | an dictionary |
---|
291 | Suggested By: Ramon Bastiaans |
---|
292 | |
---|
293 | =========== Version 2.7.5 |
---|
294 | Added PBSQuery module. This module requires pbs.py and it a simple module |
---|
295 | for querying the pbs server. The documentation is in the module. Use for |
---|
296 | example ipython to read it. |
---|
297 | |
---|
298 | Written By: Roy Dragseth |
---|
299 | Bas van der Vlies |
---|
300 | |
---|
301 | eg: ( see also examples/new_interface.py) |
---|
302 | |
---|
303 | from PBSQuery import PBSQuery |
---|
304 | p = PBSQuery() |
---|
305 | |
---|
306 | jobs = p.getjobs() |
---|
307 | for name, job in jobs.items() |
---|
308 | print job |
---|
309 | |
---|
310 | =========== Version 2.7.4 |
---|
311 | New versions fixes an bug in function pbs.pbs_statnode(). |
---|
312 | Reported by: Keith Poirier |
---|
313 | |
---|
314 | Configure support: |
---|
315 | Contributed By: Yaroslav Halchenko |
---|
316 | |
---|
317 | Debian package support: |
---|
318 | Contributed By: Yaroslav Halchenko |
---|
319 | |
---|
320 | Added Support for Debuging the interface, You must edit pbs_wrap.c |
---|
321 | and search for SARA_DEBUG: |
---|
322 | #define SARA_DEBUG 1 |
---|
323 | Implemented by: Ramon Bastiaans |
---|
324 | |
---|
325 | examples/pbsmon.py: |
---|
326 | - Fixed an error when regex fails to determine node number, |
---|
327 | no status was displayed |
---|
328 | - It will now display and 'j' if the node is free for the batch |
---|
329 | system and a job runs on the node (SMP-systems). |
---|
330 | Changed by: Bas van der Vlies |
---|
331 | |
---|
332 | examples/rack_pbsmon.py: |
---|
333 | - An pbsmon that display node info per rack |
---|
334 | - Edit the rack_pbsmon.py to adjust the values. It requires |
---|
335 | that hostname contains rack and node id's, |
---|
336 | eg: gb-r<number>n<number> |
---|
337 | Contributed by: Walter de Jong |
---|
338 | |
---|
339 | =========== Version 2.7.3 |
---|
340 | The name SPBS is changed to the new name TORQUE (Tera-scale Open-source |
---|
341 | Resource and QUEing manager). |
---|
342 | |
---|
343 | The interface support OPENPBS and TORQUE. |
---|
344 | |
---|
345 | =========== Version 2.7.2 |
---|
346 | Some minor changes to include files. Now the Scalable PBS keywords |
---|
347 | are also supported ( server attribute names: node_ping_rate and |
---|
348 | node_check_rate). This does not interfere with the openpbs software. |
---|
349 | |
---|
350 | pbsmon.py could not handle an one node cluster. Fixed it. |
---|
351 | |
---|
352 | =========== Version 2.7 |
---|
353 | Forgot to wrap the pbs_statfree() function. So we could not free |
---|
354 | allocated memory from functions that return 'struct batch_status *' |
---|
355 | like pbs_statjob(). |
---|
356 | |
---|
357 | pbsmon.py can now handle 2 and 3 digit hostnames. Patch supplied by |
---|
358 | Daniel Olson |
---|
359 | |
---|
360 | =========== Version 2.6.1 |
---|
361 | Setup.py now checks if all openpbs libraries are installed to compile the |
---|
362 | package. |
---|
363 | |
---|
364 | =========== Version 2.6 |
---|
365 | |
---|
366 | Fixed a bug in the pbs python module. Forgot to map the pbs_statjob() |
---|
367 | function. This bug prevented to pass 'struct attrl' variables to this |
---|
368 | function. Thanks to Evelyn Shiu for reporting this bug. |
---|
369 | |
---|
370 | |
---|
371 | =========== Version 2.5 |
---|
372 | Added the OpenPbs logging functions (log.h and liblog.a). There |
---|
373 | is an example in the examples directory: logpbs.py |
---|
374 | |
---|
375 | Fixed a bug in examples/resmom_info.py used the default port for |
---|
376 | pbs_resmon if getservbyname fails. |
---|
377 | |
---|
378 | Fixed a bug in resmom code. If the user has no permissions to query |
---|
379 | the pbs_mom daemon a empty string is returned. Now we check for |
---|
380 | the empty string. So we do not get a python exception. |
---|
381 | |
---|
382 | Fixed a bug in setup.py forgot the exit statement when we did not |
---|
383 | find the pbs libraries. |
---|
384 | |
---|
385 | =========== Version 2.3 |
---|
386 | Bugfix in the pbsnodes-a.py. Forgot to import the sys module. |
---|
387 | |
---|
388 | Removed some obsolete code. |
---|
389 | |
---|
390 | As for now we make use of the distutils module. So the package |
---|
391 | is automatically compiled and installed in proper directories, usage: |
---|
392 | python setup.py install |
---|
393 | This requires that the package 'distutils' must be installed. As for |
---|
394 | version 1.6 and higher it is in the distribution. |
---|
395 | |
---|
396 | Added a function that prints the pbs python interface version. So we |
---|
397 | can check if we have the right interface version: |
---|
398 | import pbs |
---|
399 | print pbs.version() |
---|
400 | |
---|
401 | |
---|
402 | =========== Version 2.2 |
---|
403 | |
---|
404 | In this release we can query the pbs_mom daemon with the aid of |
---|
405 | resource management functions: |
---|
406 | pbs.openrm() |
---|
407 | pbs.closerm() |
---|
408 | pbs.downrm() |
---|
409 | pbs.configrm() |
---|
410 | pbs.addreq() |
---|
411 | pbs.allreq() |
---|
412 | pbs.flushreq() |
---|
413 | pbs.activereq() |
---|
414 | pbs.fullresp() |
---|
415 | pbs.getreq() |
---|
416 | |
---|
417 | There is also a python function: |
---|
418 | pbs.get_mom_values(id, [list]): |
---|
419 | id - connection id of pbs.openrm(node-name, port-number) |
---|
420 | list - Is a optional paramter. A list of resource keywords |
---|
421 | |
---|
422 | If 'list' is not supplied then this function will get the values |
---|
423 | for the standard resource keywords, eg uname, loadave, .. + 'arch' |
---|
424 | depended keywords. The arch feature is only implemented for linux, |
---|
425 | but it can easily be ported to other oses. |
---|
426 | |
---|
427 | if 'list' is supplied then we only fetch values for the keywords |
---|
428 | that are in the list. |
---|
429 | |
---|
430 | The function returns a dictonary. The keys are the resource keywords. |
---|
431 | |
---|
432 | See 'resmom_info.py' for a example of this new feature. |
---|
433 | |
---|
434 | =========== Version 2.0 |
---|
435 | |
---|
436 | The previous version was a simple interface above the PBS C API LIB. This |
---|
437 | interface has gone a major changes. The most noticeable change is that |
---|
438 | the functions accept/return Python lists instead of C-lists. So you can now |
---|
439 | use standard Python syntax for manipulating Python lists. If you are familar |
---|
440 | with the Python syntax then you will appreciate this new interface. |
---|
441 | |
---|
442 | NOTE: |
---|
443 | This interface is NOT compatible with the old one |
---|
444 | |
---|
445 | Here are some guidelines to convert your code to the new one: |
---|
446 | |
---|
447 | The constructors for the struct has gone a major change: |
---|
448 | old code: |
---|
449 | temp = pbs.new_attrl(); |
---|
450 | attrl_p = pbs.attrlPtr(temp) |
---|
451 | attrl_p.name = 'state' |
---|
452 | |
---|
453 | new_code: |
---|
454 | attr_l = pbs.new_attrl(1) // Creates a list of attrl structs length 1 |
---|
455 | attr_l[0].name = 'state' |
---|
456 | |
---|
457 | |
---|
458 | The pbs_stat functions returns Python lists instead of C-lists. There is |
---|
459 | NO next field anymore: |
---|
460 | old_code: |
---|
461 | temp = pbs.new_attrl(); |
---|
462 | attrl_p = pbs.attrlPtr(temp) |
---|
463 | attrl_p.this = 'NULL' |
---|
464 | |
---|
465 | nodes = pbs.pbs_statnode(con, "", attrl_p, "NULL") |
---|
466 | |
---|
467 | while nodes.this != 'NULL': |
---|
468 | print nodes.name |
---|
469 | |
---|
470 | node_attrl = nodes.attribs |
---|
471 | while node_attrl.this != 'NULL': |
---|
472 | print '\t', node_attrl.name, '=', node_attrl.value |
---|
473 | node_attrl = node_attrl.next |
---|
474 | |
---|
475 | nodes = nodes.next |
---|
476 | |
---|
477 | |
---|
478 | new_code: |
---|
479 | nodes = pbs.pbs_statnode(con, "", "NULL", "NULL") |
---|
480 | for node in nodes: |
---|
481 | print node.name |
---|
482 | for attrib in node.attribs: |
---|
483 | print '\t', attrib.name, '=', attrib.value |
---|
484 | |
---|
485 | Another advantage is you can use the print statement to show the |
---|
486 | connect of attrl and attropl classes: |
---|
487 | attr_l = pbs.new_attrl(2) |
---|
488 | attr_l[0].name = 'bas' |
---|
489 | attr_l[0].value = 'van der Vlies' |
---|
490 | |
---|
491 | print attr_l[0] |
---|
492 | >> (bas,,van der Vlies) |
---|
493 | |
---|
494 | I hope these examples illustrate the changes. If you specify a wrong type |
---|
495 | for a function then function wil raise a Python exception. |
---|