<br><br><div class="gmail_quote">On Wed, Nov 23, 2011 at 6:57 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><div class="gmail_quote">On Wed, Nov 23, 2011 at 18:48, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@gmail.com" target="_blank">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>> 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><div>I don't know what you mean. </div></blockquote><div><br></div><div>I mean that for a scatter (a,x) (a,y) with MAX_VALUES the result at a would be the MAX of values at x and y.</div>
<div>With the new API that would be disallowed. Also, if you allow (a,x) (b,x) then you are effectively allowing (x,a) (x,b),</div><div>since you can emulate it with the reverse mode, unless you ban that too.</div><div>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>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>
</blockquote></div><br>