Re: Parallel Processing [message #80617 is a reply to message #72824] |
Thu, 28 June 2012 10:02   |
stefan.meingast
Messages: 30 Registered: June 2012
|
Member |
|
|
Am Donnerstag, 28. Juni 2012 18:40:15 UTC+2 schrieb (unbekannt):
> On Thursday, June 28, 2012 10:05:24 AM UTC-4, stefan....@gmail.com wrote:
>> Hi
>>
>> I have developed a code which takes a couple of hours to run and I am aware of the fact that IDL automatically parallelizes some vector operations and one should prefer those instead of looping through arrays.
>>
>> I have done all that but still I know I could speed up things by a factor of 2 when I do certain things on 2 cores.
>>
>> For instance, somewhere in the program I pass some arrays to a function and this function then returns and equally large array with some calculated values. This is all done with one core since the operations in the function are not parallelized.
>>
>> However, I could split up the input arrays into to equally large parts and perform the calcualtions for each of those two on one core. In the end, when both are finished I could just concatenate the result-arrays.
>>
>> Is this possible in some easy way?
>>
>> thanks for your help :)
>
> Yeah, that sounds like it's what you want. Post back if it's not clear how to proceed. I use this stuff all the time for several big pipelines that I use, but it only works if you've got a relatively small amount of data to process (which may take a long time). Then you want repeat this procedure for many similar units of data.
>
> Russell
Hey
It works but I had to take a step back since I ran into some quite ridiculous problem...
It actually takes longer for IDL to set up, say, two child processes and then run them on separate cores as compared to running through 2 iterations on one core.
So I implemented the IDLbridge right at the beginning and separated the whole process into 2 substeps and not just this one step where I have to do one calculation.
If someone else should read this in the future:
It took me about 10 minutes to set up my first code to run on 2 cores without knowing ANYTHING about that stuff.
Here is what guided me through:
http://slugidl.pbworks.com/w/page/29199259/Child%20Processes
very easy
cheers
|
|
|