source: trunk/CHANGES @ 245

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

Some improvements on get_jobs for node class

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