source: trunk/CHANGES @ 171

Last change on this file since 171 was 171, checked in by sil, 16 years ago

trunk/src/PBSQuery.py:

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