.
 
.

ÜberwareTM

View Forum Thread

Anyone can view the forums, but you need to log in in order to post messages.

> Forum Home > Support > Nuke Packet Size Limit

  Tue, 21/Apr/2015 9:01 AM
Mark
8 Posts
Hello

I want to limit the packet size that Nuke submits to Smedge. As I understand it, the Nuke submitter allows the user to select the number of machines. It then goes on to work out how many frames the packet should contain, and submits the job accordingly.

What I want to do is ensure that no more than x frames are submitted in a packet for any one job. Currently I am very much okay with it being hard-coded - it would be nice if I could do this through Product Settings...

I found this line in the SmedgeRender.py script

cmdText = '%s script -type Nuke_64 -scene %s -name \"%s\" -priority %s%s -range %i-%i -OvertimeKill 0 -packetSize %i %s -note \"%s\" -pool Nuke ' % (self.submitExecutablePath, self.nukeScriptPath, self.jobName, self.priority, renderPaused, self.nukeFromFrame, self.nukeToFrame, self.packetSize, renderNodeString, getpass.getuser())

Since it references the self.packetSize, I thought it would be a good idea to cap it with this code:

if (self.machines > 1): self.packetSize = min(self.packetSize, 50)

on the line before before. It has caused some headaches (failed renders or even failure to submit the job!) so I have commented it out for now.

As to why, I have found that large packet sizes lead to long render times. It limits flexibility when priority jobs come along, and you are forced to stop and requeue to get the engine free. Then you have lost the render time. The only reason that I can come up with for limiting to one machine is to write .mov or similar, which is fine... anything else for us would be as many machines as possible!

I've managed to modify the script to be 8 engines by default instead of 4 but my Python is shakey - especially with the whole indenting thing in someone else's script.

If anyone has any ideas, I'd be grateful.

Mark
   
  Tue, 21/Apr/2015 12:12 PM
Mark
8 Posts
Not to worry I found the answer (for anyone else that might find this useful)


[tab][tab]if (self.machines > 1): self.packetSize = min(self.packetSize, 50)
[tab][tab]cmdText = '%s script -type Nuke_64 -scene %s -name \"%s\" -priority %s%s -range %i-%i -OvertimeKill 0 -packetSize %i %s -note \"%s\" -pool Nuke ' % (self.submitExecutablePath, self.nukeScriptPath, self.jobName, self.priority, renderPaused, self.nukeFromFrame, self.nukeToFrame, self.packetSize, renderNodeString, getpass.getuser())


The issue did indeed turn out to be the white space - sometimes it's tabs and at other places it is spaces. I found that matching (copy/paste) the white space from the cmdText line fixed the issue!

Hope that helps others.

TTFN

^_^

Edited by author on Tue, 21/Apr/2015 12:12 PM
   
  Tue, 21/Apr/2015 8:42 PM
Robin
1138 Posts
I think the issue is the way Python uses indention levels to organize blocks. It's one of the worst programming language design features I've seen since BASIC had line numbers (GNU Make has a similar issue).
   
Page 1 of 1

.
.
.
.
©2000 - 2013 Überware. All rights reserved