On 05.01.2012 16:30, Jed Brown wrote: > On Thu, Jan 5, 2012 at 09:22, Alexander Grayver > <agrayver at gfz-potsdam.de <mailto:agrayver at gfz-potsdam.de>> wrote: > > My question is whether all file handles are closed correctly when > I change file name? > > > No, they are not. You should PetscViewerDestroy() and then create a > new viewer. > > > 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.
If you give error or just not close handle like now then what is the meaning of PetscViewerFileSetName? Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120105/e34bc67e/attachment.htm>
