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