PipelineFX Forum
Qube! => Developer Customization => Topic started by: agraham on October 13, 2008, 11:51:09 PM
-
I can't, for the life of me, figure out what I'm missing in order to submit a job with chunks via the Python API. Here is my workflow:
job = {} job['name'] = 'test chunk'
job['cpus'] = 10
job['priority'] = 5000
job['prototype'] = 'cmdrange'
package = {} job['package'] = package
job['package']['cmdline'] = 'echo QB_FRAME_START QB_FRAME_END'
job['package']['padding'] = 0 job['package']['rangeChunkSize'] = 5 job['package']['range'] = '1-100'
job['package']['rangePartitions'] = None
range = '1-100'
agenda = qb.genframes( range )
job['agenda'] = agenda
submit = []
submit.append(job)
submitted = qb.submit( submit )
When I submit the job, it's listed in the GUI as a normal, non-chunking job. Do I have to do something specific to the agenda genframes?
If I re-submit this job from within the GUI, chunks IS in fact on, and numchunks IS set to 5. Is my custom agenda overriding the chunks?
AG
-
You are very close, and just need to switch out the genframes() with the genchunks() function. See below for the documentation and examples for genchunks().
You may also want to check out the SimpleCmd documentation for quickly creating submission dialogs for your own commandline calls.
def genchunks(chunksize, range, *extraRanges, **kwargs):
Generate a work agenda (individual Work items) in frame chunks based upon range list.
:See: `rangesplit`, `rangechunk`, `rangepartition`
:See: `genframes`, `genchunks`, `genpartitions`
:Change: Added "binarySort" keyword option for Qube 5.3
:Parameters:
chunksize : int
number of frames per chunk
range : str
Frame range string (additional ranges can be specified)
- n1 (ie. 1)
- n1,n2,... -- comma separated list (i.e. 1,2,3,5,10)
- n1-n2 -- n1 through n2 (i.e. 1-10)
- n1-n2xStep -- n1 through n2, step Step (i.e. 1-10x2)
:Keywords:
binarySort : bool
perform a binary sort (first, last, middle) on the resulting order (default=False)
:Returns: list of Work instances. ([`Work`])
:Example: qb.genchunks(10, '1-100')
:Example: qb.genchunks(10, '-100--10')
Full Python API and SimpleCmd documentation can be found at:
- http://support.pipelinefx.com/product/docs/current/API_Python.pdf
- (QubeGUI) Help->Qube Python API Reference...
- (QubeGUI) Help->SimpleCmd Developer Guide...