[petsc-users] Problem with Mat.setpreallocationNNZ in petsc4py
Xin Zhao
sean.null at gmail.com
Sat Jul 7 11:58:24 CDT 2012
Dear all,
I generate a matrix L by
DA =PETSc.DA().create(...some...)
L = DA.create()
Then I want to preallocate memory for L
L.setPreallocationNNZ((3,2))
This works when for mpiexec -np 1
but it gives the error message below when mpiexec -np 4
[3] MatAnyAIJSetPreallocation() line 311 in
petsc4py-1.2/src/include/custom.h
[3] Operation done in wrong order
[3] matrix is already preallocated
How to solve this?
Thanks in advance.
Cheers,
Xin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120707/c30730c8/attachment.html>
More information about the petsc-users
mailing list