On highly parallel Unix machines, it is recommended to set the stack size with the following shell command before starting 32-bit versions of mental ray:
limit stacksize 8192
The default may be 64 MB or higher, which means that the virtual memory limit is reached with 8 or 16 CPUs (depending on the machine type) because the 32-bit address space is shared by all CPUs. If virtual memory runs out, the kernel may be forced to kill mental ray threads, which may freeze execution. A stack size of 8192 (KB) is generous, 4096 is usually sufficient also. Every thread needs one stack. For systems with a large number of processors, such as 64 or 128, the virtual memory limit can be avoided altogether by using the 64-bit version of mental ray.
When a 32-bit Unix version of mental ray sees a stack size greater than 16 MB, it limits the stack size to 16 MB for all threads except the first one (which is already running), and prints a warning.
The problem does not arise on Windows NT because PCs only have small numbers of processors. mental ray always chooses a stack size of 4 MB on NT because there is no way to set it from a shell. Windows NT is not a 64-bit operating system.
Note that one should not plan on using more than a quarter of available virtual memory on stacks because the executable, heap storage, and normal and memory-mapped textures must also fit into virtual memory.