Notifications
Clear all

[Closed] Trouble with cmdjob.exe and Backburner

I’ve been playing around with Johan Boekhoven’s script for submitting jobs to backburner with dependencies (which requires cmdjob.exe) but I can’t quite get it to work.

I heavily edited his script as I’m attempting to use mine for another purpose (he had a lot of vDub specific code in his scipt). What i would like to do is have a script run that sends a half resolution render to the backburner server and then immediatly send a full resolution render with a dependency on the half resolution render.

The reason behind this is that I’m using vray, and when submitting large complex scenes you can sometimes get away with running a half resolution render of the irradiance map and light cache without glossy reflections and then having the full resolution render use these irradiance map/lightcache. It can sometimes speed things up.

This can all be done manually, however it’s a bit of a pain, and I often forget to turn on/off glossies etc etc, so it would be good to get the process automated.

Using the modified script from Johan I have the following:


  (
   /* CONNECT TO THE NETWERK MANAGER */
   m = netrender.getmanager()
   c1 = m.connect #manual "HKG-FARM-MGR"
   
   localFileName = maxFilePath + maxFileName
   
   jobName = (filterString maxFileName "." )[1]
   /* WHEN CONNECTION AND FILE SUCCESFULLY COPIED */
   if c1 then
   (
	/* SUBMIT IRMAP JOB */
	-- Easy BB submit
	job = m.newjob()
	job.name = jobname 
	job.fromFrame = 0
	job.toframe = 0
	job.includeMaps = true --turn on "Include Maps"
	job.submit()  --this uses all servers for the job
  
	scriptJobName1 = jobName + "_Final_Render"
  
--   /* OUTPUT1 
	-- Build stringStream
	global jobString1 = stringStream ""
  
	-- Create jobname
	format "-jobName:% " scriptJobName1 to:jobString1
	format "-manager:HKG-FARM-MGR " to:jobString1   
	format "-dependencies:% " jobname to:jobString1
 
	-- Build command string
	cmd = "cmdjob.exe " + (jobString1 as string) + maxFilePath + maxFileName
	DOSCommand cmd
  
   )
  )

Which sends 2 jobs to my backburner server, one dependent on the other. However the dependent job always fails, with error messages such as:

“Can not start C:\Program Files (x86)\Autodesk\Backburner\Network\Serverjob\2.max”

No matter what I’ve tried I just can’t get the file to render.

All the farms have access rights to libraries etc and have no issues when rendering normally through backburner. I have also tried the -attach command but still no luck.

Any suggestions guys?

2 Replies
 JHN

Yes, there’s lots of problems with your code

The biggest problem is that cmdJob is a commandline tool, that means you have to sent specific parameters to even get max to render anything. cmdJob means more work to get max to render, that’s what the vdub parameters where for, for me. So you need cmdjob to set up a commandline rendered max.
look up: “commandline” in the regular max help file (not mxs help file!)
The topics “Backburner Command Line Control” and “Command-Line Rendering” and “Command-Line Rendering Switches
I think your looking at a two step rocket here. One too initialize the first rendering, then create a new job via a cmdJob with a dependency… yes it’s hacky and there are alternatives.

  1. Submit all jobs as suspended, and manually set dependencies
  2. There’s a python script in the python and mxs thread that can hack the xml job file setting the depencies there.
    *3. Callbacks, you can add calbacks to a renderproces to trigger another, but I have no experience with it…

There’s no easy way out I guess, maybe some others have some shortcuts for you!

-Johan
*more info

 JHN

Thinking about this particular problem, if you render to 1 machine, you can easily setup the script to submit 2 jobs to the same rendermachine, then you wouldn’t need dependencies, they are just queued up for rendering… is this the case, then you’re done pretty quick…

*Better yet, have a look at this thread
http://forums.cgsociety.org/showthread.php?f=98&t=693597