(TL;DR: Random fix guess at the bottom. The rest is all background research)
Hey Ant! We’ve been talking about this back and forth on the team this week and I need to make some corrections here. It’s clear from the OOD space error that the path we’re using is “/tmp” and not the Worker’s own temporary directoy so changing the Worker’s data root won’t work.
Justin found that Arnold 6 is capable of doing path mapping on its own if running stand alone (if we provide the mappings in a JSON file) and perhaps these days
dirmap (Maya’s built-in remapping) is working correctly. Some trivia, we implemented the current process that requires writing to disk because Arnold was one of the few plugins that didn’t follow what
dirmap recommends for repathing.
What I wasn’t overly convinced of was that doing this in-memory is the right approach. If we’re remapping files, keeping a local cache could be helpful but not in it’s current form. Looking at how we’ve implemented this, we’re doing the path mapping as part of
RenderArgument() so it’s definitely not going to benefit when doing Arnold Standalone (snippet from Arnold.py):
# Check if we should be doing path mapping on the contents of the .ass file.
if self.GetBooleanConfigEntryWithDefault( "EnablePathMapping", True ):
localDirectory = self.CreateTempDirectory( "thread" + str(self.GetThreadNumber()) )
localFilename = Path.Combine( localDirectory, Path.GetFileName( filename ) )
# The .ass files need the paths to use '/' as the separator.
RepositoryUtils.CheckPathMappingInFileAndReplaceSeparator( filename, localFilename, "\\", "/" )
if SystemUtils.IsRunningOnLinux() or SystemUtils.IsRunningOnMac():
os.chmod( localFilename, os.stat( filename ).st_mode )
filename = localFilename
Switching over to Maya,
performArnoldPathmapping() in DeadlineMayaBatchFunctions() is what’s responsible for this when Maya’s running in batch mode. That’s also part of RenderTasks() so it’s run every task so disk likely won’t help much.
So, at this point… What I’m curious about is whether you can comment out these two lines in MayaBatch.py and Arnold “just works”:
if self.Renderer in [ "arnold", "arnoldexport" ]:
scriptBuilder.AppendLine( 'catch(python( "DeadlineMayaBatchFunctions.performArnoldPathmapping( %s, %s, \'%s\')" ) );' % ( self.StartFrame, self.EndFrame, self.TempThreadDirectory.replace( "\\", "/" ) ) )
(It should be lines 1219 and 1220 in 10.2.0.10)
My fingers are crossed hoping that Arnold knows what to do from the
dirmap directives we’ve given it these days and that this whole adventure of writing to disk has been superflous. It’s a small gamble but I’m hoping it makes a huge impact if it works.