Notifications
Clear all

[Closed] How to: Net Render with dependencies

I’ve always had problems when using the NetRender interface and more importantly it lacks a key feature: job dependencies. The most stable and full featured way to submit jobs to backburner has always been manually via the Network Job Assignment dialog and so of course I have automated it. The tricky part was automating the ListView’s & ListBox’s which required some windows messaging and dealing with unmanaged memory.

   The attached .ms file holds a single struct called NetRenderAutomation. Usage is as follows:
nra = NetRenderAutomation()
       nra.specific_servers = #( "render-07", "render-09" )
       nra.dependencies = #( "Existing Job Name A", "Existing_Job_Name_B" )
       nra.job_name = "test_job_name" -- required
       nra.job_priority = 53
       nra.critical = false
       nra.SubmitNetRender()

Only the job_name property needs to be specified. All others use default settings.

   I've been using it in production for a good year or so in max 2010 and 2011 without a hitch. (Note: I did just do some cleanup for this release so please report any bugs)
 Also I have only been using the english version of max so it may or may not work with other versions.
   
   There are some things that should be considered in your code when using NetRenderAutomation:
   1) This is not a full replacement for the NetRender interface. You can not get jobs or servers from this struct. You still need to use NetRender to GET data.
   2) Since we're not using NetRender to send the jobs, you will have to specify your custom frame ranges etc via the appropriate global variables (eg. rendStart, rendEnd etc)
   3) You will have to use your own code to provide a unique job name. If you don't the automation process just stops.
   4) There is a limit to the length of the job name string. Not sure what it is but i've only come across it once with a very long job name. If your job name is greater than this limit, there won't be any error, the job just wont appear in the queue.
   5) The popups saying 'you are about to submit a region - are you sure...' is automated to always press 'OK' so you'll have to do your own checking and/or query the user to make sure this is what you want.
   
Feedback welcome

EDIT: i have updated the attached file with a new property to set a specific manager name as requested by Jon Seagull and as a bonus the options to include maps or submit a suspended job:

nra.manager_name = "manager-name"
   nra.include_maps = true
   nra.suspended = true

these new properties are optional. if you don’t specify a manager name it will do an automatic search as usual. Tested on 2011 only. Let me know if there’s any issues

34 Replies
 lo1

This looks interesting, thanks for sharing!

because you use on-fly c# compiling anyway check the GetWindowText… the UIAccessor.GetWindowText is a weak link of your chain.

@lo – thanks, np

@denis – i’m not sure what getting window text has to do with the problem? try to manually submit a job with a job name > 70 characters (i worked out the limit since my last post). There is no error but no job appears in the queue. Where does getting text come into it?

3 Replies
(@denist)
Joined: 11 months ago

Posts: 0

sorry and i don’t have a time to play with your code. it looks almost correct for me. but i’m absolutely sure that UIAccessor.GetWindowText cuts the string by 256(?) symbols. maybe less. there might be some default number. try to overwrite the UIAccessor’s functionality

(@denist)
Joined: 11 months ago

Posts: 0

i’m pretty far from this content at this moment… do you want to say that there is no way to use long name for a job?

(@gravey)
Joined: 11 months ago

Posts: 0

Yes. As far as I can tell there i no way to submit long job names via the ui. I havn’t tried using NetRender to submit a job to see if there’s a limit there but that will be one of the next things i check. Also just realised i’m currently testing on 2010 so maybe that’s a factor.

that’s all up to you. as i said i’m just guessing. i think that is a problem across all max versions.

So FYI I tested 2012 and NetRender. There is definitly a 70 character limit imposed by backburner. A job folder is created on the manager machine but no files are sent/recieved. Annoying, but important to know for anyone with any net rendering scripts

Thank you Gravey!

Did you test this script under max2013?

1 Reply
(@gravey)
Joined: 11 months ago

Posts: 0

nope i don’t have 2013 installed and probably wont anytime soon. sorry. if you have any troubles with it though let me know

Tested On Max 2013 and I’ve several successful submissions to Backburner 2013…

Thanks a TON!

Wow !
thanks a ton of lots !
It seems to work in 2013 !
But I don’t understand why it doesn’t work via netrender…

This is fantastic. Thanks!

One wrinkle – we have a WAN with multiple backburner managers at different sites, and I need to be able to select among them in my submission script.

I’ve delved into your dotnet code, and while I can sort of see what I need to do, the specifics of getting the handle of the manager IP edittext are completely alien to me.

Would it be possible to release an update that adds a .managerName public property to the struct that updates the manager IP field before hitting Connect?

Page 1 / 3