Modo plugin Set Geometry Cache major bug

Hi All

Just found a bug in the deadline modo plugin. When ‘Auto set Geometry Cache’ is set to true in the Monitor Tools->Configure Plugins->modo panel, deadline tries to set the geometry cache buffer before rendering, but the script sets the buffer to the available system memory minus the cache buffer in the plugin settings. So if I choose 45GB in the plugin options, and there’s 55GB of ram available, deadline sets the modo Geom cache to 10GB, not 45GB. With each subsequent task it gets worse, as the system memory get’s used up by the previous task.
Here’s the code from modo.py

            # See if we should automatically set the geometry cache.
            if self.GetBooleanConfigEntryWithDefault( "GeoCacheEnabled", False ):
                self.LogInfo( "Auto geometry cache detection enabled" )
                
                # This value is already in MB.
                geoCacheBuffer = self.GetLongConfigEntryWithDefault( "GeoCacheBuffer", 512 )
                self.LogInfo( "Geometry cache buffer is " + str(geoCacheBuffer) + " MB" )
                
                # Convert this value to MB.
                availableMemory = (SystemUtils.GetAvailableRam() / 1024) / 1024
                self.LogInfo( "Available system memory is " + str(availableMemory) + " MB" )
                
                # Now calculate the limit we should pass to modo.
                # This is the offending line:
                memoryLimit = availableMemory - geoCacheBuffer
                self.LogInfo( "Setting geometry cache to " + str(memoryLimit) + " MB" )
                
                # Send command to set the geometry cache size.
                geoCacheBytes = (memoryLimit * 1024) * 1024 
                self.SendCommand( "pref.value render.cacheSize " + str(geoCacheBytes), True )
            
            # Send command to select the render item.
            self.SendCommand( "select.itemType polyRender", True )[/code]

As a quick fix I've swapped [code]
geoCacheBytes = (memoryLimit * 1024) * 1024 
[/code] for [code]
geoCacheBytes = (geoCacheBuffer * 1024) * 1024

I guess the original intention was to set the cache as close to the amount set in the plugin options as possible taking into account the available system memory, but even this approach is flawed as with each subsequent task the available system memory goes down.

Hello Dave,

I will check with the devs on this and verify if this was something found for 7.1 or not. Thanks for letting us know.