On Mon, 16 Feb 2009, Hong Zhang wrote: > > If the matrix is not square, the distribution should be different. Right? > > It might be different. The better way is to specify > local size for vectors and matrices, and set > PETSC_DECIDE for global sizes.
It will be different - but will still match [if you use the correct sized vectors with the matrix]. For eg: MatSetSizes(A, PETSC_DECIDE, PETSC_DECIDE, m,n); VecSetSizes(x, PETSC_DECIDE, n); VecSetSizes(b, PETSC_DECIDE, m); /* b = Ax */ MatMult(A,x,b); Satish
