Multiple versions of Software

Installation and configuration.
Post Reply
User avatar
arengorman
Posts: 9
Joined: Mon Oct 16, 2017 11:00 am

Multiple versions of Software

Post by arengorman »

Hello!

In our studio we have task to to render through Afanasy in Houdini depending on the submitter verson, i.e. if I submit a job from H15.5 the farm has to render the job in H15.5, if I submit a job from H16 it has to render in H16. We use linux version btw.

I've found some topics on github and in Rules, but unfortunately none of them can help me :(
https://github.com/CGRU/cgru/issues/268
https://github.com/CGRU/cgru/issues/263
http://rules.cgru.info/#/Ask_Questions_ ... m_launcher

Everywhere Timur advices to use custom command, which specifies the path to houdini dir depending on .hip-file location. But for me there are two problems with this advice:
1) Not all submitted files can be placed in exact project or shot directory, sometimes artists use both version in same shots. So I can't determine environment depending on the .hip location.
2) I can't find a way how to determine (for example by executing some code in $CGRU_LOCATION/software_setup/setup_houdini.sh) the full name of the .hip or the version from where it was submitted.

I also want to clear if I understand correctly the full chain: I submit a job in houdini via plugin (afanasy node in ROP), then the plugin sends JSON to Afserver with the job's parameters, then Afserver starts some command (which exactly?) on rendernodes, right?
User avatar
timurhai
Site Admin
Posts: 910
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Multiple versions of Software

Post by timurhai »

Hi.
There is no "out-of-the-box" way to choose software version in CGRU.
You can correct setup_houdini.sh (or use totally custom script for it), to use some environment variable to specify version.
Afanasy ROP constructs commands for a job tasks, and sends job to afserver.
Afserver will send that commands to afrenders to launch on render nodes.

That commands will run this script:
https://github.com/CGRU/cgru/blob/maste ... nder_af.py

Use any custom way to use any custom version.
Various admins uses various ways to setup soft in studios.

I use script that detects version from a working directory.
I never faced a situation (yet) when the same project shot uses different software versions.
If i will face it, i will create separate folders for hip files and will go the same my favorite way.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
arengorman
Posts: 9
Joined: Mon Oct 16, 2017 11:00 am

Re: Multiple versions of Software

Post by arengorman »

Thanks for the reply, Timur. It is a little bit late, but anyway thanks for attention

I'll post here the solution for other users who will face the same problem.

I had recently discovered the full chain, modified afanasy.py file from cgru/plugins/houdini folder (class BlockParameters, __init__ function, 153 line).

Code: Select all

if "15" in hou.getenv("HFS"):
	self.cmd = 'hrender_af15'
else:
	self.cmd = 'hrender_af'
The aim was to construct a job, which calls the copy of cgru/software_setup/bin/hrender_af (I named it hrender_af15) with a different environment, that suits H15. Everything works.
timurhai wrote: Mon Oct 30, 2017 1:23 pm I never faced a situation (yet) when the same project shot uses different software versions.
If i will face it, i will create separate folders for hip files and will go the same my favorite way.
I also had the same idea, but I didn't like the additional actions that artist has to take to go to the shot folder and to create separate h15 folder. One button solution is better)

I want to say "thank you, Timur" for designing such well thought out product with an open architecture, which allows for users to modify functionality for their needs.
And yes, my solution is kinda crutch, and works only for ROP, but it works.
Post Reply