source: tags/3.2.0/CHANGES

Last change on this file was 191, checked in by bas, 15 years ago

src/PBSQuery.py:

  • fixed an error in the getnode, getqueue and getjob functions

update changes

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