On this page |
Overview ¶
TOPs work with compute farms that may have various file systems. For example, you can use a Windows machine and a Linux-based farm. This creates a problem on how to map file paths from one file system to another.
For example \\allfiles\shot1\file1.bgeo.sc
< → /mnt/hq/shot1/file1/bgeo.sc
. To address this, the PDG Path Map in TOPs lets you establish cross-system file path mapping rules.
Tip
You can chain mapping rules with the PDG Path Map. For example if /mnt/hq
maps to Z:
in zone WIN
, and Z:
maps to //allfiles
in the same zone WIN
, then /mnt/hq
will map to //allfiles
.
How mapping works ¶
There is one path mapping table per file and is shared between every scheduler inside it. File attributes and file results store their original
path, and their mapped
path is generated on demand using the PDG Path Map.
The mapping table is stored in a PDG_PATHMAP
global variable, which is saved in the HIP file. When you execute PDG jobs, this PDG_PATHMAP
is set in your environment and is used to determine the local version of a given file path. This happens automatically when you use the PDG work item API.
Notes
-
Only the first matched rule applies for a given zone. For example if there are 2 rules for zone
WIN
which map a given source path to different destination paths, then only the first rule applies. -
The PDG Path Map does not have checks to verify whether or not a file path exists.
Zones ¶
PDG automatically determines the local Zone that matches your workstation’s platform: LINUX
, WIN
, or MAC
.
-
You can override this with parameters on the Scheduler nodes, which apply to all jobs scheduled by the Schedulers.
-
You can globally override this with the environment variable
$PDG_PATHMAP_ZONE
. -
Custom zones are useful for more complex farm set-ups. For example, a hybrid cloud involving
AWS
andLINUX
. -
The special
*
Zone applies to all platforms.
Match Type ¶
The match type for a path map entry determines how the entry should be matched with an input string that’s being mapped. If the match type is set to Prefix
, the mapping rule only applies if the mapping rule’s Source Path appears at the beginning of the input string. Conversely, if the match type is set to Suffix
, the mapping rule is only applied if the path appears at the end of the input string. Finally, the Contains
match type indicates that rule should always apply to input paths even if it’s found in the middle of the path.
PDG Path Map window ¶
To... | Do this |
---|---|
Open the PDG Path Map window |
|
Zone Controls ¶
-
adds a new zone to your PDG path map.
-
removes the selected zone.
Table Controls ¶
-
adds a new mapping to the table.
-
removes the selected mapping from the table.
The Path Map Table ¶
Zone
The name of the path mapping zone that this mapping maps to.
Match Type
Determines whether the path mapping rule should be match against the prefix, suffix, or anywhere within an input path.
Source Path
The path that is replaced.
Destination Path
The path that the Source Path is replaced with, when running in the given Zone.
-
loads the table from the contents of the clipboard.
-
copies the table contents to the clipboard as JSON.
Sorting ¶
The PDG Path Map table first sorts by Created by to group all the schedulers together. Then, it sorts by Zone.
API ¶
You can access the Path Map Python API through pdg.PathMap.
Porting from 18.0 ¶
Scheduler nodes from a previous version of Houdini are automatically set to the None
mode of path mapping, which disables the path mapping logic and instead relies on paths being delocalized
with the tokens __PDG_DIR__
, __PDG_TEMP__
.
If you do not require path mappings, you can set this to Global
.
If you require path mappings, you should add them with the PDG Path Map and then set it to Global
.