Manfred,
You can also just remove the 9 lines of optimization (around lines
72-81 in the original BlockDist.x10 source) and proceed with your
changes.
Igor
On Mon, Jun 6, 2011 at 8:21 AM, Josh Milthorpe
<[email protected]> wrote:
> Hi Manfred,
>
> x10.array.RectRegion is package visible, so is not accessible by your
> class in x10.lang. Please try changing the package of your custom dist
> to "x10.array". You would also need to place the source file in a
> subdirectory ./x10/array within your project source path.
>
> Cheers,
>
> Josh
>
> On 06/06/11 18:26, Kröhnert, Manfred wrote:
>> Hello David
>>
>> Am 02.06.2011 um 03:03 schrieb David P Grove:
>>
>>> "Kröhnert,Manfred"<[email protected]> wrote on 06/01/2011 12:16:04
>>> PM:
>>>> I have an Array of size m * n and I am currently distributing it
>>>> using a DistArray
>>>> with a distribution created through Dist.makeBlock().
>>>> This distributes the values evenly over all places.
>>>>
>>>> What I would like to have is a distribution which creates the
>>>> following layout (k being a natural number):
>>>>
>>>> Place 0: k * m values
>>>> Place 1: k * m values
>>>> ...
>>>> Place MaxPlaces - 1: k * m values
>>>> Place MaxPlaces: all the remaining values (also a multiple of m)
>>>>
>>>> Is this possible to achieve with the current 2.1.2 release (or the
>>>> pending 2.2) ?
>>>>> From reading through the documentation I was not able to figure this
>>> out.
>>>
>>> There isn't a built-in distribution that does this. However, all
>>> distributions in X10 are simply normal X10 classes that are subclasses of
>>> the x10.array.Dist class. I think it should be fairly straightforward to
>>> implement this functionality by writing your own subclass of
>>> x10.array.Dist. I'd start by copying x10.array.BlockDist and then just
>>> changing the bodies of the two methods blockRegionForPlace and
>>> mapIndexToPlace to get the mapping you want. I think that should be all
>>> you would need to do. You then use your new Dist subclass to create a
>>> DistArray, and you should be in business.
>>>
>>> --dave
>> thanks for your suggestion.
>>
>> But after trying it I ran into the following problem:
>>
>> I copied BlockDist.x10 into my programs source directory, renamed the file
>> and the class
>> and removed the package x10.lang; declaration.
>> Afterwards I added an import x10.array.Dist; because Dist is not available
>> in the current package.
>> But when I tried to compile a test program I got the following error message
>> from the compiler:
>>
>> Could not find type "RectRegion".
>>
>> After adding the line import x10.array.RectRegion; another error shows up:
>>
>> Class x10.array.RectRegion is not accessible.
>>
>> I am using X10 v2.1.2 and the problem was the same both with the binary
>> distribution for Mac OS and a self compiled version.
>>
>> Do you have any hints what the problem could be here?
>>
>> Thanks,
>>
>> Manfred
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today.
http://p.sf.net/sfu/quest-dev2dev2
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users