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