I figured out myself, the local size must also match. Dominik
On Mon, Jan 2, 2012 at 3:33 PM, Dominik Szczerba <dominik at itis.ethz.ch> wrote: > I am doing something as simple as: > > ? ? ? ?PetscReal mmin = 0.0; > ? ? ? ?Vec vmin = 0; > ? ? ? ?PetscInt msize = 0, nsize = 0; > ? ? ? ?ierr = MatGetSize(Av, &msize, &nsize); CHKERRQ(ierr); > ? ? ? ?ierr = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, msize, &vmin); > CHKERRQ(ierr); > ? ? ? ?ierr = MatGetRowMinAbs(Av, vmin, PETSC_NULL); CHKERRQ(ierr); > > or in words, setting the size for the vector storing min values in > Av's rows to the actual number of rows, and I am surprised to get: > > [4]PETSC ERROR: Nonconforming object sizes! > [4]PETSC ERROR: Nonconforming matrix and vector! > > pointing to the line with MatGetRowMinAbs. Values in msize and msize > are what they are expected to be, the matrix is assembled. What am I > doing wrong here? > > Thanks > Dominik
