Manually Submiting a Batch job that can share Auxiliary files?

Hello

I’m writing a plugin to run my application jobs. All custom job here.
My app can generate a scene of about 20-30gb in size and my batch can have 50+ jobs in it.
I’d like to send my scene1x and then reuse that scene for each of the 50+ jobs that I’d like to run on it.

How can I properly set up plugin/submission to do this?

I was trying to get my job.JobBatchName & to then find it in deadline / get children/ get job with aux paths and then feed from that but I failed… and I feel like I’m overcomplicating.

I also tried SynchronizeAllAuxiliaryFiles=true but that also failed as when I do self.GetAuxiliaryFilenames() I just get empty so no luck with that.
How can I properly do this?

TIA!

If you have a super large scene file, it makes no sense to include it as auxiliary file in the first place! Even including it just once with the first job will result in a file copy operation from the original location to the Repository’s Job folder.

In these cases, we recommend storing the scene file at a shared network location and submitting the job with a SceneFile= key in the job metadata (Plugin Info file) that points at the location of the file instead of including the scene as an auxiliary file.

In the app integration plugin script, just read the SceneFile= value, and load from the network (or copy from the network to a local temp path on the render node and open from there). This way, you are saving a large file copy operation during the initial submission, and you don’t have to do anything extraordinary to resolve where the shared scene file is…

Most integration plugins shipping with Deadline have this options already - if you check the checkbox in Maya to submit the scene with the job, it gets included as first auxiliary file. If you don’t, a SceneFile= entry is written to the Plugin Info job file…

Hey

Yes I see and I agree. But in this case I want to provide an option for both like in Maya plugin. To include scene / to have SceneFile= . But if scene is being Included, then I’d like to share that scene across each task. I know then I do -SubmitMultipleJobs -jobs info/etc/aux file I can submit it with only one of tasks. But then how do I access that task batch scene from other task?

Once having that I think there might be another issue… say I click “submit” that sends 5 tasks to batch name Hello, if I resend the job, the next 5 tasks will go to existing Batch group… how would I know which scene I want then as I will have 2x scene submited 1 with each submission… Perhaps I should build my own scene handling/copying logic instead of trying to push deadline… mmmm

When you perform submissions yourself, it is up to you to build both JOB files, and the command line that performs each submission.

So if you want to submit 5 or 50 jobs all using the same scene, it is up to you to save the scene to a certain path, and then reference the same file N times via SceneFile= in the JOB file.

If you want to submit the same scene multiple times as auxiliary file, you can optionally add as first argument in the command line, and do not include SceneFile= entry in the PluginInfo.JOB file. However, this would defeat the purpose of our conversation, as a huge file will be copied N times to each Job’s folder in the Repository, and then each one will be copied to the temp folder of each render node.

When the Worker picks up a Task from a Job where the scene was submitted as an auxiliary file, it will AUTOMATICALLY pull the copy from the Job’s folder into the local temp. folder of the render node. You cannot prevent this, it is in the low-level code of the Deadline Worker application. Once the file is copied into the temp. folder, it will be reused for all Tasks of that Job that run on that render node. However, the the SAME scene file is used by ANOTHER Job, the previous copy will NOT be reused by the next Job, as it is an auxiliary file from a different Job, even if it is identical. So you cannot use auxiliary files for sharing one file across 50+ jobs, you MUST use SceneFile=

In the MayaBatch plugin script (MayaBatch.py) for example, you can see the line

    sceneFilename = self.GetPluginInfoEntryWithDefault( "SceneFile", self.GetDataFilename() ).strip().replace( "\\", "/" )

This does the following:

  • Try to read the SceneFile key from the Plugin Info.
  • If it exists, it will be read, remapped to use forward slashes if necessary, and assigned to the variable which goes through more path mapping later on, and ends up being used as the scene file
  • If it does not exist, then the default value self.GetDataFilename() is used, which happens to be the first auxiliary file of the submission.
  • If neither is supplied, the scene file will be “” and the loading will fail.

This means that having both SceneFile= in the Plugin Info and the scene in the first auxiliary file would always use the SceneFile and the auxiliary file would be wasted. So your logic in your submitter should either include the SceneFile= in every PluginInfo.job file when submitting, or not include it but pass as auxiliary file. As your original question was about how to reuse the same file, the SceneFile= option is the only Deadline feature that would kinda do that. By default, the SceneFile would be loaded over the network, but you could add custom logic to a custom integration plugin to take the path and copy to a local folder on the render node. It could also include logic to check if the correct version (date and size) of the file already exists on the local drive, and NOT perform the copying again if it is already there when a new Job is picked from the same batch submission that reuses the asset.

Btw, the Maya Deadline integration has a “local cache” feature that tries to reuse asset files between Jobs that works a bit like that, but we have not ported it to any other applications yet. As you suggested, you should be able to add your own logic to the integration script and submitters to get what you need.

Please note that the BatchName property is purely a Monitor Job display level construct to visualize related jobs in a subtree, but it does nothing else. So it is UI level cosmetics, not really doing anything to relate the jobs together.

I am not sure if this made things clearer or not :slight_smile: Please ask if you have any further questions about customizing your submission and rendering workflow!

Hey Bobo
Thank you for the explanation!
It all makes sense now. I’ve gone ahead and made my own scene management using SceneFile and then I deal with the rest by myself.

Thank you again for all the help!
Regards
Dariusz

edit. How do I mark topic as solved?

You don’t. This is not a Support Ticket system. We use Zendesk for that - you cam email support AT thinkboxsoftware DOT com, or visit the Support page https://awsthinkbox.zendesk.com/hc/en-us to actually communicate with Support.

This here is a peer-to-peer Forum, with some Thinkbox employees in the mix, but not the primary support channel if you actually have problems.

I see thank you!
Yeah I’m more of a forum guy that support ticked guy. If I can learn, let other learn to :- )

I am getting Key-value pair not supported: ‘SceneFile’ when trying to use solution from this thread

Which file are you putting the SceneFile key into? Is it the jobinfo or the plugininfo?

Make sure it’s the one that’s getting passed as the plugininfo file, as the jobinfo file has a strict list of keys that are permitted.

If you can, could you share what files you’ve made?