next up previous contents
Next: 1.2 Free-Form Surfaces Up: 1. Functionality Previous: 1. Functionality

1.1 Parallelism

mental ray has been designed to take full advantage of parallel hardware. On multiprocessor machines that provide the necessary facilities, it automatically exploits thread  parallelism where multiple  threads of execution access  shared memory. No user intervention is required to take advantage of this type of parallelism. mental ray is also capable of exploiting thread and  process level parallelism where multiple threads or processes cooperate in the rendering of a single image but do not share memory. This is done using a  distributed shared database that provides demand-driven transparent sharing of database items on multiple systems.1.1 This allows parallel execution across a network of computers, and on multiprocessor machines which do not support thread parallelism.

A queue of tasks to be executed in parallel is generated by subdividing the screen space. Each task consists of a rectangular portion of the screen to be rendered. A rendering  process, whether on the machine where mental ray was started or on some remote host, requests tasks from this queue and renders the corresponding portion of the image. Faster processes will request and complete more tasks than slower processes during the course of rendering an image, thus balancing the load. The same task-based adaptive load distribution is also used for a variety of other parallel computations in mental ray, such as tessellation of free-form surfaces. mental ray keeps track of the actual distribution to ensure that related tasks, even if they are part of different computations, are performed on the same host to make optimal use of the distributed shared database with a minimum of network traffic.

The host that reads or translates the scene, or runs client application such as a front-end application software that mental ray is integrated in, is called the client host. The client host is responsible for connecting to all other hosts, called server hosts. A server host may also act as client host if an independent copy of mental ray is used by another user; systems do not become unavailable for other jobs if used as servers. However, running a mental ray server on a host may degrade the performance of independent interactive application programs such as modelers on that host significantly.

The list of hosts to connect to is stored in the .rayhosts file. The first existing file of .ray2hosts, .rayhosts, $HOME/.ray2hosts, $HOME/.rayhosts is used as .rayhosts file. Each line contains a hostname with an optional colon-separated port number of the service to connect to and an optional whitespace-separated parameter list that is passed to the host to supply additional command line parameters. Only the following parameters are supported here: -threads, -c_compiler, -c_flags, -c_linker, and -ld_libs. See the chapter on Command Line Options for a description of these parameters. The first line that literally matches the name of the host the client runs on is ignored; this allows all hosts on the network to share a single .rayhosts file, each ignoring the first reference to itself. Only clients ever access the host list. If the -hosts option is given to mental ray, the .rayhosts file is ignored, and the hosts are taken from the command line. In this case, no hosts are ignored. The library version of mental ray may get its host list directly from the application.



Footnotes

... systems.1.1
The parallel rendering technology which is required for the support of distributed shared databases has been developed by mental images as part of the ESPRIT Project 6173 Design by Simulation and Rendering on Parallel Architectures (DESIRE). See [Herken 94].

next up previous contents
Next: 1.2 Free-Form Surfaces Up: 1. Functionality Previous: 1. Functionality
Copyright 2000 by mental images