Hi John --

> How difficult would you consider it to be to write such domain map? I 
> looked at the already available distributions and was surprised by how 
> much code was needed, I would have thought that all that would be needed 
> would be functions to map between global indices and rank, local 
> index-pairs....

You are correct that writing a fully-functional domain map is a 
significant endeavor.  The reason is that while providing mappings from 
indices to locales is sufficient to write a domain map, it isn't (in my 
technical opinion) sufficient for writing one that is space and time 
efficient.  In designing Chapel, we wanted the domain map author to be 
able to specify the data structures and memory layout used to store a 
locale's local indices and data in order to maximize efficiency, and once 
the storage model is open, all the methods for accessing, iterating over, 
and operating on that storage must also be open.

In practice, it is often the case that one can avoid supporting the full 
domain map interface; for example, slicing and reindexing tend to be two 
of the more complex operations to implement, but there's no need to 
implement them if you don't do any slicing or reindexing of arrays using 
that domain map in your program.

Typically, our guidance for writing a new domain map involves:

(a) prototyping the key data structures, iterators, etc. outside of the 
domain map framework first, for simplicity, and then moving it inside the 
framework as it begins to work.  This is similar to the suggestion to do 
load balancing manually in my mail from yesterday; once you had that 
working, moving it inside of a domain map would make it accessible to 
others via a simpler interface.

(b) starting from an existing domain map and customizing it -- e.g., if my 
unevenly partitioned array was going to look a lot like a block 
distribution, yet with different-sized blocks per locale, the block 
distribution would be a good place to start from.


> Also, do you think there is some other language, library or framework 
> that would suit my needs better?

Charm++ comes to mind as a reasonably mature programming model that is 
inherently very dynamic in its mapping of data and tasking to compute 
nodes, so you might take a look at it.  It's the main thing that springs 
to mind as a viable alternative to me at present within the HPC space.

-Brad

------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to