Hello Brad,
> If the idiom below still works at all, still, I believe that it should
> work on arbitrary nD Block (and probably Cyclic) domains.
>
By idiom below you mean the one I mentioned?
const myInds = D._value.locDoms[here.id].myBlock;
So, for a test program like this
use BlockDist;
config var n = 5;
const ProblemSpace = {1..n, 1..n},
BlockSpace = ProblemSpace dmapped Block(boundingBox=ProblemSpace);
coforall loc in Locales do
on loc{
var myInds = BlockSpace._value.locDoms[here.id].myBlock;
writeln("locale: ", here.id, " myInds: ", myInds);
}
compiler says:
myInds.chpl:13: error: unresolved access of '[domain(2,int(64),false)]
LocBlockDom(2,int(64),false)' by '[int(64)]'
Also I tried to extract the indexes with different experiments on
this formula
(here.id*n/numLocales+1)..((here.id+1)*n/numLocales) , but things get ugly
with Block distribution when n/numLocales doesn't divide evenly.
We had an intern put together a draft of a more formal/direct way of
> querying this information, and the code was written and works, but never
> made it into the trunk. We're hoping to do that for the upcoming release.
>
> In the meantime, let me know if the idiom below doesn't work for you and
> I'll dig a little deeper (maybe handing off the intern's code to you).
>
> -Brad
That would be great! thank you.
-Konstantina
>
> On Tue, 4 Mar 2014, Konstantina Panagiotopoulou wrote:
>
> Hello,
>>
>> I have found this construct in a previous post in the list.
>>
>> coforall loc in Locales do
>> on loc {
>> const myInds = D._value.locDoms[here.id].myBlock;
>>
>> writeln("myInds = ", myInds);
>> }
>>
>> Is there anything similar to get the indexes of a distributed, but
>> 2-dimensional domain?
>>
>>
>
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users