I’m using Deadline, Houdini, and Redshift
Windows 10
User A have “houdini.env” file configured for Redshift 2.6.44
User B have “houdini.env” file configured for Redshift 3.0.16
Ideally when both tasks submitted to the farm - each one should respect Environment Variables of Submitted Job and render with according versions of Redshift
Unfortunately in reality - Environment Variables overridden by Slave/Worker configuration and Job rendering with Slave/Worker User Profile configuration
How can I force Houdini/Deadline to Include Environment Variables?
I see in Repository Configuration some checkboxes for “Rendering as a user” , but Preserve Environment checkboxes available for Linux/Mac only
Our Redshift was set up to be loaded from Network. During submission we sent Redshift version number as an extra info and construct our $REDSHIFT_COREDATAPATH in JobPreLoad.py using that data.
Refer to This doc for JobPreLoad.py starting template and the scripting reference for what you can do with it. Summary is that you first need to get access to the job object itself and then you can read any parameters from there.
Here’s a quick example, if you store the version inside Extra Info 1
Can you please explain how you’re storing the version number inside “ExtraInfo1” variable?
I tried to store that as an environment variable inside houdini but deadline doesn’t pick that up in JobPreLoad.py.
I’ll also need to pass the “redshift_LICENSE” env variable.
You can set the ExtraInfo for job through the Monitor once you submit the job. Right click on job-> Modify job properties -> Job Extra Info.
If you want to automate this on submission time, you can write this into your jobinfo file.
- In your submitter script: C:\DeadlineRepository10\submission\Houdini\Main\SubmitHoudiniToDeadlineFunctions.py
- you could add the following lines in the section where it writes the JobInfo file:
fileHandle.write( "ExtraInfoKeyValue0=testKey=testValue\n" )
This way all your submissions will have this value. And you can use this in your JobPreLoad.py by calling
Job.GetJobExtraInfoKeyValue(string key)
I’m using this to create variables like this (in jobPreLoad.py):
To pass all the environment variables from the Houdini hip file to the Deadline Job you can add the “IncludeEnvironment” flag to the SubmitHoudiniToDeadlineFunctions.py script.
Where to add the flag:
Around line 670-685 (depending if you modified the script already)
........
# Create submission info file
jobInfoFile = os.path.join(homeDir, "temp", "houdini_submit_info%d.job") % ( wedgeNum * regionJobCount + regionjobNum )
with open( jobInfoFile, "w" ) as fileHandle:
#custom line to include ENVIRONMENT VARIABLES
fileHandle.write( "IncludeEnvironment=True\n" )
fileHandle.write( "Plugin=Houdini\n" )
fileHandle.write( "Name=%s\n" % jobName )
fileHandle.write( "Comment=%s\n" % jobProperties.get( "comment", "" ) )
..........
In the Houdini File Help / About Houdini / Show Details:
You will see all the env variables of the current scene. All these variables will be passed.
In Deadline monitor, under Job Properties of the job submitted using the Deadline ROP:
under Environment tab or the Submission Params you will see all the key/value pairs added to the job.
NOTE: make sure to restart Houdini after modifing the script otherwise the changes won’t take place!
TAG: how to pass environment variables from houdini to deadline using the deadline rop submitter.