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