Cannot submit Houdini job from Rez environment

Hi,
I’m new to Deadline. Now that is supports rez, I thought I would give it a spin. I installed it and configured everything the documentation says for rez support.
I’m using Deadline 10.2.0.10. I have tools setup in my package (rez-context --tools produces a list of tools), I configured the rez event to be Global Enabled and the package derive mode to REZ_USED_RESOLVE, I launch Houdini from a rez environment and submit the job with the Deadline ROP.
But the job appears in the Deadline Monitor without the extra info keys it is supposed to have for rez.
I looked at the job reports and see this:
Event Error (OnJobSubmitted): CalledProcessError : Command 'rez-context --tools' returned non-zero exit status 1.
I ran subprocess.getoutput("rez-context --tools") from within Houdini and I get this error:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\flord\\AppData\\Local\\Temp\\rez_context_rj0km7l8\\context.rxt'
I looked on disk and indeed, the context folder does not exist.

Then I realised that on Windows, when we launch houdini from a powershell, the process “backgrounds” itself and returns to the prompt immediately. So the rez context is very short lived. Houdini has a command-line option to force it to launch in the foreground, but it doesn’t seem to work on Windows.

How are we supposed to use Houdini with Rez on Windows? This problem would not exist if the submission could be done strictly from the environment variables available within the process. Why do we have to declare tools in our packages (as opposed to just aliases) and run rez-context --tools for the submission to detect rez properly?
Thanks!

F

@flord Rez defined implicit packages taken from REZ_USED_IMPLICIT_PACKAGES , to the Deadline Job as an Extra Info Key Value: DEADLINE_REZ_REQUEST_PACKAGES . Additionally, Deadline sets the DEADLINE_REZ_TOOLS Extra Info Key Value on the Job by running rez-context –tools as a subprocess and then parsing the output to compile a list of Rez tools available to the Job. If Deadline cannot derive the package or tool list, it will log a warning and complete the Job submission without Rez. This is done in all Rez plugin modes.

I solved it by using $env:REZ_KEEP_TMPDIRS = 1; rez-env ..., which keeps the rez context folder alive forever.

2 Likes

Thanks for posting a workaround here, and I’ll make a internal runbook on this to address this issue properly.