source: trunk/CHANGES @ 196

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

list changes

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