Microsoft KB Archive/162638

= Microsoft Knowledge Base =

Distributed Rendering Across IRIX and NT Platforms SI3D 3.51
Last reviewed: April 22, 1997

Article ID: Q162638

The information in this article applies to:


 * Softimage 3D for IRIX, version 3.51
 * Softimage 3D for Windows NT, version 3.51

SUMMARY
In SOFTIMAGE 3D, all files that compose a scene are normally placed in a given database. Problems occur when references to files external to the database are kept within a scene (for example, picture files taken from another machine on the network). SOFTIMAGE 3D (SI3D) uses the linktab.ini translation table as a way to locate files (references) from other locations.

This article discusses the following:


 * WHAT IS THE linktab.ini FILE?
 * WHEN IS THE linktab.ini FILE REQUIRED?
 * WHEN THE linktab.ini FILE IS NOT REQUIRED
 * USING THE linktab.ini FILE - IRIX REQUIREMENTS - NT REQUIREMENTS - EXAMPLE linktab.ini FILE
 * PROBLEMS AND LIMITIONS FOR linktab.ini
 * CHECKLIST TO ENSURE SUCCESS
 * TROUBLESHOOTING
 * CONFIGURING linktab.ini FOR DISTRIBUTED RENDERING - NT TO NT DISTRIBUTED RENDERING - IRIX TO NT DISTRIBUTED RENDERING

MORE INFORMATION
WHAT IS THE linktab.ini FILE?

The linktab.ini file lets you specify a set of rules that translates IRIX pathnames to NT pathnames, and vice versa (it can also be used to translate pathnames between two NT hosts when the software is installed at different locations). The linktab.ini file also provides SI3D NT with the necessary information to locate and load files that are either on a remote machine or are installed at a different location on the current machine. This file is also used when saving scenes from an NT machine.

WHEN IS THE linktab.ini FILE REQUIRED?

The following are functions that require the linktab.ini file:


 * NT to IRIX, or IRIX to NT mental ray network rendering with shaders.
 * Moving a scene from one machine to another (i.e. .pic files stored outside of a database, or moving scenes from NT to IRIX)
 * Sharing databases between IRIX and NT
 * NT to NT distributed rendering when mental ray and shaders are installed in different locations

WHEN THE linktab.ini FILE IS NOT REQUIRED

The following are functions that do not require the linktab.ini file:


 * IRIX to IRIX scene sharing and rendering
 * IRIX to NT or NT to IRIX mental ray rendering without shaders
 * NT to NT mental ray distributed rendering when SI3D and all databases are at the same location on each machine.

USING THE linktab.ini FILE

The IRIX version of SI3D and mental ray generate UNIX format path information, in addition, the IRIX version of mental ray is dependent on paths being in UNIX format. Therefore, it is the responsibility of the NT version of SI3D to:


 * translate an IRIX path to the corresponding NT path (to reference or move scenes and distribute mental ray rendering tasks from an IRIX machine), and
 * translate an NT path back to the correct IRIX path (to send scenes and mental ray rendering tasks to an IRIX machine).

The linktab.ini file contains the rules for the path translation that make the above functions possible.

IRIX REQUIREMENTS

On IRIX machines, you must export the file systems that contain the following directories (assuming that the render is not initiated from the IRIX machine):


 * Database location(s)
 * Image locations (if stored outside the databases)
 * A .rayhosts file, on the machine that initiates the render, that contains a list of slaves that will take part in the distributed render. One host name per line, excluding your own host name. This file is located in your HOME directory.

NT REQUIREMENTS

You must have a .rayhosts file on the machine that initiates the render. This file is located in your HOME directory (usually C:\USERS\%USERNAME%) and contains a list of all the machines that will take part in the distributed render. Your .rayhosts file must contain only one host name per line, excluding the machine that initiates the render. The HOME variable is defined in the setenv.bat file on NT machines and in the .softimage file on IRIX machines. This directory is necessary for mental ray to find the .rayhosts file. For IRIX, you can put IP addresses in the .rayhosts  file instead of host names. For NT, you must use host names. To reduce the time it takes to locate the hosts on the network, you can add entries in your hosts file (located in %WINDIR%\SYSTEM32\DRIVERS\ETC).

