1) It will distribute block rows, so you will get 8 and 4 as you want<br><br>2) Warning: This is an incredibly small problem. Using 2 processors<br>    might not show any speedup at all.<br><br>  Matt<br><br><div class="gmail_quote">
On Fri, Feb 5, 2010 at 5:03 PM, NovA <span dir="ltr">&lt;<a href="mailto:av.nova@gmail.com">av.nova@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi everybody!<br>
<br>
I&#39;m looking for the best way to distribute MPIBAIJ matrix among<br>
several processors.<br>
<br>
For example, I have square matrix 3x3 of blocks 4x4 each (i.e. 12x12<br>
values) and need to distribute it among 2 processors. The generic way<br>
of creating such a matrix would be:<br>
  Mat A;<br>
  MatCreate(comm, &amp;A);<br>
  MatSetSizes(A, loc_rows,12, 12,12);<br>
  MatSetType(A, MATMPIBAIJ);<br>
<br>
What is the optimal value for loc_rows here?<br>
<br>
Can I use PETSC_DECIDE for it? I suppose this will lead to division by<br>
6 rows per processor, which is not consistent with block size. How<br>
MatMPIBAIJSetPreallocation(A,4,...) will deal with it?<br>
<br>
Most likely, I have to manually set loc_rows to 8 and 4 according to<br>
the processor rank. But probably I miss some more clean way, when<br>
PETSc really decides. :)<br>
<br>
Thanks in advance for any comments.<br>
<br>
Regards!<br>
  Andrey<br>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>