Maybe look at PCREDISTRIBUTE?<br><br><div class="gmail_quote">On Tue, May 15, 2012 at 1:44 PM, Andrew Spott <span dir="ltr"><<a href="mailto:andrew.spott@gmail.com" target="_blank">andrew.spott@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>That would be ideal, but may be impractical... is it possible to redo the distribution after the matrix is assembled? How would I go about doing that?</p>
<div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On May 15, 2012 12:38 PM, "Shri" <<a href="mailto:abhyshr@mcs.anl.gov" target="_blank">abhyshr@mcs.anl.gov</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:Times New Roman"><div>By default, PETSc uses a row distribution with the first m rows on processor 0, next m rows on processor 1, and so on.</div>If the order is not important, then you could remove rows/columns from each processor instead of removing the last n-m rows on the last processor. Thus, the load balance would still be even.<div>
<br></div><div>Shri<br><br><hr><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px"><div>I'm solving the schrodinger equation in a basis state method and looking at adding the azimuthal quantum numbers (the m's) to my basis so I can look at circularly polarized light.</div>
<div><br></div><div>However, when I do this, I'll need to do some sort of convergence study to make sure I add enough of them. The way my code is structured, it will probably be easier to just remove rows and columns from a bigger matrix, instead of adding them to a smaller matrix. However, depending on the way I structure the matrix, I could end up removing all the values (or a significant portion of them) from a processor when I do that.</div>
<div><br></div><div>Speaking more on that, is the "PETSC_DECIDE" way of finding the local distribution smart in any way? or does it just assume an even distribution of values? (I assume that it assumes a even distribution of values before the assembly, but does it redistribute during assembly?)</div>
<div><br></div><div>Thanks,</div><div><br></div><div>-Andrew</div><br><div><div>On May 15, 2012, at 6:40 AM, Jed Brown wrote:</div><br><blockquote><div class="gmail_quote">On Mon, May 14, 2012 at 10:39 PM, Andrew Spott <span dir="ltr"><<a href="mailto:andrew.spott@gmail.com" target="_blank">andrew.spott@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 style="word-wrap:break-word">That is what I figure.<div><br></div><div>I'm curious though if you need to manually determine the local row distribution after you do that. (for example, say you completely remove all the values from the local range of one processor… that processor wouldn't be utilized unless you redistribute the matrix)</div>
</div></blockquote><div><br></div><div>What sizes and method are we talking about? Usually additional (compact) basis functions only make sense to add to one of a small number of processes.</div></div>
</blockquote></div><br></blockquote><br></div></div></div></blockquote></div>
</div></div></blockquote></div><br>