Author Topic: How to get a frame based timeout  (Read 4971 times)

laschmoove

  • Sr. Member
  • ****
  • Posts: 29
How to get a frame based timeout
« on: January 15, 2010, 06:31:59 AM »
Hi everybody,

I guess I need some food for thought.
We keep having the problem that some workers grab a frame to render and keep rendering for hours, so we are looking for a solution that helps us detecting that situation.

I was very happy to see Scott's announcement here:http://www.pipelinefx.com/forum/index.php?topic=774.0 of the new subjob timeout feature in the GUI 5.5.1, but on the second glance I realized that a timeout based on a subjob does not help me. Is there a way to tweak that feature to be used as a frame based timeout?

Or could anybody give me a hint of where to start if I'd like to implement my own frame based timeout feature, for example in the XSI jobtype? I found anthony's answer http://www.pipelinefx.com/forum/index.php?topic=279.0. Maybe anybody could give me some more details or specify a bit further how to proceed?

Any help will be greatly appreciated.

Thanks a lot,
laschmoove

shinya

  • Administrator
  • *****
  • Posts: 232
Re: How to get a frame based timeout
« Reply #1 on: January 16, 2010, 01:06:09 AM »
Hi laschmoove,

Thanks for your inquiry.

Unfortunately, as you point out, with the current version, it is not possible to
do a frame-based timeout. 

As Anthony suggested before, it would need to be implemented as part of your
jobtype backends, but it won't be trivial.  You'd need to use signals (SIGALRM)
and/or spawn a monitoring thread/process that will communicate with and
watch your main rendering thread, so that it can kill the main thread when it's
been sitting on a single frame/agenda for more than N minutes.

The other alternative, as Anthony also mentioned, would be to set up your
jobs so that each individual subjob will serve a single frame-- i.e. you'd submit
as many subjobs as there are frames-- and use the subjob timeout. 
You can automatically tell your jobs to expand their subjob count to the number
of frames by setting the "expand" and "disable_cpu_limit" flags when you
submit your jobs.


laschmoove

  • Sr. Member
  • ****
  • Posts: 29
Re: How to get a frame based timeout
« Reply #2 on: February 16, 2010, 02:45:55 PM »
Hi Shinya,

I found the expand flag in the docs, but I am missing the disable_cpu_limit.
Could you please let me know where I can set it?

Edit: Found it under Flags in the DetailedQube section of the XSI batch render dialog. Sorry.

Thanks,
laschmoove
« Last Edit: February 16, 2010, 05:29:32 PM by laschmoove »