On NT machines you connect the exported IRIX directories to an assigned drive letter through the File Manager or Windows Explorer. This assigns an NT drive letter to the location of each exported NFS location on the IRIX machine. These locations are the entries that you make in the linktab.ini file.

You must also ensure LM_LICENSE_FILE and SI_LOCATION system environment variables are set in the Control Panel/System application.

On NT machines, rules must be created in the linktab.ini file for the following situations:


 * Databases
 * Image libraries (if stored outside of databases)
 * Shader libraries (if using mental ray rendering)
 * SI3D resource (rsrc) directory (if using mental ray rendering)

EXAMPLE linktab.ini FILE

Create a linktab.ini file similar to the following and place it in %SI_LOCATION%: This file must exist on each NT machine that takes part in a distributed render, regardless of whether it is the master or slave. The Master is the machine that initiates the render, while the Slaves are the machines that take part in the render.

This example is based on PC-NFS protocol, different NFS software will give you different mapping parameters.

D:/!351RC2/3D/bin/rsrc       /usr/softimage/351_RC2/3D/rsrc/ cs2.cs:/usr/local2/databases    /usr/local2/databases/ \\server\share\database      /home/people/database/ D:/!351RC2/mental_ray/MR_Shaders

/usr/softimage/351_RC2/mental_ray/MR_Shaders/



The first line ensures the translation of the SI3D resource directory. The second line ensures the translation of a number of scene databases that are stored in a common directory. You require the third line if the databases reside on another NT server, and there are no IRIX machines involved in the rendering. The fourth and last line in this case ensures the translation of the mental ray shaders directory. The mental ray shader path must be the last line of the linktab.ini file.

The "!" indicates that only that portion of the path should be looked up in the current list of NFS networked drives. Note that the first path argument of each line is the NT path, while the second path argument on each line is the UNIX equivalent. Ideally, if all the databases that the linktab.ini file referenced were in a single location, entering each database in the table would be eliminated.

PROBLEMS AND LIMITATIONS FOR linktab.ini

 When you are rendering on a homogeneous network of NT machines, you will need a linktab.ini file if mental ray shaders are not installed in the same location on each NT machine (if you are rendering between NT and IRIX then this is not an issue). On NT machines, if the drive or path name to the location of the software is changed on one machine, then all the machines must have a linktab.ini file that will map all the installations correctly. Otherwise they will not be capable of partaking in mental ray distributed rendering.  mental ray distributed rendering will not work if: - the mental ray shader path is not the last line of the linktab.ini file. - the last line defines the mental ray shader path and there is more that one hard return at the end of the line. - the last line defines a database path and there is no hard return at     the end of the line. - the left column path does not contain a "!" - the rsrc path definition is not the first line in the file - the case (upper / lower) in the linktab.ini file does not match that in the DatabaseSys.rsrc or DatabaseDir.rsrc 

When the above conditions are not met, the following is a typical error message:

ray error:DLL "D:/351RC2/mental_ray/MR_Shaders/Shader_Gifts/lib/ari_shaders.so" not found system error message: No error

CHECKLIST TO ENSURE SUCCESS


 * Add a slash (/) at the end of the exported directories.
 * Make sure that the case matches for all the directories.
 * Make sure the entry for mi-ray in /etc/services is identical on each host (NT and IRIX)
 * Use SI3D version 3.51 on both NT and IRIX
 * Make sure that all partitions listed in the linktab.ini file are properly mounted and functional on the NT machine.
 * Check permission access to all remote locations.
 * Make sure the databases defined in the DatabaseSys.rsrc are located on one of the local drives.
 * You must have copies of the appropriate architecture shader database for each platform. Unlike scene databases, shader databases cannot be shared across system architectures. The names for the shader databases must be identical when transferring scenes between NT and IRIX!

Remember: the matching process is done from top to bottom. A rule of thumb

is to place the longest matching UNIX path first. The following is an example of a linktab.ini file that contains conflicting rules:

