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