Hi,

I've managed to get this to the point that I've a new, working distribution 
based on BlockDist which distribution is dictated by the passed policy object. 
Performance is suboptimal and it lacks many features I need, though...

I've written a policy which constructor takes array of reals as an argument, 
which describes relative number of array cells assigned to each locale. It also 
takes an array of locales, both in the same domain so that indices match.

The thing that seems to cause the most unnecessary performance penalty is that 
locales don't have a local copy of the policy object. I guess this issue should 
be addressed in the privatization functions?

Also for there to be much use for variable distribution (at least for me) there 
should be a way to easily take execution times on each locale. The most 
important would be to time how long it takes to execute forall loop on locales, 
and get an array with times. What do you think would the best way to implement 
this?

John

30.01.2015, 20:33, "Vassily Litvinov" <[email protected]>:
> Hello,
>>  class MyDist {
>>       var policy;
>>       ...
>>       proc MyDist(policy, ...) {
>>           // Is the following line necessary?
>>           this.policy = policy;
>>       }
>>  }
>
> I am not sure what this gives you. However, if it works better than
> having all policy code right in MyDist, by all means go for it.
>
> For a generic field like 'policy' above, it is automatically initialized
> from like-named constructor argument, so that line is not necessary.
>>  Another question: In block distribution, the local blocks (domain is 
>> LocBlockDist.myChunk) don't cover just the bounding box, but rather the 
>> whole space representable by the used index type and rank. Brad already 
>> wrote about this, but would you mind expanding a bit on this issue? I did 
>> use the BlockDist as a starting point for MyDist, and have rewritten the 
>> chunk calculation. I did a test where I changed myChunks to cover just the 
>> bounding box and my test programs didn't break, so where is this actually 
>> needed?
>
> Correct, our BlockDist specifies index-to-locale mapping regardless of a
> specific domain. This mapping extends to infinity (or, rather min/max
> for the index type) in all directions.
>
> Here is an example where this comes handy. You can create {1..n,1..n}
> and {0..n+1,0..n+1} both distributed over the same BlockDist object, and
> the shared indices will map to the same locale for both domains.
>
> Your domain map does not have to be the same way, however - it is your
> choice.
>
> Vassily

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to