sgi1:/mnt1/allusers!user2   /home sgi2:/home/people/user3     /home/people/user3 In this example, when SI3D loads a scene that references the path "/home/people/user3", the first rule is applied which results in an invalid path like "h:/user2/people/user3". This erroneous result would not occur if you had entered the longest UNIX path first in the table.

TROUBLESHOOTING

 By presetting the environment variable SI_LINKTAB_DEBUG to '1' in the setenv.bat file, the translation process that is done according to the linktab.ini rules, is output to a 'SI3D command prompt'. This allows you to see all the current translation information (including errors in your rules) that is used by SI3D to match corresponding IRIX and NT file names. To get the NT drive tables, from the SI3D command prompt you can also run the command: soft linktab To avoid building a table with conflicting rules always place the longest matching UNIX path first in the linktab.ini file; they are the most restrictive and should be processed first. (Enter the most specific rules first followed by more general rules). The entries you make in the linktab.ini file are case sensitive in relation to the DatabaseSys.rsrc file. For example, if the drive letter is lowercase in the DatabaseSys.rsrc file, then it must also be lowercase in the linktab.ini.</li></ul>

If you are trying to distribute mental ray rendering tasks across platforms and it fails, try the following:

 Make sure you have the LM_LICENSE_FILE variable set in the system environment variables. Without it, mental ray is not able to acquire a license and fails. Check the FLEXlm log file on the FLEXlm server to see if any licenses were denied or granted first. If no requests were denied or granted, then check the LM_LICENSE_FILE. If requests were denied, then make sure you have enough licenses for all mental ray threads.</li> You can edit the setenv.bat file and add the "-log on" flag to the ray.exe executable (The SI_MI_TRACER variable). For IRIX, edit the .softimage file and change the same environment variable. This will generate a log file on the master machine for each mental ray thread.</li> Generate a .mi file on one host, transfer it to the other, and then attempt to render the .mi file using mental ray from the command line ("ray.irix5 -log on" on IRIX, "ray.exe -log on" on NT). This allows you to examine the linktab.ini translation rules, verify that the rules do not conflict, as well as having a log file for further diagnostic purposes.</li> Both SI3D and mental ray expect to find the linktab.ini file in the directory that the SI_LOCATION environment variable points to. If this environment variable is not set correctly, SI3D is unable to locate the linktab.ini file. To distribute mental ray rendering tasks, this variable must be set as a 'system' environment variable.</li> Mental Ray communicates on a specific TCP port. The port must be the same on all machines involved in rendering. Search for the following entry in your services file: mi-ray 7001/tcp. The services file can be found in the /etc/ directory under IRIX, and the %windir%\system32\drivers\etc directory on NT.</li>  If you are creating the .mi file on NT, to access file and path information, enter the command: type |more The following information is displayed: - The # Generation of 'LINK' statements heading contains the path names that are being used for shaders. - The # Generation of 'DECLARE' statements heading contains the location of the rsrc file and texture files. </li></ul>

The output "pic" line contains the final location of the rendered picture.

You should not edit the .mi file as it contains binary data.

CONFIGURING linktab.ini FOR DISTRIBUTED RENDERING

NT to NT DISTRIBUTED RENDERING
Remember: On NT machines, if the drive or path name pointing to           SI_LOCATION is changed on one machine, then all the machines must have a linktab.ini file to map each other's installation correctly and thus be able to perform mental ray distributed rendering. The following table is an example of typical NT machine configurations and what is required for NT to NT rendering when mental ray is installed in different locations.


 * NT Machine 1 either initiates the mental ray render, or creates the .mi file that will be rendered on Machine 2.
 * Machine 2 is either the slave (takes part in the render initiated by Machine 1), or renders the .mi file created by Machine 1.

<Due to the limitations of the Knowledge Base production software, it was

not possible to configure the following two examples - NT to NT and IRIX to NT DISTRIBUTED RENDERING - in a table. Had it been possible, Machine 1 and Machine 2 and their respective path configurations would have appeared opposite from one another, thus providing a visual representation of the linktab.ini file requirements.>

