On Sat, Jul 7, 2012 at 10:58 AM, Xin Zhao <span dir="ltr"><<a href="mailto:sean.null@gmail.com" target="_blank">sean.null@gmail.com</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">
Dear all,<div><br><div>I generate a matrix L by<div>DA =PETSc.DA().create(...some...)<br><div>L = DA.create()</div></div></div></div></blockquote><div><br></div><div>Is this createMatrix()? The matrix returned from a DA is already preallocated.</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"><div><div><div><div>Then I want to preallocate memory for L</div><div>L.setPreallocationNNZ((3,2))</div>
<div>This works when for mpiexec -np 1</div>

<div>but it gives the error message below when mpiexec -np 4</div><div><br></div><div>[3] MatAnyAIJSetPreallocation() line 311 in petsc4py-1.2/src/include/custom.h</div><div>[3] Operation done in wrong order</div><div>[3] matrix is already preallocated</div>


</div><div><br></div><div>How to solve this?</div></div></div><div><br></div><div>Thanks in advance.</div><div><br></div><div>Cheers,</div><div>Xin</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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<br>