Add ierr to petsc calls.