Custom Query (43 matches)


Show under each result:

Results (25 - 27 of 43)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Ticket Resolution Summary Owner Reporter
#33 fixed PBSQuery.PBSError: Attribute key error: __nonzero__ bas anonymous

I've been playing around with PBSQuery for a few minutes; please let me know if I'm missing something obvious.

PBSQuery.getjob() returns and empty dictionary if the job is not found, and returns some other object that can be used like a dictionary if the job is found.

What I would like to do is something like this:

status = pbsq.getjob(id) if status:

#do something


#job not in queue

however, if the job is found this will fail:

PBSQuery.PBSError: Attribute key error: nonzero

if the job is not found, this code is fine because a dict implements nonzero(self)

#16 fixed PBSQuery module enhancement bas bas

getnode(s) function now returns a dictionary with values, eg pbsnodes: :

 state = job-exclusive
 np = 2
 properties  cores2,fabric1,gigabit,infiniband,mem4gb,parallel,switchF
 ntype = cluster
 jobs = 0/, 1/
 status = arch=x86_64,opsys=linux,uname=Linux #1 SMP Mon Apr 6 15:43:08 CEST 2009 x86_64,sessions=32128,nsessions=1,nusers=1,idletime=24505,totmem=8039848kb,availmem=7556400kb,physmem=4039856kb,ncpus=2,loadave=2.32,gres=max_jobs:1+ideal_jobs:1,netload=3403654969,size=71647620kb:71652296kb,state=free,,rectime=1241791421

This is not useful at all. I will change the structure as follow:

  1. key = value, value ---> key = list([ value, value ]), key value is a list
  2. key = name1=value1 name2=value2---> key = dict( [name1] = value1, [name2] = value2), key value is a dictionary

The programming will be easier:

  1. print !nodestate?arch?
  2. if 'cores2' in !nodeproperties?

#53 worksforme pbs python - uwsgi bas dbikas@…

Can someone explain me why this code:

import pbs
connection = pbs.pbs_connect(pbs.pbs_default())
print connection

Returns: -1 all the time if i run it under uwsgi???

server = pbs.pbs_default()
print "Server name: ", server

returns: Server: and even if i run: connection = pbs.pbs_connect(str('myservername')) i keep getting -1 as the answer

OS: ubuntu 14.04 torque version: 4.1.3 pbs_python version:4.4.0 python version: 2.7

if i run the same code under django's embbedded server or ipython in terminal it returns 1 as expected..

This is the 2nd ticket i create with the same subject. I am trying to find a solution for almost a month with no success... So if someone has any idea, or has already implemented something similar, please give me a hand. Thanks in advance.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Note: See TracQuery for help on using queries.