Dear All: I am using a modified version of ex72.c in /src/mat/examples/tests directory to create a matrix with COO format.
In the line: ierr = MatCreateSeqAIJ(PETSC_COMM_WORLD,m,n, (m*n/nnz),PETSC_NULL,&A);CHKERRQ(ierr); The 'nz' is set to (m*n/nnz). And from documents, nz is: *nz *- number of nonzeros per row (same for all rows) http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateSeqAIJ.html I am wondering, why this value is set to be m*n/nnz? Looks obvious this is not the number of nonzeros per row. What's the rule for choosing nz? If only one value here, should it be the largest number of non-zeroes among all rows? Thanks Qiyue Lu
