Husk usd procedural checksum and license error

   725   5   2
User Avatar
Member
9 posts
Joined: June 2017
Offline
Hey,

We are using Houdini: 19.5.569.

We have a custom python script that we added as a houdini procedural.

When running husk on the farm we are currently fighting with 2 errors.


Error 1:


R 13| [16:13:01] Failed to run preframe procedurals script:
R 14|  Traceback (most recent call last):
R 15|   File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.569/houdini/python3.9libs/husd/runprocedurals.py", line 211, in <module>
R 16|     runProcedurals(stage, stage.GetSessionLayer(),
R 17|   File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.569/houdini/python3.9libs/husd/runprocedurals.py", line 144, in runProcedurals
R 18|     raise RuntimeError('Invalid checksum for procedural: {}'.format(proc_path))
R 19| RuntimeError: Invalid checksum for procedural: u:\pipeline\plugins\renderman\worldOffsetScript\r25_worldoffsetscript.py 

I saw there was a similar post in this forum, that described the issue came from some combination of git and windows formatting.

We have houdini installed in the default windows location and nothing is under version control.

Any idea how to fix this error?

Error 2:
We noticed that we need to run husk with the --allowed-procedurals all argument so the houdini procedurals actually get evaluated. Even tough the computers can run other houdini jobs fine, meaning the license settings seems to be correctly setup up we get license errors with husk:

R 13| [14:15:09] Failed to run preframe procedurals script:
R 14| Traceback (most recent call last):
R 15| File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.569/houdini/python3.9libs/husd/runprocedurals.py", line 211, in <module>
R 16| runProcedurals(stage, stage.GetSessionLayer(),
R 17| File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.569/houdini/python3.9libs/husd/runprocedurals.py", line 147, in runProcedurals
R 18| new_layer = runProcedural(proc_path, prim, args_dict, proc_expand_dir)
R 19| File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.569/houdini/python3.9libs/husd/runprocedurals.py", line 50, in runProcedural
R 20| geo = fn(prim, args)
R 21| File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.569/houdini/husdplugins\houdiniprocedurals\invokegraph.py", line 12, in procedural
R 22| graph.loadFromFile(hou.text.expandString(args['graph']))
R 23| File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.569/houdini/python3.9libs\hou.py", line 39510, in loadFromFile
R 24| return _hou.Geometry_loadFromFile(self, file_name)
R 25| hou.OperationFailed: The attempted operation failed.
R 26| Failed to checkout an engine license.

How can we tell husk that these computers in fact have a valid houdini license?


On a side note, we add the houdini procedural with this line of code:
hp_api = UsdHoudini.HoudiniProceduralAPI.Apply(prim, node.name())
hp_api.GetHoudiniProceduralPathAttr().Set(SCRIPT_PATH.as_posix())

args = {}
args["sourcePrim"] = node.parm("SourcePrim").eval()
args["fixPrims"] = node.parm("fixPrim").eval().split()
hp_api.GetHoudiniProceduralArgsAttr().Set(str(args))
hp_api.GetHoudiniAnimatedAttr().Set(True)
Edited by pullpullson - Jan. 11, 2024 11:43:55
User Avatar
Staff
453 posts
Joined: June 2020
Offline
Thanks for the detailed output. In your first log, this particular line is the issue:

R 19| RuntimeError: Invalid checksum for procedural: u:\pipeline\plugins\renderman\worldOffsetScript\r25_worldoffsetscript.py

More specifically, it's not Invalid checksumbut rather u:\...\r25_worldoffsetscript.py. I appreciate the error message is a bit misleading, but ultimately what's being flagged is that you're running in the default mode of --allowed-procedurals=basicbut trying to use a custom procedural. This is not allowed. In basicmode, the rules are:

* you may not modify runprocedurals.py
* you may not run a procedural other than invokegraph.py
* you may not modify invokegraph.py
* you may not use a SOP graph that generates anything other than curves and/or points (unless the graph has been shipped and digitally-signed by SideFX - e.g., RBD destruction graph, Ocean graph - both in H20.0)

As you've found, you need to use --allowed-procedurals=allto run your custom procedural.

I don't know why you'd see license errors unless your licenses are actually used up. There shouldn't be any unique license configuration required. You say "the computers can run other houdini jobs fine". What jobs are they running? What licenses (or license types) do they use?
Edited by robp_sidefx - Jan. 11, 2024 14:24:29
User Avatar
Member
9 posts
Joined: June 2017
Offline
Hey,

thanks for the quick reply!

* you may not modify runprocedurals.py
* you may not run a procedural other than invokegraph.py
* you may not modify invokegraph.py
* you may not use a SOP graph that generates anything other than curves and/or points (unless the graph has been shipped and digitally-signed by SideFX - e.g., RBD destruction graph, Ocean graph - both in H20.0)

Thanks for the clarification. That means we should be able to run the houdini hair procedural in basic mode, which does not require a houdini license.

Can you talk a bit more about this invokegraph.py script? Where is it located and has it some sort of special meaning? I noticed it is used in the hair procedural as well.

There shouldn't be any unique license configuration required.

I tried running some jobs again with the --allowed-procedurals=all flag and some worked but some not. Strange...
Is there a command line flag for husk to check if the required license is available and if not abort he render immediatly?

Would that be?
--check-licenses "Houdini FX"

And what is the minimum license required to run husk with procedurals?

You say "the computers can run other houdini jobs fine". What jobs are they running?
I mean for example hython jobs, which should aquire a full houdini license as far as I know.



Thanks for the help!
Edited by pullpullson - Jan. 12, 2024 07:52:27
User Avatar
Member
9 posts
Joined: June 2017
Offline
Oh and I also was wondering if it's possible to 'bake' houdini procedurals?

As an exmaple, lets say we want to cache the hair procedural node in the current usd layer.
User Avatar
Staff
453 posts
Joined: June 2020
Offline
That means we should be able to run the houdini hair procedural in basic mode, which does not require a houdini license.

That's correct

Can you talk a bit more about this invokegraph.py script? Where is it located and has it some sort of special meaning? I noticed it is used in the hair procedural as well.

The file itself is $HFS/houdini/husdplugins/houdiniprocedurals/invokegraph.py
The invokegraphprocedural is our general-purpose "wrapper" to allow invokable SOP graphs (https://www.sidefx.com/docs/houdini/nodes/sop/invokegraph.html) to be run, taking USD prims as input. In H19.5 we shipped a SOP graph (technically two graphs) for hair, and in H20.0 we added graphs for feathers, oceans, and RBD destruction.


Is there a command line flag for husk to check if the required license is available and if not abort he render immediatly?

I'll defer to my colleagues to answer that, sorry.

Oh and I also was wondering if it's possible to 'bake' houdini procedurals?

Yes, there are (at least) two ways:

When rendering via husk you can provide --capture-proceduralsand --procedurals-capture-directorywhich will write the expanded procedurals to disk.

Alternatively, you can have a "Preview Houdini Procedurals" LOP in your scene. By default this is bypassed when you write out your USD file, but you can force it to take effect by disabling "Set ROP Cook Context Option" on your USD ROP, or by diving inside the LOP and, on the expand_procedurals child LOP, changing the activation to be 1 (i.e., not based on @ropcook).
User Avatar
Member
9 posts
Joined: June 2017
Offline
The invokegraphprocedural is our general-purpose "wrapper" to allow invokable SOP graphs (https://www.sidefx.com/docs/houdini/nodes/sop/invokegraph.html) to be run, taking USD prims as input

Thanks for the explanation. That sounds like a really powerful feature! Looking forward to it becoming more accessible.


And thanks for letting me know how to bake the procedurals. We tried experimenting with the preview procedurals node and exporting it but we totally missed that option on the USD ROP. Also interesting that husk as that option too.
Edited by pullpullson - Jan. 15, 2024 00:47:38
  • Quick Links