<div dir="ltr">On Sun, Jan 20, 2013 at 10:22 AM, Hui Zhang <span dir="ltr"><<a href="mailto:mike.hui.zhang@hotmail.com" target="_blank">mike.hui.zhang@hotmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On Jan 20, 2013, at 5:13 PM, Jed Brown wrote:<br>
<br>
> No, MatMult and MatMatMult require all objects to be on the same communicator.<br>
<br>
</div>Thanks for the quick answer!  It seems a general rule that all operands and results must be<br>
on the same communicator.  Can I lift an object from a sub-communicator to the sup-communicator<br>
without changing the parallel layout of the object?<br></blockquote><div><br></div><div style>You can with a Vec (e.g., using VecPlaceArray), but you're responsible for the sharing so it's fragile.</div><div style>
<br></div><div style>In general, I recommend creating the object on the largest communicator involved and then getting access more locally. In the first pass, just make a copy to a local subcomm unless a routine exists to do it automatically. If you profile and see that the copy is significant (remarkably rare in practice) you can sometimes optimize what is copied versus shared, or change the parent parallel data structure to make the local access faster.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
><br>
><br>
> On Sun, Jan 20, 2013 at 10:12 AM, Hui Zhang <<a href="mailto:mike.hui.zhang@hotmail.com">mike.hui.zhang@hotmail.com</a>> wrote:<br>
> parallel Mat, multiplies a serial Vec or a serial Mat<br>
><br>
> Is it supported directly? If yes, can the resulting Vec/Mat be serial or parallel?<br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div></div>