# Executing gen\_dc,	gen\_directsunlight on multiple processors

**URL:** <https://discourse.radiance-online.org/t/executing-gen-dc-gen-directsunlight-on-multiple-processors/906>\
**Category:** radiance-general\
**Created:** [September 1, 2011, 7:08pm UTC](https://discourse.radiance-online.org/t/executing-gen-dc-gen-directsunlight-on-multiple-processors/906 "2011-09-01T19:08:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mostapha](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/mostapha/32/801_2.png) [@Mostapha](https://discourse.radiance-online.org/u/Mostapha)\
**Post date:** [September 1, 2011, 7:08pm UTC](https://discourse.radiance-online.org/t/executing-gen-dc-gen-directsunlight-on-multiple-processors/906/1 "2011-09-01T19:08:56Z")

</div>

Hi,

I wonder if anybody know how I can run DAYSIM commands such as gen\_dc and  
gen\_directsunlight on multiple processors.

My understanding is both of them are sort of rtrace command so using -n  
option shouldn't be impossible.

Thanks,  
Mostapha

---

<div class="post-metadata">

**Author:** ![Greg\_Ward](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/greg_ward/32/471_2.png) [@Greg\_Ward](https://discourse.radiance-online.org/u/Greg_Ward)\
**Post date:** [September 30, 2011, 11:37pm UTC](https://discourse.radiance-online.org/t/executing-gen-dc-gen-directsunlight-on-multiple-processors/906/2 "2011-09-30T23:37:03Z")

</div>

I guess I didn't read Jan's post very carefully, or I might have responded to his question about limits to the rtrace -n option. There are no encoded limits. As far as performance on many cores, I've gotten linear speedups with up to 24 processes, which is as many as I'm able to test. The -x option will kill performance if not combined with -y, since it has to flush after the given number of rays, which means clearing the queue that often.

The -af setting IS important to rtrace -n if you set -ab \> 0 and -aa \> 0 also. This is true of all parallel processes in Radiance.

Cheers,  
-Greg

> **···**
>
> > From: Mostapha Sadeghipour \<sadeghipour@gmail.com\>  
> > Date: September 30, 2011 4:20:38 PM PDT
> > 
> > Hi Chris, Rob and Jan,
> > 
> > Hopefully this option will be added in the near future. For know I would like to share the solution I came up with. To have the result on time I ran multiple simulations at the same time instead of using multiple CPU's for one simulation.
> > 
> > It's true that you cannot use multiple CPU's to run DAYSIM commands, but there is no reason not to run multiple DAYSIM commands on one system as far as you have enough RAM. So you can divide the sensors and run them at the same time on one system. This simple trick saved me a huge amount of time.
> > 
> > Have a good weekend,  
> > Mostapha
> > 
> > On Thu, Sep 1, 2011 at 2:19 PM, Jan Wienold \<jan.wienold@ise.fraunhofer.de\> wrote:  
> > Hi Mostapha,
> > 
> > the -n option for multiple-core usage as it is implemented into rtrace is not working for rtrace\_dc. In the (still unofficial) version of rtrace\_dc of daysim 3.1, the -n is supported but unfortunately does not have any impact on the calculation speed... ☹ . I've tested that already. So with the current version it doesn't make sense to use this option and block the other cores.  
> > Maybe a later version supports this option.
> > 
> > Christoph: An ambient file is not necessary for -n.
> > 
> > By the way, does anybody know, if there is a limit for the -n option in rtrace?  
> > I tested it on my new 48(!!) core machine, but couldn't use more than 9 cores, the other processes are existent but don't use any cpu-time....
> > 
> > Jan
> > 
> > Am 01.09.2011 21:08, schrieb Mostapha Sadeghipour:
> > 
> > > Hi,
> > > 
> > > I wonder if anybody know how I can run DAYSIM commands such as gen\_dc and gen\_directsunlight on multiple processors.
> > > 
> > > My understanding is both of them are sort of rtrace command so using -n option shouldn't be impossible.
> > > 
> > > Thanks,  
> > > Mostapha
