Maya Mental Ray monitor submission ignores threads param

Hi all

Just a word of warning for Maya users using monitor to submit jobs, if you find MayaBatch only using a single thread even when the threads parameter has been specified in the advanced options tab then try specifying the renderer as opposed to leaving it set to ‘File’. With Maya + Mental Ray I noticed only a single thread/core would be utilised if I failed to set this option.

Devs, do you reckon it might be worth a warning at submission time, or disabling the threads box when renderer is set to File? Or even better maybe it’s possible to set the number of threads even when the file renderer is used.

Hello Dave,

I am going to go ahead and verify if this is intended, and try to reproduce it, as I am not aware of any reason for this, but if a ‘file’ submission does ignore the threads, I agree that we should be advising on this.

Hello Dave,

So in preliminary testing, I found that the thread setting did indeed make it from submission to the job’s properties in the Monitor, using the Monitor’s submitter. Can you verify if you see that under MayaBatch settings? If not, can you share screenshots of the settings used so I can more closely replicate? Thanks.

The threads setting does successfully get stored in the job params, but doesn’t then get picked up on unless the renderer is set as far as I can tell.

Line 912 onwards in MayaBatch.py

def GetThreadsCommand( self ): if len( self.Threads ) > 0: if self.Renderer == "mayasoftware": return 'setAttr .numCpusToUse ' + self.Threads + '; if(!`about -mac`) { threadCount -n ' + self.Threads + '; };' elif self.Renderer == "mentalray": numThreads = int( self.Threads ) if numThreads > 0: return 'global int $g_mrBatchRenderCmdOption_NumThreadOn = true; global int $g_mrBatchRenderCmdOption_NumThread = ' + self.Threads + ';' else: return 'global int $g_mrBatchRenderCmdOption_NumThreadAutoOn = true; global int $g_mrBatchRenderCmdOption_NumThreadAuto = true;' elif self.Renderer == "vray": return 'setAttr "vraySettings.sys_max_threads" ' + self.Threads + ';' elif self.Renderer == "renderman" or self.Renderer == "rendermanexport": return 'rmanSetGlobalAttr "limits:threads" "' + self.Threads + '";' elif self.Renderer == "3delight": return 'removeRenderLayerAdjustmentAndUnlock .numberOfCPUs; catch(`setAttr .numberOfCPUs ' + self.Threads + '`);' elif self.Renderer == "finalrender": return '$numCpu = ' + self.Threads + ';' elif self.Renderer == "maxwell": return 'removeRenderLayerAdjustmentAndUnlock maxwellRenderOptions.numThreads; catch(`setAttr maxwellRenderOptions.numThreads ' + self.Threads + '`);' elif self.Renderer == "vray": return 'setAttr "vraySettings.sys_max_threads" ' + self.Threads + ';' return ''

I notice there’s no if self.render == 'file' without that how would the number of threads be set when renderer is not specified?

Happy to do some more thorough testing and provide screenshots etc if my guess at the cause is way off…

Oh, and using 7.1.0.16 R but a quick comparison with DL6 MayaBatch suggests the same.

Hi,
Not setting explicitly the thread count is by design, since the thread count is an option that is specific to certain renderers, and the “file” renderer option is renderer agnostic. What we can do, is clean-up the monitor submitter and disable features which are not applicable when the “File” renderer is being used. I’ll go ahead and make those changes to our internal build for the next v7.1 beta release.
Thanks for the feedback!
PS - If your already testing our v7.1 beta version, please could you restrict all beta feedback to the beta forum!

Thanks Mike!