Machine 1, Master NT Machine Name: STARSKY SOFTIMAGE is installed: C:\SOFT3D_3.51 Databases: C:\Databases Shared as \\STARSKY\DATABASES

File, C:\SOFT3D_3.51\3D\bin\rsrc\DatabaseSys.rsrc

DATABASE Shader_Gifts PATH C:\SOFT3D_3.51\mental_ray\MR_Shaders\Shader_Gifts TYPE SHADERLIB DATABASE Shader_Lib PATH C:\SOFT3D_3.51\mental_ray\MR_Shaders\Shader_Lib TYPE SHADERLIB

If STARSKY is the master and HUTCH is the Slave:

File, C:\SOFT3D_3.51\linktab.ini

C:\!SOFT3D_3.51  /softimage

File, C:\USERS\%USERNAME%\.rayhosts (note the dot!)

HUTCH

If STARSKY generates the .mi file, and it is rendered on HUTCH:

File, C:\SOFT3D_3.51\linktab.ini

C:\!Databases       /databases C:\!SOFT3D_3.51         /softimage

File, C:\USERS\%USERNAME%\.rayhosts       None needed Machine 2, Slave NT           Machine Name: HUTCH SOFTIMAGE is installed: D:\3DRC2 Databases: none \\STARSKY\DATABASES is connected to F:

File, D:\3DRC2\3D\bin\rsrc\DatabaseSys.rsrc

DATABASE Shader_Gifts PATH D:\3DRC2\mental_ray\MR_Shaders\Shader_Gifts TYPE SHADERLIB DATABASE Shader_Lib PATH D:\3DRC2\mental_ray\MR_Shaders\Shader_Lib TYPE SHADERLIB

If STARSKY is the master and HUTCH is the Slave:

File, D:\3DRC2\linktab.ini

D:\!3DRC2                /softimage

If STARSKY generates the .mi file, and it is rendered on HUTCH:

File, D:\3DRC2\linktab.ini

\\STARSKY\DATABASES   /databases D:\!3DRC2             /softimage If the mental ray shaders are NOT stored locally, but are on a shared drive, when referencing them in the linktab.ini file, make sure to use the UNC naming convention and not the drive letter they are mapped to. When mental ray connects to a slave machine it does not use the same environment as the one it is currently logging on to, therefore the drives are not mapped. For example, all machines access shaders from a main file server called ELVIS. The shaders are in the shared directory called SHADERLIB (readable by everyone) on ELVIS. In this case, the last line in the linktab.ini file (on all machines) must contain the following:

\\ELVIS\SHADERLIB    /shaderlib

IRIX to NT DISTRIBUTED RENDERING
The following table is an example of IRIX to NT machine configurations and the requirements for cross platform rendering.


 * Machine 1 is the Machine that either initiates the mental ray render, or creates the .mi file to be rendered on Machine 2.
 * Machine 2 is either the slave (takes part in the render started by Machine 1), or renders the .mi file created by Machine 1.

Machine 1, Master IRIX Machine Name: KLAATU Softimage is installed: /usr/softimage Databases: /home/people/databases /home/people is:

Exported -rw and Shared as \\KLAATU\homes (Samba)
Machine 2, Slave NT          Machine Name: GORT Softimage is installed: C:\SOFT3D_3.51 Databases: none

If KLAATU is the master and GORT is the Slave:

File, C:\SOFT3D_3.51\linktab.ini

C:\!SOFT3D_3.51\3D\bin\rsrc   /usr/softimage/3D/rsrc C:\!SOFT3D_3.51\mental_ray   /usr/softimage/mental_ray

If KLAATU generates the .mi file, and it is rendered on GORT:

File, C:\SOFT3D_3.51\linktab.ini

C:\!SOFT3D_3.51\3D\bin\rsrc      /usr/softimage/3D/rsrc \\KLAATU\homes!databases        /home/people/databases (Samba) klaatu:/home/people!databases   /home/people/databases (PCNFS) C:\!SOFT3D_3.51\mental_ray      /usr/softimage/mental_ray