<div class="gmail_quote">On Fri, Jan 6, 2012 at 06:51, 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">
<div bgcolor="#ffffff" text="#000000">Ok, that was my meaning to use PetscViewerFileSetName from the
    beginning since if you have let&#39;s say ten different objects (Mat and
    Vec) and you need to output them at each iteration (time step or
    frequency for multi-freqs modeling) you need ten viewer objects
    which is not cool I guess, that is why I started to use one viewer
    and change just a name of the file. <br>
    And to be honest I don&#39;t see any reason why having ten viewers is
    better than calling PetscViewerFileSetName ten times. </div></blockquote></div><br><div>Ten open file handles is not a big deal, just use ten viewers. There is file system metadata overhead associated with opening and closing files and it can get quite large on parallel file systems.</div>
<div><br></div><div>If you planned to have thousands of open file handles, you should rethink your output format.</div>