> 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?
Chapel typically doesn't make copies of (class) objects automatically in
order to guarantee the reference semantics of the object. So yeah, you'd
have to do something to explicitly replicate/copy it if you wanted a local
copy. Using the privatization functions would be one approach (and Vass
might be well-equipped to help advise on that one); alternatively, it
seems like you could simply have the LocBlock class store its own copy
when it's constructed(?). I'm not sure what the tradeoff between the two
would be -- seems like a wash to me, but I could be missing something.
> 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?
I think you'll want to go into the leader iterators and insert timing
calls after the coforall that creates a task per locale, but before the
coforall that creates the tasks on the locale. Look for this prototype:
iter BlockDom.these(param tag: iterKind) where tag == iterKind.leader {
It appears that the BlockArr leader iterator forwards to the BlockDom
case, so doing it here should support timed iterations over either domains
or arrays. If you guard the timing logic by a config param (and/or
const), you should be able to compile it out (and/or turn it off) when
you're not interested in gathering these timings.
-Brad
------------------------------------------------------------------------------
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