source: trunk/CHANGES @ 242

Last change on this file since 242 was 242, checked in by bas, 14 years ago

applied a patch for pbsmon.py

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