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