<div class="gmail_quote">On Tue, Nov 22, 2011 at 08:30, Andrej Mesaros <span dir="ltr">&lt;<a href="mailto:andrej.mesaros@bc.edu">andrej.mesaros@bc.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":3tk">Given that I indeed call MatSetValues exclusively with row indices within the range determined by MatGetOwnershipRange, it should be impossible to generate entries on the wrong process, right? In such a case, could the corruption you mention be somehow due to the way I call other PETSc functions? Or is it at all possible that too small preallocation is making a problem?<br>
</div></blockquote><div><br></div><div>Try setting these options and running in debug mode.</div><div><br></div><div>MatSetOption(A,MAT_NO_OFF_PROC_ENTRIES,PETSC_TRUE);</div><div>MatSetOption(A,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_TRUE);</div>
<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":3tk">
<br>
Also, what is the meaning of the memories in the report: &quot;allocated&quot;,</div></blockquote><div><br></div><div>obtained with PetscMalloc()</div><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Sys/PetscMallocGetCurrentUsage.html">http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Sys/PetscMallocGetCurrentUsage.html</a></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":3tk"> &quot;used by process&quot; </div></blockquote><div><br></div><div>resident set size returned by getrusage(), procfs, or similar</div>
<div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Sys/PetscMemoryGetCurrentUsage.html">http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Sys/PetscMemoryGetCurrentUsage.html</a></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":3tk">and &quot;requested&quot;?</div></blockquote><div><br></div><div>Amount you are trying to allocate now.</div>
</div>