Is there a way to run rtrace in parallel? Or any tricks to speed up
the process.
I am running rtrace to create illumminance level on a plane. The
ambient file is already created from the previous runs, but still it
takes almost an hour to finish the whole plane.
You could break your grid into smaller pieces, and then start multiple
rtrace processes on different machines or cores, then merge the data back
into one "grid"...
Is there a way to run rtrace in parallel? Or any tricks to speed up
the process.
--
Robert Guglielmetti IES, LEED AP
Building Energy Efficiency Engineer
National Renewable Energy Laboratory (NREL)
1617 Cole Blvd, MS-5202
Golden, CO 80401 [email protected]
303.275.4319
Rob's suggestion is the best one at the moment. It is possible to make rtrace run things in parallel, but it hasn't really risen on my priority list as it would involve some major code modifications and there hasn't been a lot of demand for it.
Is there a way to run rtrace in parallel? Or any tricks to speed up
the process.
You could break your grid into smaller pieces, and then start multiple
rtrace processes on different machines or cores, then merge the data back
into one "grid"...
--
Robert Guglielmetti IES, LEED AP
Is there a way to run rtrace in parallel? Or any tricks to speed up the process.
You might want to take a look at Ilya's multithreaded / multiprocessor
scripts if you're running on a Linux/Unix/OSX system. There's a
multithreaded rpict and rtrace, called rpictmt and rtracemt. The
scripts split a task into smaller chunks, one per CPU core, then
stitch everything (pictures or points) back together.
Is there a way to run rtrace in parallel? Or any tricks to speed up
the process.
You could break your grid into smaller pieces, and then start multiple
rtrace processes on different machines or cores, then merge the data back
into one "grid"...
Just did the very same thing yesterday. On Unix "split" and "cat" will
chop the file for you and reassemble it in the right order.
This is the script I used (with a few untested improvements):
#!/bin/bash
## optional: create your octree here
oconv -w sky.rad scene.rad > scene.oct
## scene.pts is the file with all the grid points
lines=`wc -l scene.pts | awk '{print $1}'`
## we have 8 CPUs and don't care about responsiveness of the system
lines_per_file=`echo "(lines / 8\)\+1" | bc\`
mkdir \-p parts
rm \-f parts/\*
mkdir \-p parts\_out
rm \-f parts\_out/\*
split \-l {lines_per_file} scene.pts parts/part_
for pts in `find parts -type f`
do
echo "starting '\{pts\}' \.\.\."
\#\# obviously you can add rcalc to the command if you want
cat {pts} | rtrace -I -w -h OPTS scene\.oct > parts\_out/{pts}.dat &
done
wait
## compile everything to one file
cat parts_out/*.dat > scene.dat
## end of script
Regards,
Thomas
···
On Thu, Oct 15, 2009 at 9:19 PM, Guglielmetti, Robert <[email protected]> wrote:
Is there a way to run rtrace in parallel? Or any tricks to speed up
the process.
You could break your grid into smaller pieces, and then start multiple
rtrace processes on different machines or cores, then merge the data back
into one "grid"...
Just did the very same thing yesterday. On Unix "split" and "cat" will
chop the file for you and reassemble it in the right order.
This is the script I used (with a few untested improvements):
#!/bin/bash
## optional: create your octree here
oconv -w sky.rad scene.rad > scene.oct
## scene.pts is the file with all the grid points
lines=`wc -l scene.pts | awk '{print $1}'`
## we have 8 CPUs and don't care about responsiveness of the system
lines_per_file=`echo "(lines / 8\)\+1" | bc\`
mkdir \-p parts
rm \-f parts/\*
mkdir \-p parts\_out
rm \-f parts\_out/\*
split \-l {lines_per_file} scene.pts parts/part_
for pts in `find parts -type f`
do
echo "starting '\{pts\}' \.\.\."
\#\# obviously you can add rcalc to the command if you want
cat {pts} | rtrace -I -w -h OPTS scene\.oct > parts\_out/{pts}.dat &
done
wait
## compile everything to one file
cat parts_out/*.dat > scene.dat