<div class="gmail_quote">On Sun, May 8, 2011 at 17:09, Ryan Yan <span dir="ltr"><<a href="mailto:vyan2000@gmail.com">vyan2000@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":11p">PetscOptionsSetValue("-ksp_view","1"); at very begin of the code, right after <br>

PetscInitialize.<br><br>But it seems like only the command line option "-ksp_view " will bring me the information on ksp.<br>The function call does not seem to response.</div></blockquote></div><br><div>The -ksp_view output is going into a file named "1".  I think PetscOptionsSetValue("-ksp_view",""); will do what you want. Note that you can just call KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD); after the solve.</div>