<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 14, 2015 at 4:11 AM, Florian Lindner <span dir="ltr"><<a href="mailto:mailinglists@xgm.de" target="_blank">mailinglists@xgm.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
given I have this piece of python code:<br>
<br>
rank = MPI.COMM_WORLD.Get_rank()<br>
sizes = [ 4, 5]<br>
n = sizes[rank]<br>
<br>
A = PETSc.Mat()<br>
A.create()<br>
A.setSizes( ((n, PETSc.DETERMINE), (n, PETSc.DETERMINE)) ) # sets the local size, let petsc determine global size<br>
A.setFromOptions(); A.setUp()<br>
<br>
print("Global Size = ", A.getSize())<br>
print("Local Size = ", A.getLocalSize())<br>
<br>
<br>
and I run it with mpirun -n 2 and -mat_type dense (this, I think, should not be relevant), getSize() returns 9x9 for both ranks of couse.<br>
<br>
getLocalSize returns 4x4 and 5x5.<br>
<br>
I understand that the A is distributed like that:<br>
<br>
/4x4 ? \<br>
\ ? 5x5 /<br>
<br>
<br>
When I would give ( (PETSC_DETERMINE, 9), (PETSC_DETERMINE, 9) ) to setSizes it would look like that:<br>
<br>
/ 4 x 9 \<br>
\ 5 x 9 /<br>
<br>
because PETSc uses row based partitioning.<br>
<br>
What happens when I set local rows and local cols, where do the parts that I marked with ? live?<br>
<br>
Thanks, ;-)</blockquote><div><br></div><div>PETSc always uses row partitioning, no matter what arguments are set for local columns.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
Florian<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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</div>
</div></div>