My matrices are from Florida matrix collection. I want to use them to test MatMult()<div>Now I know I have to compute the partitioning myself.</div><div>Thanks.<br><br><div class="gmail_quote">On Sat, Jan 14, 2012 at 12:10 PM, Shri <span dir="ltr"><<a href="mailto:abhyshr@mcs.anl.gov">abhyshr@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><div style="font-size:12pt;font-family:Times New Roman"><div>Does your matrix come from an unstructured grid?</div>
If so, then you'll need to use a partitioning package such as permits. <div>Read section 3.5 of the manual<div><a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manual.pdf" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manual.pdf</a></div>
<div>and also see the example</div><div><a href="http://www.mcs.anl.gov/petsc/petsc-current/src/mat/examples/tutorials/ex15.c.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/src/mat/examples/tutorials/ex15.c.html</a></div>
<div><div><br><div><br><br><hr><div><div class="h5"><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px">I want to load a sparse matrix from a file (in PETSc binary format). The matrix will be in MPIAIJ format.<div>
I want it is a balanced load: each processor will have nearly equal number of nonzeros.</div><div>I don't come up with a sequence of PETSc calls to do that.<br>
<div><br>On Sat, Jan 14, 2012 at 11:41 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="gmail_quote">On Sat, Jan 14, 2012 at 12:38, Junchao Zhang <span dir="ltr"><<a href="mailto:junchao.zhang@gmail.com" target="_blank">junchao.zhang@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>Does PETSc provide convenient functions to compute this layout( i.e.,# rows on each processor), or I have to do it myself?<div>I browsed PETSc document and did not find them.</div></div></blockquote></div><br>
</div><div>MatSetSizes() lets you specify local and/or global sizes. If you specify both, it checks that they are compatible. The implementation uses</div><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html</a></div>
<div><br></div><div><br></div><div>If these are not suitable for your purposes, can you be more specific about what you would like to do?</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Junchao Zhang<br>
</div></div>
</blockquote><br></div></div></div></div></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Junchao Zhang<br>
</div>