Hello,
I have copied the default nuke submission plugin, and made some changes to the PreRenderTasks function… which is working well. I’m copying files locally and tweaking the nuke script in line to read and write from the local drive. Problem is, that for some reason, the PostRenderTasks function does not seem to be being called. I assume its always called by default, when using what I believe to be an ‘Advanced Plugin’ structure… Is there any reason it would not be called? And is it called when all frames on a given slave are complete, or when the entire job is complete. I basically need to copy the files that were written locally to the result of this: CreateTempDirectory() back to their network home. Once for each slave / session.
Thanks for any Help!
Seth
Hi Seth,
The PostRenderTasks function (as well as the PreRenderTasks function) is only called in a Simple plugin, or in a ManagedProcess class (they’re called before and after the command line application is called for each task). Can you post your *.py plugin file? We can take a look and try to help you figure out what the problem is.
Cheers,
I will attach the file to this post.
Basically, the purpose of the changes I made to the default deadline nuke plug-in are to modify the temp nuke script in the job directory to write the files locally. Then at the end of the render, copy the frames over the network to their final home. We wanted to evaluate the impact of writing in this method would have on our disk / IO performance, vs streaming the file, as it renders, over the network.
As I noted before, the PreRenderTasks part works as expected, but I can not seem to get the PostRenderTasks step to run. In the script I am posting you will notice this line:
LogInfo('copying frames from local drive to network location')
I never see that show up in the log.
Thanks!
Nuke_p3D.rar (10 KB)
I’ll be interested to hear about the results of “local rendering” with Nuke and the impact multiple heavy frame count nuke jobs might have on overall i/o performance spread over several file servers. Of course, this all depends heavily on your infrastructural set-up, but interesting nevertheless to see if Deadline can give Nuke a performance boost by rendering locally and then drip feeding over the finished frame/s to the file server…might even be more reliable when under heavy load?
Mike
Ah, when a ManagedProcess class (in this case, the NukeProcess class) is run as a Monitored Managed Process (using the StartMonitoredManagedProcess function), PostRenderTasks, as well as some other functions (like CheckExitCode) are not called. This is because when running a Monitored Managed Process, there is no pre-defined “end period” at which to run these functions. However, there is a defined start period, which is why PreRenderTasks is still called.
The “File.Delete( self.TempSceneFilename )” line should be copied to the EndJob function, and the code to move the temp files should be placed in the RenderTasks function.
I should note that in Deadline 4.1, we will be changing our Nuke plugin to only run Nuke in command line mode, which will simplify the plugin. Deadline 4.1 will be released this month, so it might be worth waiting to upgrade before implementing these changes (if possible).
Cheers,
If you want to simulate how the 4.1 plugin will work, I’ve attached an updated py file that comments out all the non-command line stuff. In this mode, PostRenderTasks should be called as normal.
Cheers,
Thank you Ryan.
I’ll download this file and diff it with the one I sent to get a better idea of the changes you made. I’ll report back my progress.
Seth
Ryan,
Those changes worked, thank you! PostRenderTasks are now running… I’ll post later when I can do some benchmarks as to how this affects our network performance.
Seth