rtrace parallelization

Hi,

I need to perform some rtrace calculations for big number of points and
rather high calculation parameters, so I'm trying to use the full potential
of dual core machines.
I saw that for example rvu or rad programs have option -n or -N to define
number of parallel processes to be started. Is similar parallelization
possible in rtrace program?
I've found "-PP pfile" option but I'm not sure how to use it. I supposed
that "pfile" should be empty so program can write into it some control
variables. When I started rtrace with -PP option 2 processes are created:
one for my rtrace and one child rtrace process with the same parameters.
When I tried to explore running processes it seems that only the first one
is really running, while the second one is sleeping - so I don't have real
paralellization here.

I suppose I haven't understood something well, so if someone has the
experience with rtace running on multiprocessor machines, please send me
some ideas/hints.

Happy holidays to all list members and their families,
Marija

Hi!

I've found "-PP pfile" option but I'm not sure how to use it. I supposed that "pfile" should be empty so program can write into it some control variables. When I started rtrace with -PP option 2 processes are created: one for my rtrace and one child rtrace process with the same parameters. When I tried to explore running processes it seems that only the first one is really running, while the second one is sleeping - so I don't have real paralellization here.

You can attach more processes by starting them with the same -PP-option. Sp if you had "rtrace (other rtrace-options) -PP control.pfile" started, just start one more "rtrace -PP control.file", but leave the other rtrace options empty as the second (or third or forth) process will use the same as the first one. Hopes that works, as it is a while since I did that and I have no example to start here.

CU Lars.

Hi Lars,

I followed your advice but still first rtrace is running and other rtrace
processes are sleeping.

When I run two separate rtrace processes without -PP option and with
different input data they both run in parallel without a problem.
I suppose I'm doing something wrong, so other ideas are welcome!

Marija

···

On Mon, Dec 22, 2008 at 2:06 PM, Lars O. Grobe <[email protected]> wrote:

Hi!

I've found "-PP pfile" option but I'm not sure how to use it. I supposed
that "pfile" should be empty so program can write into it some control
variables. When I started rtrace with -PP option 2 processes are created:
one for my rtrace and one child rtrace process with the same parameters.
When I tried to explore running processes it seems that only the first one
is really running, while the second one is sleeping - so I don't have real
paralellization here.

You can attach more processes by starting them with the same -PP-option. Sp
if you had "rtrace (other rtrace-options) -PP control.pfile" started, just
start one more "rtrace -PP control.file", but leave the other rtrace options
empty as the second (or third or forth) process will use the same as the
first one. Hopes that works, as it is a while since I did that and I have no
example to start here.

CU Lars.

Hi Marija,

The -PP option only allows for memory to be shared between processes on a multi-core machine, however this is not at all essential for parallelization for radiance jobs. The -PP option does not distribute the rays to be traced between multiple processes. That is whys currently you see only one process actually doing any work.

I think that there are probably a few different ways to distribute rays to multiple rtrace processes (using memory sharing or not). The basic idea is to take the view or grid points that you want to calculate and subdivide. This subdivision could be in terms of the number of cores and or machines available. So lets assume that you have 2 machines with 2 cores available, thus 4 cores. So if you divide your grid 2x2, then you could do something like the following (lots of ways to run rtrace so there are other approaches):

FROM A SHARED NFS DIRECTORY on Machine 1 and 2 AND using memory sharing:

On Machine 1:

    rtrace [parameters] -PP m1.pp scene.oct < points.1.1 >
    points.1.1.output
    rtrace [parameters] -PP m1.pp scene.oct < points.1.2 >
    points.1.2.output

On Machine 2:

    rtrace [parameters] -PP m2.pp scene.oct < points.2.1 >
    points.2.1.output
    rtrace [parameters] -PP m2.pp scene.oct < points.2.2 >
    points.2.2.output

When all the jobs are complete then you will need to use other radiance tools to recombine your output into one file. Since you know the indices of each subset of points this should not be too difficult.

I think that this approach should work. We typically do something similar when distributing jobs using rpiece. I hope this helps.

-Jack

Marija Velickovic wrote:

···

Hi Lars,

I followed your advice but still first rtrace is running and other rtrace processes are sleeping.

When I run two separate rtrace processes without -PP option and with different input data they both run in parallel without a problem.
I suppose I'm doing something wrong, so other ideas are welcome!

Marija

On Mon, Dec 22, 2008 at 2:06 PM, Lars O. Grobe <[email protected] > <mailto:[email protected]>> wrote:

    Hi!

        I've found "-PP pfile" option but I'm not sure how to use it.
        I supposed that "pfile" should be empty so program can write
        into it some control variables. When I started rtrace with -PP
        option 2 processes are created: one for my rtrace and one
        child rtrace process with the same parameters. When I tried to
        explore running processes it seems that only the first one is
        really running, while the second one is sleeping - so I don't
        have real paralellization here.

    You can attach more processes by starting them with the same
    -PP-option. Sp if you had "rtrace (other rtrace-options) -PP
    control.pfile" started, just start one more "rtrace -PP
    control.file", but leave the other rtrace options empty as the
    second (or third or forth) process will use the same as the first
    one. Hopes that works, as it is a while since I did that and I
    have no example to start here.

    CU Lars.

------------------------------------------------------------------------

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general
  
--
# Jack de Valpine
# president
#
# visarc incorporated
# http://www.visarc.com
#
# channeling technology for superior design and construction

There are a couple of very basic example here:
http://web.mac.com/geotrupes/iWeb/Main%20site/RadBlog/RadBlog.html
The idea is to subdivide larger grids into smaller grids and use bash or xgrid if you have an apple to run all in parallel. I think you'll find three posts about this. Good luck!

I just take the opportunity a little earlier than is supposed to be... but nevertheless...
Merry Christmas and Happy New Year to all the Radiance friends!
G/

···

On 22 Dec 2008, at 12:56, Marija Velickovic wrote:

Hi,

I need to perform some rtrace calculations for big number of points and rather high calculation parameters, so I'm trying to use the full potential of dual core machines.
I saw that for example rvu or rad programs have option -n or -N to define number of parallel processes to be started. Is similar parallelization possible in rtrace program?
I've found "-PP pfile" option but I'm not sure how to use it. I supposed that "pfile" should be empty so program can write into it some control variables. When I started rtrace with -PP option 2 processes are created: one for my rtrace and one child rtrace process with the same parameters. When I tried to explore running processes it seems that only the first one is really running, while the second one is sleeping - so I don't have real paralellization here.

I suppose I haven't understood something well, so if someone has the experience with rtace running on multiprocessor machines, please send me some ideas/hints.

Happy holidays to all list members and their families,
Marija
_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com