comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Parallelise FOR loop in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Parallelise FOR loop in IDL [message #77756 is a reply to message #77680] Tue, 20 September 2011 07:21 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <j57e3h$9sv$1@speranza.aioe.org>,
Robin Wilson <robin@rtwilson.com> wrote:

> Hi,
>
> I have some IDL code like the following, which implements a Monte Carlo
> ray-tracing model:
>
>
> FOR i = 0, 1000 DO BEGIN
> ; Start a new ray from source
> ; Do all sorts of complicated processing on it
> ; Record where it lands
> ENDFOR
>
> I want to be able to run it for more iterations while still keeping it
> fairly fast. If I was writing this in C I'd use OpenMP to split the
> iterations of the loop between the available cores (as they are
> independent) and then use a reduction to join all of the records of
> where the rays end up together.

If it is trivially parallel, why not run, for example, ten separate IDL
jobs with

FOR i = 0, 99 DO BEGIN ...

Simple minded, but probably much easier to implement than a true
parallel solution.

Ken Bowman
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Onion Interview
Next Topic: West is Where!?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:00:58 PDT 2025

Total time taken to generate the page: 0.00413 seconds