<div class="gmail_quote">On Wed, Apr 25, 2012 at 00:53, Mohammad Mirzadeh <span dir="ltr"><<a href="mailto:mirzadeh@gmail.com">mirzadeh@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>Even more than that, I get lots of errors apparently complaining that I have not preallocated the matrix:</div></blockquote><div><br></div><div>You are not checking error codes, otherwise you wouldn't see all the subsequent errors.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div></div><div>I do not see these with 3.2-p6. Does 3.2-p6 has any mechanism for such alerts?</div></blockquote>
</div><div><br></div><div>The default behavior was changed in petsc-dev because forgetting to preallocate was too common of a mistake. <a href="http://www.mcs.anl.gov/petsc/documentation/changes/dev.html">http://www.mcs.anl.gov/petsc/documentation/changes/dev.html</a></div>
<br><div>* Preallocation routines now automatically set MAT_NEW_NONZERO_ALLOCATION_ERR, if you intentionally preallocate less than necessary then use MatSetOption(mat,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE) to disable the error generation.<br>
* You MUST now call MatXXXSetPreallocation() or MatSetUp() on any matrix you create directly (not using DMCreateMatrix()) before calling MatSetValues(), MatSetValuesBlocked() etc.</div>