Dear all,<div><br><div>I generate a matrix L by<div>DA =PETSc.DA().create(...some...)<br><div>L = DA.create()</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>