<div class="gmail_quote">On Thu, Jan 5, 2012 at 09:22, Alexander Grayver <span dir="ltr">&lt;<a href="mailto:agrayver@gfz-potsdam.de">agrayver@gfz-potsdam.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
My question is whether all file handles are closed correctly when I change file name?</blockquote></div><br><div>No, they are not. You should PetscViewerDestroy() and then create a new viewer.</div><div><br></div><div><br>
</div><div>I think the file probably *should* be closed silently in this usage. The other alternative is to give an error, but leaking file handles is not okay.</div>