[Radiance-general] running rtrace in parallel?

giulio antonutto at yahoo.it
Fri Oct 16 10:24:40 PDT 2009


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
> <Robert.Guglielmetti at nrel.gov> wrote:
>> On 10/15/09 2:13 PM, "Ery Djunaedy" <ery.mailinglist at gmail.com>  
>> 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
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general




More information about the Radiance-general mailing list