<div class="gmail_quote">On Sat, Feb 11, 2012 at 10:52, recrusader <span dir="ltr"><<a href="mailto:recrusader@gmail.com">recrusader@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 id=":3ee">When I removed 'if (NONEW == -2)<br>
SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"New nonzero at<br>
(%D,%D) caused a malloc",ROW,COL); \' from the following function in<br>
src/mat/impls/aij/seq/aij.h. It works in GPU mode. Do you have any<br>
comments? Thanks a lot.</div></blockquote></div><br><div>If you want that effect, you can</div><div><br></div><div>MatSetOption(A,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE);</div><div><br></div><div>or -mat_new_nonzero_allocation_err 0.</div>
<div><br></div><div>The more serious problem is that preallocation information seems to be getting lost. If you don't fix that, assembly will be horrendously slow. Are you sure the Mat type is being set *before* the call to MatMPIAIJSetPreallocation()?</div>