problem with parallel foreach
Gerald Jansen via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 13 07:11:23 PDT 2015
On Wednesday, 13 May 2015 at 11:33:55 UTC, John Colvin wrote:
> On Tuesday, 12 May 2015 at 18:14:56 UTC, Gerald Jansen wrote:
>> On Tuesday, 12 May 2015 at 16:35:23 UTC, Rikki Cattermole
>> wrote:
>>> On 13/05/2015 4:20 a.m., Gerald Jansen wrote:
>>>> At the risk of great embarassment ... here's my program:
>>>> http://dekoppel.eu/tmp/pedupg.d
>>>
>>> Would it be possible to give us some example data?
>>> I might give it a go to try rewriting it tomorrow.
>>
>> http://dekoppel.eu/tmp/pedupgLarge.tar.gz (89 Mb)
>>
>> Contains two largish datasets in a directory structure
>> expected by the program.
>
> I only see 2 traits in that example, so it's hard for anyone to
> explore your scaling problem, seeing as there are a maximum of
> 2 tasks.
The problem is already evident with 2 traits: the Elapsed time is
about doubled for the D version whereas it is practically
unchanged for the Python version.
But just for fun here are 4 traits:
http://dekoppel.eu/tmp/pedupgLarge.tar.gz (109 Mb)
If you need even more traits, you can just make copies of the
wrk/mil directory, make empty directories with the same name in
(eg. log/mi4) and add the names on the first line of file
wrk/run_traits. To run a single trait, just remove all names
except mil from that file.
More information about the Digitalmars-d-learn
mailing list