[Radiance-general] rpiece and parallel processing

Thomas Seebohm [email protected]
Thu, 13 Jun 2002 12:36:45 -0400


Here is part of a recent exchange with Greg Ward on this subject:

Hi Greg,

When I first started to use rpiece I thought it would automatically start up

separate processes but then I realized that the processes I started were all

on the same processor. I don't know where to find the option in rpiece to
start parallel processes. I could not find it in the manual. ..... As for
the -PP option, I included it with a file name and
noticed that Radiance put something into the file when I checked after a run

but it was only one entry, I think. ............

Thomas
----------------------------------------------------------------------
Hi Thomas,

To run rpiece on a machine with 4 processors, do like so:

% rpiece -X 10 -Y 10 -F syncfile -o output.pic -PP mach1.pst -af ambfile
[rpict options] octree &
# wait 10 seconds or so for the first process to load the octree, then:
% rpiece -F syncfile -o output.pic -PP mach1.pst octree &
% rpiece -F syncfile -o output.pic -PP mach1.pst octree &
% rpiece -F syncfile -o output.pic -PP mach1.pst octree &

The first invocation initializes the synchronization file and starts the
initial rpict process.  The rpict process then forks itself and waits
for another process to attach to it via the named pipes in mach1.pst.
This is why you don't need to specify the rpict options on subsequent
invocations.  However, you need to invoke rpiece once for each separate
rendering process, and that is how it's supposed to work.

To run rpiece on another machine sharing the same directory over NFS,
execute:

% rpiece -F syncfile -o output.pic -af ambfile [rpict options] octree &

If that machine also has multiple processors, add a -PP option to the
first invocation, this time giving it a unique name for that machine,
and add one invocation as above for each additional processor, assuming
you want as many rpict processes running as you have processors.

Is that clear enough?
-Greg