source: trunk/pbs_swig/distro/CHANGES @ 51

Last change on this file since 51 was 51, checked in by bas, 21 years ago

added some comments to CHANGES.

  • Property svn:keywords set to Id
File size: 4.4 KB
Line 
1=========== Version 2.7
2 Forgot to wrap the pbs_statfree() function. So we could not free
3 allocated memory from functions that return 'struct batch_status *'
4 like pbs_statjob().
5
6 pbsmon.py can now handle 2 and 3 digit hostnames. Patch supplied by
7 Daniel Olson
8
9=========== Version 2.6.1
10 Setup.py now checks if all openpbs libraries are installed to compile the
11 package.
12
13=========== Version 2.6
14
15 Fixed a bug in the pbs python module. Forgot to map the pbs_statjob()
16 function. This bug prevented to pass 'struct attrl' variables to this
17 function. Thanks to Evelyn Shiu for reporting this bug.
18
19
20=========== Version 2.5
21 Added the OpenPbs logging functions (log.h and liblog.a). There
22 is an example in the examples directory: logpbs.py
23
24 Fixed a bug in examples/resmom_info.py used the default port for
25 pbs_resmon if getservbyname fails.
26
27 Fixed a bug in resmom code. If the user has no permissions to query
28 the pbs_mom daemon a empty string is returned. Now we check for
29 the empty string. So we do not get a python exception.
30
31 Fixed a bug in setup.py forgot the exit statement when we did not
32 find the pbs libraries.
33
34=========== Version 2.3
35 Bugfix in the pbsnodes-a.py. Forgot to import the sys module.
36
37 Removed some obsolete code.
38
39 As for now we make use of the distutils module. So the package
40 is automatically compiled and installed in proper directories, usage:
41    python setup.py install
42 This requires that the package 'distutils' must be installed. As for
43 version 1.6 and higher it is in the distribution.
44
45 Added a function that prints the pbs python interface version. So we
46 can check if we have the right interface version:
47 import pbs
48 print pbs.version()
49 
50
51=========== Version 2.2
52
53In this release we can query the pbs_mom daemon with the aid of
54resource management functions:
55   pbs.openrm()
56   pbs.closerm()
57   pbs.downrm()
58   pbs.configrm()
59   pbs.addreq()
60   pbs.allreq()
61   pbs.flushreq()
62   pbs.activereq()
63   pbs.fullresp()
64   pbs.getreq()
65
66There is also a python function:
67   pbs.get_mom_values(id, [list]):
68     id   - connection id of pbs.openrm(node-name, port-number)
69     list - Is a optional paramter. A list of resource keywords
70
71   If 'list' is not supplied then this function will get the values
72   for the standard resource keywords, eg uname, loadave, .. + 'arch'
73   depended keywords. The arch feature is only implemented for linux,
74   but it can easily be ported to other oses.
75
76   if 'list' is supplied then we only fetch values for the keywords
77   that are in the list.
78
79   The function returns a dictonary. The keys are the resource keywords.
80
81   See 'resmom_info.py' for a example of this new feature.
82
83=========== Version 2.0
84
85The previous version was a simple interface above the PBS C API LIB.  This
86interface has gone a major changes. The most noticeable change is  that
87the functions accept/return Python lists instead of C-lists.  So you can now
88use standard Python syntax for manipulating Python lists. If you are familar
89with the Python syntax then you will appreciate this new interface.
90
91NOTE:
92  This interface is NOT compatible with the old one
93
94Here are some guidelines to convert your code to the new one:
95
96The constructors for the struct has gone a major change:
97  old code:
98    temp = pbs.new_attrl();
99    attrl_p = pbs.attrlPtr(temp)
100    attrl_p.name = 'state'
101
102  new_code:
103     attr_l = pbs.new_attrl(1)   // Creates a list of attrl structs length 1
104     attr_l[0].name = 'state'
105
106
107The pbs_stat functions returns Python lists instead of C-lists. There is
108NO next field anymore:
109  old_code:
110    temp = pbs.new_attrl();
111    attrl_p = pbs.attrlPtr(temp)
112    attrl_p.this = 'NULL'
113
114    nodes = pbs.pbs_statnode(con, "", attrl_p, "NULL")
115
116    while nodes.this != 'NULL':
117      print nodes.name
118
119      node_attrl = nodes.attribs
120      while node_attrl.this != 'NULL':
121        print '\t', node_attrl.name, '=', node_attrl.value
122        node_attrl = node_attrl.next
123
124    nodes = nodes.next
125
126
127  new_code:
128    nodes = pbs.pbs_statnode(con, "", "NULL", "NULL")
129    for node in nodes:
130      print node.name
131      for attrib in node.attribs:
132        print '\t', attrib.name, '=', attrib.value
133
134Another advantage is you can use the print statement to show the
135connect of attrl and attropl classes:
136   attr_l = pbs.new_attrl(2)
137   attr_l[0].name = 'bas'
138   attr_l[0].value = 'van der Vlies'
139
140   print  attr_l[0]
141   >> (bas,,van der Vlies)
142   
143I hope these examples illustrate the changes. If you specify a wrong type
144for a function then function wil raise a Python exception.
Note: See TracBrowser for help on using the repository browser.