[Radiance-general] rpiece and parallel processing

Thomas Seebohm [email protected]
Fri, 14 Jun 2002 14:55:51 -0400


Hi Greg,

Yes, that is clear enough and it is essentially what I had in a C shell script. I
have now added a ten second wait after the first invocation as you suggest. The
script file is run like this
mrpiece n
where n + 1 is the number of invocations
and args2 is a file with all the arguments for rpiece.

Here is  the script I wrote (I am a beginner) to save invoking up to 16
processes:

#!/bin/csh -f
#
# script to execute rpiece $1 + 1 times
#
if ($#argv != 1)then#Script needs exactly one argument
 echo "Incorrect number of arguments"
exit 1
endif
sleep 10
rpiece -v @args2 &
set end=$1
@ x=0
while ($x < $end)
 @ x=$x + 1
      rpiece -v @args2 &
      echo $x
end
-------------------------
In the future I will add more arguments to provide more flexibility.

Thomas
p.s. a 70MB octree took less than two minutes to render at 1024 x1024 resolution,
medium quality and two bounces of indirect lighting using 11 processors.


>
> 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
>