On Wed, Oct 27, 2010 at 10:26, Benjamin Sanderse
<B.Sanderse@cwi.nl> wrote:
PetscInt iterations;
ierr = KSPGetIterationNumber(ksp,&iterations);CHKERRQ(ierr);
fd = PETSC_VIEWER_SOCKET_WORLD;
ierr = PetscIntView(1,iterations,fd);CHKERRQ(ierr);
This is a type error (your compiler should have issued a warning), you want
PetscIntView(1,&iterations,fd);
because the prototype is PetscIntView(PetscInt,const PetscInt[],PetscViewer);
Also see Barry's comment about reading it correctly.
Jed