<div class="gmail_quote">On Wed, Nov 23, 2011 at 18:48, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@gmail.com">karpeev@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="im">> I wonder if we can express all useful communication with a more restrictive interface similar to a local-to-global map (but mapping between any vectors) where one side (typically called "local", but doesn't need to actually be a local Vec) has at most one edge.<br>
</div></div>That would disallow accumulating a MAX "locally".</blockquote></div><br><div>I don't know what you mean. Say we have a scatter from X (sometimes "local") to Y (sometimes "global"). One way to describe my communication graph is as a single-valued function on X (containing either the index into Y or NULL). I'm asking whether the single-valued constraint is too restrictive for some important use case.</div>
<div><br></div><div>The primitives I can readily provide are</div><div><br></div><div>broadcast from Y to X</div><div>reduce values on X into Y (min, max, sum, replace, etc)</div><div><br></div><div>gather values on X into arrays for each point in Y (in some ordering, rank ordering if you like)</div>
<div>scatter values in arrays for each point in Y to the point in X</div><div><br></div><div>These latter two involve a data structure that is as big as the number of sharing processes (because that is explicitly being requested), but are still implemented where the owner of that point in Y has no knowledge of which processes it is communicating with. With the capability of hardware RMA, this can actually be more efficient than if the two-sided graph was available (and it's less code and fewer data structures).</div>