source: trunk/CHANGES

Last change on this file was 347, checked in by dennis, 2 years ago

Bumped up version number

  • Property svn:keywords set to Id
File size: 24.0 KB
RevLine 
[347]1=========== 4.6.1
2 * Patched sara_nodes to work with the pbs and PBSQuery modules
3   Author: Dennis Stam
4
[336]5=========== 4.6.0
6 * Added support for torque version 5.x. Note: the rm interface does not work for me on debian wheezy.
7   Author: Bas van der Vlies
8
[339]9 * PBSQuery had been update to new cpuid range for torque 5
[340]10   Author: stijnd : deweirdt add ugent dot be
[339]11   Applied by : Bas van der Vlies
12
[323]13=========== 4.5.0
[340]14 * new_rack_pbsmon.py: Added option -j/--job. It will show the nodes that are used by the specified job
[323]15 Author: Dennis Stam
16
17 * JobscriptParser.py: Added a new usefull script which parses the jobscript and returns the attropl as datastructure
18 Author: Dennis Stam
19 
20
[316]21=========== 4.4.1
[317]22 * new_rack_pbsmon.py: Added option -p/--property to filter on torque node properties. It will show
23   the nodes that meet the property request with a capital M on a non-color terminal and in green on
24   color terminals.
[316]25 Requested by: Willem Vermin and Wim Rijks
26 Author: Dennis Stam
27
28 * Fixed docdir bug in configure.in and Makefile.in, closes #39
29 Author: Dennis Stam
30
[303]31=========== 4.4.0
32 * Drop support for versions older then 2.4
33 Author: Bas van der Vlies
34
35 * Added support for torque version >= 4.2
36 Author: Bas van der Vlies
37
38 * rewrote setup.py.in
39 Inspired by: stijn dot deweirdt at ugent dot be
40 Author: Bas van der Vlies
41
[306]42 * docdir is now configurable, closes #37
43 Author: jens dot timmerman add ugent dot be
44 Applied by: Bas van der Vlies
45
[311]46 * The swig development environment to generate the pbs_python package
47   is now available at:
48    - svn co https://oss.trac.surfsara.nl/pbs_python/svn/devel
49
[297]50=========== 4.3.7
51 * pbs_jobmonitor/pbs_joblogin ported to torque 2.5 to fix jobarrays
52  Author: Willem Vermin (SURFsara)
53  Applied by: Bas van der Vlies
54 
[295]55=========== 4.3.6
56 * Modified sara_nodes.py and new_rack_pbsmon.py so:
57   - We using argparse instead of OptionParser
58   - Changed the print statement to an print function which will work with Python 2.5+
59   - Removed module PBSAdvancedParser.py
60   Author: Dennis Stam
61
[290]62=========== 4.3.5
[286]63 * PBSQuery bugfix, parsing of node status line with multiple EVENT: settings
64   was wrong
65   Author: Bas van der Vlies
66
[291]67 * Added an example how to make use of the EVENT status message:
68    - examples/pbs_script.sh
69   Author: Bas van der Vlies
70
71 * implemented __nonzero__ for PBS dictionary, closes #33, eg:
72    status = getjob(id)
73    if status:
74        do something
75    else:
76        no job
77  Author: Bas van der Vlies
78
[279]79 * PBSQuery bugfix. getjob() can now handle short jobname, eg:
80    * p.getjob('6073545')
81
82   Author: Willem Vermin (SARA) & Bas van der Vlies
[282]83
84 * added an example: pbs_jobmonitor shows the output of top
85   -u user on the node
86    - one cycle of top
87    - user: the user the job belongs to
88
89   renamed as pbs_joblogin logs in to the node as the user
90   who invokes this script (os.getenv('USER'))
91
92   Author: Willem Vermin (SARA)
[279]93 
[271]94=========== 4.3.3
[268]95 * New generated files for pbs_wrap.c and pbs.py to support python 3.X versions
[274]96   Reported by: Steve Traylen <steve dot traylen add cern dot ch>
[270]97   Author: Bas van der Vlies
98
[269]99 * Fixed AdvancedParser when using 01-12 range the zero was not appended.
100   Reported by: Ramon Bastiaans
101   Author: Dennis Stam
[268]102
[270]103 * examples/sara_nodes.py: Catch the PBSQuery error if we can not make a
104   connection with the batch server and exit the program.
105   Author: Bas van der Vlies
106
[271]107 * Remove the debian dependency on AdvancedParser. We now have
108   our own PBSAdvanceParser so it does not conflict with other SARA
109   packages.
110   Reported by: Ramon Bastiaans (SARA)
111   Fixed by: Bas van der Vlies
112
113 * Make pbs_torque only dependend on libtorque instead of torque and adjusted
114   the maintainer of the package, closes #30
115   Reported by: Guillermo Marcus  <guillermo dot marcus add@gmail dot com>
116   Fixed by: Bas van der Vlies
117   
[264]118=========== 4.3.0
[262]119 * new_rack_pbsmon.py: For backward compatibility added -a/--all option.
120   Has the same functionality as -s/--summary
121   Author: Bas van der Vlies
122
[264]123 * Added some license info to debian package and include GPL and LGPL 3.0
124   files.
125   Suggested by: W. Trevor King <wking at drexel dot edu>
126
127 * PBSQuery.py: Added support for new feature in node status field:
128    * message=EVENT:<key=value:>+
129    * message=ERROR <text>
130
131  Added the following syntax for node:
132        * node['error']
[270]133    * node['event']
[264]134
135  eg: node: n1
[266]136    state = free
137    np = 8
138    properties = ib,switch1,highmem
139    ntype = cluster
140    jobs = 0/567403.sara.nl, 1/567403.sara.nl
141    status = ..,loadave=0.00,message=EVENT:sample.time=1288864220.003:cputotals.user=0:iconnect.pktout=0,netload=3487600394,state=free,...
[264]142
143  example code:
144        p = PBSQuery()
[270]145    node = p.getnode(n1)
146    print node.event['sample.time']
147    print node['event']['sample.time']
[264]148
149   Requested by: Roy Dragseth <roy dot dragseth add uit dotno>
150   Author: Bas van der Vlies
151
[253]152=========== 4.2.0
[241]153 * Updated LICENSE file to LGPLV3. Thanks to Justin Bronder
[259]154   (jsbronder add gentoo dot org) for the information and
155   explanation.
[241]156
[242]157 * examples/pbsmon.py. Patched so it also works for torque 2.5
158   Author: Stijn De Weirdt stijn dot deweirdt at ugent dot be
159   Applied by: Bas van der Vlies
160
[244]161 * setup.py.in changed determine which torque version is installed
162   so we also support snapshots.
163   Author: Mark Roberts ( mark at gingergeeks dot co dot uk)
164   Applied by: Bas van der Vlies
165
[247]166 * PBSQuery:
167   - get_nodes function for jobs now works for old and new datastructure and
168     gives correct results if unique=True
[258]169     Reported by + idea for patch: Shunjie Lau (eijnuhs add gmail dot com)
[247]170     Author: Bas van der Vlies
[246]171
[253]172 * Added AdvanceParser module. new_rack_pbsmon.py and sara_nodes.py make use of
173   this module
174   Author: Dennis Stam (Dennis dot Stam at sara dot nl)
175
[249]176 * examples/new_rack_pbsmon.py:
177     - Better specification for node expression
178     - added a new option -l/--list to list the state of a nodes and which job
179       is running on it, eg:
180             new_rack_pbsmon.py - l gb-r[1-3]n[3-6] gb-r4[n1-20]
181
[257]182   Authors: Dennis Stam & Bas van der Vlies
[249]183   Applied by: Bas van der Vlies
184
[253]185 * examples/sara_nodes.py:
186   An utility to set/clear notes for multiple nodes, see ..
187   Author: Dennis Stam (Dennis dot Stam at sara dot nl)
188
[254]189 * setup.py.in:
190   Added support for runtime-libraries when torque is installed in a non-default
191   location, closes #22
192   Author: Mattias (slabanja at chalmers dot se)
193   Applied by: Bas van der Vlies
194
[257]195 * Changed build system for debian
196   Authors: Dennis Stam & Bas van der Vlies
197
[240]198=========== 4.1.2
199 * examples/new_rack_pbsmon.py now uses the new PBSQuery data
200   structure.
201   Author: Bas van der Vlies
202
203 * PBSQuery:
204     - fixed and error in get_jobs function for nodes. Did not
205       support new data structure and uniq did not work.
[245]206       Authors: Shunjie Lau <eijnuhs at gmail dot com> and Bas van der Vlies
[240]207
[237]208=========== 4.1.0
209 * Delete function pbs.version() replaced by
210    * pbs.version
211        This is a string variable
212    * pbs.version_info
213        Is a tuple variable. So we can use it in scripts
214
215   This analogue with sys module, closes #20
216
217   Requested by: Dennis Stam ( Dennis dot Stam add sara dot nl )
218   Author: Bas van der Vlies
219
220 * More robust make/configure/setup.py
221   Reported by:
222        - Saidi, Yacine <saidi add linmpi dot mpg dot de>
223        - Shunjie Lau <eijnuhs add gmail dot com>
224   Author: Bas van der Vlies
225
226
227 * Only use the pbs_wrap.c and pbs.py 2.4 version for torque version 2.4.7 and higher.
228   Reported by: Saidi, Yacine <saidi add linmpi dot mpg dot de>
229   Author: Bas van der Vlies
230   
[233]231=========== 4.0.2
232  * Quick fix so we do not get any undefined symbols. Forgot to
233    add the torque library when we compile the package.
234    Reported by: Shunjie Lau ( eijnuhs add gmail dot com)
235    Author: Bas van der Vlies
236
[231]237=========== 4.0.1
238  * Fixed a bug in setting the right library path  for compiling.
239    Reported by: Chad Vizino ( vizino add psc dot edu )
240    Author: Bas van der Vlies
241   
[217]242=========== 4.0.0
[223]243  * pbs.py added some new functions for 2.4 version:
[214]244    - pbs_fbserver(void);
245    - pbs_get_server_list(void);
246    - pbs_sigjobasync(int connect, char *job_id, char *signal, char *extend);
247    - pbs_alterjob_async(int connect, char *job_id, struct attrl *ATTRL, char *extend);
248    - pbs_checkpointjob(int connect, char *job_id, char *extend);
249    - log_ext(int,char *,char *,int);
250    - log_init(char *, char *);
251    - log_remove_old(char *,unsigned long);
252
253    Note: version 2.1.X is still supported
254
[217]255  * autotools environment
256    - Added support for finding pbs-config (borrowed for mpiexec source)
257    - Detecting which version of torque is installed
258    - only support installations that have pbs-config installed.
259    - Removed old code for installations that do not a have pbs-config
260      installed.
[214]261
[223]262  * PBSQuery.py
263    - There was a bug in the new data interface (Resource_List for jobs)
264      Reported & Patch by: Mark Roberts ( mark at gingergeeks dot co dot uk)
265      Applied by with some minor changes: Bas van der Vlies
266
267    - The new data structure is the default. You can switch back to the old
268      one with:
269            p = PBSQuery()
270            p.old_data_structure()
271
272      Author: Bas van der Vlies
273
[226]274   * examples/ha_server.py
275     An example how to use the High Availabilty torque functions
276     Author: Bas van der Vlies & Mark Roberts ( mark at gingergeeks dot co dot uk )
277
[208]278=========== 3.6.0
279  * pbs, new generated pbs_wrap.c, pbs.py fixes a bug in pbs_runjob()
280    Reported by: Dennis Stam
281    Fixed by: Bas van der Vlies
282
[205]283=========== 3.5.0
284  * PBSQuery
285        The class functions of node, job and queue support old and new data
286        structure.
[196]287
[205]288        Changed the behaviour of the new data stucture, We can use it as
289        dictionary and as class attribute, this is equivalent, eg:
290          - print node['np'] and print node.np
291
292        for a node we parse the 'status' line and split on '=' char, You now can
293        use these statements, eg
294          - print node.status.arch     (node['status'].arch or node['status']['arch'])
295          - print node.status.nsession
296
297        for a job we parse the 'Variable_List' line and split on '=' char, You now can
298        use the statements, eg:
299          - print job.Variable_List.PBS_O_WORKDIR
300          - print job.Variable_List.PBS_O_HOME
301
302        For more info see examples/new_interface.py
303
304    Author: Bas van der Vlies
305
306 * new_rack_pbsmon.py
307        Rewrite to new data structure and automatically determine how many nodes
308        and racks cluster has and skip printing of empty racks (default), use -w/--wide
309        for old behaviour.
310
311   Author: Bas van der Vlies
312
313
[189]314=========== 3.2.0
315        - PBSQuery:
316          New data structure. In the old structure it is a dictionary
317          with a value and the value is a string. This is changed
318          that dictionary values are now of type list or dictionary depends
319          on the value of the keyword, eg for a node:
320            - np = 2:
321              * node['np'] = [ '2' ] 
322
323            - properties = cores2, mem4gb, parallel
324              * node['properties'] = [ 'cores2', 'mem4gb', 'parallel' ]
325
326            - status = arch=x86_64,sessions=22599,,size=70627864kb, ...
327              * node['status']['arch'] = [ 'x86_64' ]
328              * node['status']['sessions'] = [ '222599' ]
329              * ...
330
331         The data structure is activated by the function:
332          * new_data_structure()
333
334        In a future release it will be come the default.
335        example:
336                p = PBSQuery()
337                p.new_data_structure()
338
339                nodes = p.getnodes()
340                print nodes.np, nodes['np']
341
342        Author: Bas van der Vlies
343
344        - PBSQuery
345          For old and new data structure we now can use another syntax:
346           * node['np'] and node.np are equivalent
347
348          This new syntax works for all keywords.
349
350        Author: Bas van der Vlies
[191]351
352        - Added iter object for job, node, queue and server objects, eg:
353          node = p.getnode('gb-r1n1')
354          print node.name
355          for attrib in node:
356                print '%\t%s = %s' %(attrib, node[attrib])
357        Author: Bas van der Vlies
358
359        - fixed an error in getnode, getqueue and getjob, return empty
360          dictionary if not found
361        Author: Bas van der Vlies
[189]362       
[187]363        - New build system for rpm packages, make -f Makefile.rpm
364          Author: Michel Jouvin <jouvin add lal dot in2p3 dot fr>
365
[191]366        Applied: Bas van der Vlies
367
[184]368=========== 3.0.1
369        - PBSQuery
370                * Removed a testing code line
371                Reported By: sam @ vpac dot org
372                Fixed by: Bas van der Vlies
373
[175]374=========== 3.0.0
375        - PBSQuery
376                * Cleaned up some old lines of code which didn't do anything.
377                * Changed the returnvalue of getqueue, getnode and getjob. Now
378                  they return an instance of the object, instead of a dict.
[182]379                  This is API change so we bumped the version to 3.0.0
[175]380                * Now the getnode-function accepts the short name as well as
381                  the long name as an argument.
382
[181]383                Author: Sil Westerveld <Sil.Westerveld@sara.nl>
[175]384
[181]385        - pbs.py, _pbs.so, PBSQuery.py
[178]386                * Fixed a memory leak when used in daemon mode
[181]387                Author: Bas van der Vlies <basv@sara.nl>
[178]388
[159]389=========== 2.9.8
[164]390        - pbs_python.spec file patch added libdir and python defines so it
391          will build for RHEL5.1/CentOS 5.1
[148]392          by        : Michael Sternberg <sternberg add anl dot gov>
393          applied by: Bas van der Vlies
394
[159]395        - Updated the header files for pbs_python. So it can use some new
396          defines variables/defines, eg:
[152]397                * ATTR_NODE_status
398                * ATTR_NODE_note
[159]399                * ...
400          Added by: Dennis Stam <dennis.stam@sara.nl>, Bas van der Vlies
[152]401
[159]402        - Two new functions to log.h:
403                log_roll(int size);
404                log_size(void);
405          Added by: Bas van der Vlies
406
[164]407        - We now have proper destructors (free memory) in SWIG for attrl and
408          attropl attributes.
[161]409          Added by: Bas van der Vlies
410
[164]411        - PBSQuery
[168]412                * Added getnodes_with_property() function. This will get all nodes with
413                  a certain property, eg:
[169]414                   - get all nodes with property 'cores8' and return all attributes:
415                      getnodes_with_property('cores8')
416               
417                   - get all nodes with property 'cores2' and only return the
418                     attributes 'state' and 'properties':
[168]419                      attrl = [ 'state', 'properties' ]
420                      getnodes_with_property('cores2', attrl)
[169]421               
422                     Only for torque version > 2.1.0
[168]423             
424                Added by: Bas van der Vlies
[165]425
[168]426                * Added to class node the function
[169]427                 - get_jobs(self, unique=None)
[171]428                   Returns a list of the currently running job-id('s) on the node.
429                Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
[165]430
[169]431                * Added get_server_name() function.
432                  This will return the PBS-server's name.
[171]433                Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
[168]434
[171]435                * Added to class _PBSobject the function
436                  - uniq(self, list)
437                    Filters out unique items of a list.
438                Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
[169]439
[171]440                * Added to class job the function
441                  - get_nodes(self, unique=None)
442                    Returns a list of the nodes which run the job.
443                Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
444
[144]445=========== Version 2.9.4
[135]446        -  Function pbs.pbs_geterrmsg does not exits any more is
447           replaced by pbs.error():
448                errno, text = pbs.error()
449                print errno, text
450           Reported by: pk at q-leap dot com
451           Fixed by   : Bas van der Vlies
452
[143]453        - PBSQuery.py
454           * Added get_version() for server class, returns the version of
455             the batch server
[144]456             Added by    : Bas van der Vlies
457
[143]458           * Added get_nodes() for job class, returns a list of nodes on
459             which the job is run
[144]460             Added by    : Bas van der Vlies
[143]461
[144]462           * PBSQuery.py rewrite make use of UserDict module.
463             Suggested by: Ramon Bastiaans
464             Fixed by    : Bas van der Vlies
465
[123]466=========== Version 2.9.2
467        - The function pbs_rescquery() did not work. Fixed it
[125]468        - The function avail(), did not work fixed it
469        - The functions pbs_rescreserve and pbs_rescrelease did not work
470          fixed it
[123]471
[112]472        - Fixed a bug in new_rack_pbsmon.py. Counting of serial
[115]473          nodes was wrong and state down has topmost priority
[112]474
[110]475=========== Version 2.9.0
476        - Added support for new torque build system 2.1.0
[109]477        - Added new_rack_pbsmon.py
[110]478          Authors: Walter de Jong & Bas van der Vlies
[109]479
[102]480=========== Version 2.8.2
[98]481
482Configure has a new option:
483        --with-pbsdir=PATH
484
485If set it will use PATH specified as argument to
486find the pbs/torque libraries. If unset it will use
487some useful defaults to find the libaries.
488Suggested by: Troy Baer
489
[99]490PBSQuery.py:
[101]491        - If we can not make a connection with the server
492          then raise an exception and let the programmer
493          decides what to do.
[98]494
[99]495pbs_python.spec:
[101]496        - It can now handle mode bits
497          Author: Martin Pels from SARA
[99]498       
[88]499=========== Version 2.8.0
500
501setup.py:
502        - Added /usr/lib to PBS_LIB_DIR
503
504pbs.py:
505        - Added new function "pbs.error()". This function checks if
[90]506          an error has occured with a pbs function, eg:
[88]507            task_id = pbs.pbs_submit(c, attrl, "A.tsk", 'NULL', 'NULL')
508            error_number, err_txt = pbs.error()
509            if error_number:
510                print error_number, err_txt
511
512          prints the following message if script A.tsk does not exists:
513            15042 (qsub) cannot access script file
514
515pbs_python.spec:
516        - to make rpm packages from the source package, initial version
[90]517        Author: Martin Pels from SARA
[88]518
[90]519README:
520        - Now requires python 2.1 and higher
521        - Explain how to build DEBIAN package
522
[85]523=========== Version 2.7.10
524
525PBSQuery.py:
526        Fixed an error. You always got all resources from eg nodes
527        even when you supplied an attribute list where you only
528        requested the 'state' of the node.
529
530        Updated the inline python documentation
531
[82]532=========== Version 2.7.9
533
534Fixed an error the previous version was in DEBUG mode. So
535you get an lot undesired output on the screen.
536
537debian package now also generated a package with the write
538version info.
539
[81]540=========== Version 2.7.8
541
542Setup.py:
543        Can also handle ROCKS installations + the version
544        info is now the same as pbs.py
545        Thanks to: Roy Dragseth
546
[80]547=========== Version 2.7.7
[78]548
[79]549PBSQuery module:
550  It can now be used in daemon programs. The pbs_server closes
[80]551  the connection after an certain amount of time. This is fixed,
552  before every query there is an new connection and if the query
553  is finished the connection is closed.
554 
[79]555=========== Version 2.7.6
556
[78]557Now setup.py can also handle old Oscar Installations.
558Thanks To: Robin Humble
559
560Fixed an print statement fix in new_interface.py:
561Thanks To: Robin Humble
562
563Made some improvements for PBSQuery module:
564        - Updated the documentation
565        - Added the has_key() function to all
566          PBSObjects. So that the behaviour is similar to
567          an dictionary
568          Suggested By: Ramon Bastiaans
569       
[72]570=========== Version 2.7.5
571 Added PBSQuery module.  This module requires pbs.py and it a simple module
[73]572 for querying the pbs server. The documentation is in the module. Use for
573 example ipython to read it.
[72]574
575 Written By: Roy Dragseth
576             Bas van der Vlies
577
578 eg: ( see also examples/new_interface.py)
579
580 from PBSQuery import PBSQuery
581 p = PBSQuery()
582
583 jobs = p.getjobs()
584 for name, job in jobs.items()
585        print job
586
[68]587=========== Version 2.7.4
588 New versions fixes an bug in function pbs.pbs_statnode().
589 Reported by: Keith Poirier
590
591 Configure support:
592 Contributed By: Yaroslav Halchenko
593
594 Debian package support:
595 Contributed By: Yaroslav Halchenko
596
597 Added Support for Debuging the interface, You must edit pbs_wrap.c
598 and search for SARA_DEBUG:
599        #define SARA_DEBUG 1
600 Implemented by: Ramon Bastiaans
601
602 examples/pbsmon.py:
603        - Fixed an error when regex fails to determine node number,
604          no status was displayed
605        - It will now display and 'j' if the node is free for the batch
606          system and a job runs on the node (SMP-systems).
607 Changed by: Bas van der Vlies
608
609 examples/rack_pbsmon.py:
610        - An pbsmon that display node info per rack
611        - Edit the rack_pbsmon.py to adjust the values. It requires
612          that hostname contains rack and node id's,
613          eg: gb-r<number>n<number>
614 Contributed by: Walter de Jong
615
[58]616=========== Version 2.7.3
617 The name SPBS is changed to the new name TORQUE (Tera-scale Open-source
618 Resource and QUEing manager).
619
620 The interface support OPENPBS and TORQUE.
621
[52]622=========== Version 2.7.2
623 Some minor changes to include files. Now the Scalable PBS keywords
624 are also supported ( server attribute names: node_ping_rate and
625 node_check_rate). This does not interfere with the openpbs software.
626
[55]627 pbsmon.py could not handle an one node cluster. Fixed it.
[52]628
[51]629=========== Version 2.7
630 Forgot to wrap the pbs_statfree() function. So we could not free
631 allocated memory from functions that return 'struct batch_status *'
632 like pbs_statjob().
633
[48]634 pbsmon.py can now handle 2 and 3 digit hostnames. Patch supplied by
[47]635 Daniel Olson
636
[43]637=========== Version 2.6.1
638 Setup.py now checks if all openpbs libraries are installed to compile the
639 package.
640
[34]641=========== Version 2.6
642
643 Fixed a bug in the pbs python module. Forgot to map the pbs_statjob()
644 function. This bug prevented to pass 'struct attrl' variables to this
[35]645 function. Thanks to Evelyn Shiu for reporting this bug.
[34]646
647
[26]648=========== Version 2.5
649 Added the OpenPbs logging functions (log.h and liblog.a). There
650 is an example in the examples directory: logpbs.py
651
[33]652 Fixed a bug in examples/resmom_info.py used the default port for
653 pbs_resmon if getservbyname fails.
[28]654
655 Fixed a bug in resmom code. If the user has no permissions to query
656 the pbs_mom daemon a empty string is returned. Now we check for
657 the empty string. So we do not get a python exception.
658
[30]659 Fixed a bug in setup.py forgot the exit statement when we did not
660 find the pbs libraries.
661
[22]662=========== Version 2.3
[20]663 Bugfix in the pbsnodes-a.py. Forgot to import the sys module.
664
[21]665 Removed some obsolete code.
[20]666
667 As for now we make use of the distutils module. So the package
668 is automatically compiled and installed in proper directories, usage:
669    python setup.py install
[21]670 This requires that the package 'distutils' must be installed. As for
[22]671 version 1.6 and higher it is in the distribution.
[20]672
[24]673 Added a function that prints the pbs python interface version. So we
674 can check if we have the right interface version:
675 import pbs
676 print pbs.version()
677 
678
[11]679=========== Version 2.2
680
681In this release we can query the pbs_mom daemon with the aid of
682resource management functions:
683   pbs.openrm()
684   pbs.closerm()
685   pbs.downrm()
686   pbs.configrm()
687   pbs.addreq()
688   pbs.allreq()
689   pbs.flushreq()
690   pbs.activereq()
691   pbs.fullresp()
692   pbs.getreq()
693
694There is also a python function:
695   pbs.get_mom_values(id, [list]):
696     id   - connection id of pbs.openrm(node-name, port-number)
697     list - Is a optional paramter. A list of resource keywords
698
699   If 'list' is not supplied then this function will get the values
[19]700   for the standard resource keywords, eg uname, loadave, .. + 'arch'
701   depended keywords. The arch feature is only implemented for linux,
702   but it can easily be ported to other oses.
[11]703
704   if 'list' is supplied then we only fetch values for the keywords
705   that are in the list.
706
707   The function returns a dictonary. The keys are the resource keywords.
708
[19]709   See 'resmom_info.py' for a example of this new feature.
[11]710
711=========== Version 2.0
712
[8]713The previous version was a simple interface above the PBS C API LIB.  This
714interface has gone a major changes. The most noticeable change is  that
715the functions accept/return Python lists instead of C-lists.  So you can now
716use standard Python syntax for manipulating Python lists. If you are familar
717with the Python syntax then you will appreciate this new interface.
718
719NOTE:
720  This interface is NOT compatible with the old one
721
722Here are some guidelines to convert your code to the new one:
723
724The constructors for the struct has gone a major change:
725  old code:
726    temp = pbs.new_attrl();
727    attrl_p = pbs.attrlPtr(temp)
728    attrl_p.name = 'state'
729
730  new_code:
731     attr_l = pbs.new_attrl(1)   // Creates a list of attrl structs length 1
732     attr_l[0].name = 'state'
733
734
735The pbs_stat functions returns Python lists instead of C-lists. There is
736NO next field anymore:
737  old_code:
738    temp = pbs.new_attrl();
739    attrl_p = pbs.attrlPtr(temp)
740    attrl_p.this = 'NULL'
741
742    nodes = pbs.pbs_statnode(con, "", attrl_p, "NULL")
743
744    while nodes.this != 'NULL':
745      print nodes.name
746
747      node_attrl = nodes.attribs
748      while node_attrl.this != 'NULL':
749        print '\t', node_attrl.name, '=', node_attrl.value
750        node_attrl = node_attrl.next
751
752    nodes = nodes.next
753
754
755  new_code:
756    nodes = pbs.pbs_statnode(con, "", "NULL", "NULL")
757    for node in nodes:
758      print node.name
759      for attrib in node.attribs:
760        print '\t', attrib.name, '=', attrib.value
761
762Another advantage is you can use the print statement to show the
763connect of attrl and attropl classes:
764   attr_l = pbs.new_attrl(2)
765   attr_l[0].name = 'bas'
766   attr_l[0].value = 'van der Vlies'
767
768   print  attr_l[0]
769   >> (bas,,van der Vlies)
770   
771I hope these examples illustrate the changes. If you specify a wrong type
772for a function then function wil raise a Python exception.
Note: See TracBrowser for help on using the repository browser.