running rtrace in parallel?

All,

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.

Thanks,

Ery

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

···

On 10/15/09 2:13 PM, "Ery Djunaedy" <[email protected]> wrote:

All,

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.

Cheers,
-Greg

···

From: "Guglielmetti, Robert" <[email protected]>
Date: October 15, 2009 1:19:23 PM PDT

On 10/15/09 2:13 PM, "Ery Djunaedy" <[email protected]> wrote:

All,

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

Ery,

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.

http://www.bakharev.org/index.php?option=com_content&task=view&id=23&Itemid=40

--Dave

Hi Ery.

All,

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_

OPTS="-ab 6 -aa .1 -ar 2048 -ad 4096 -as 256 -av 0 0 0"

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:

On 10/15/09 2:13 PM, "Ery Djunaedy" <[email protected]> wrote:

among other things, please also see my attempts:
http://web.mac.com/geotrupes/iWeb/Main%20site/RadBlog/94A6934D-32E4-4557-8DCF-E5FE51C3FE1E.html
and
http://web.mac.com/geotrupes/iWeb/Main%20site/RadBlog/E549E7F4-6DA2-4D78-8F91-74A4691ED86A.html
good luck!
G

···

On 16 Oct 2009, at 10:01, Thomas Bleicher wrote:

Hi Ery.

On Thu, Oct 15, 2009 at 9:19 PM, Guglielmetti, Robert > <[email protected]> wrote:

On 10/15/09 2:13 PM, "Ery Djunaedy" <[email protected]> >> wrote:

All,

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_

OPTS="-ab 6 -aa .1 -ar 2048 -ad 4096 -as 256 -av 0 0 0"

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

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general