subtask and framesPerTask behaviour

jwillette
2012-05-04
2012-12-11
  • jwillette

    jwillette - 2012-05-04

    block1:
    I have a 30 frame sim:
       block1.setFramesPerTask(30)
       block1.setDependSubTask()

    block2:
    Generates some geometry based on that sim in batches of 10:
      block2.setTasksDependMask('block1')
      block2.setFramesPerTask(10)

    block1:
    frame 1-30

    block2:
    frame 1-10
    frame 11-20
    frame 21-30

    I would expect the "frame 1-10" task in block2 to start only when the first 10 frames of block1 are complete, but the task starts as soon as frame 1 of block1 is complete.
    The next task, "frame 11-20", starts as soon as frame 11 is complete in block1.

    Is this a bug or is there another way to define this type of job?

    Thanks.

     
  • Timur Hairulin

    Timur Hairulin - 2012-05-04

    Hi.
    That simulation task must know, how many frames finished.
    Afanasy python parsers return frame number (and other parameters), not only percentage.
    http://cgru.sourceforge.net/afanasy/doc/parsers.html

    But i've just created your 30 frames example job with 30 and 10 frames per task. And there is a bug, now it does not support more that 1 frames per task to wait subtask block. So you should render simulation only with 1 frames per task, and simulate with full range per task, of course.

    Sadly but i did not use to render simulations with more that 1 frames per task, but i will fix it in the next release.

     
  • Timur Hairulin

    Timur Hairulin - 2012-05-04

    example that works:
    import af

    j=af.Job('sub task check')

    b1=af.Block('render')
    b1.setWorkingDirectory('/cgru/examples/test scripts')
    b1.setCommand('python ./task.py -s @#@ -e @#@')
    b1.setNumeric( 1, 30, 1)
    b1.setTasksDependMask('simulation')

    b2=af.Block('simulation')
    b2.setWorkingDirectory('/cgru/examples/test scripts')
    b2.setCommand('python ./task.py -s @#@ -e @#@')
    b2.setNumeric( 1, 30, 30)
    b2.setDependSubTask()

    j.blocks.extend()
    j.send()

     
  • Timur Hairulin

    Timur Hairulin - 2012-05-04

    Already fixed it sources (there was a small mistake).
    Contact if you are very hurry, can give you new afsever binary (for any of supported platforms that are available in downloads).

     
  • jwillette

    jwillette - 2012-05-10

    Thanks,

    I'm not in too much of a hurry for the fix, as you can see :)
    For now I've just been doing something similar to your example, so we can wait until the next release of the code.

     
  • jwillette

    jwillette - 2012-05-10

    Yup, that works!
    I didn't realize we already had that version installed.

    Thanks again!

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks