At this point, I can't since the first time the viewer is created via PETSC_COMM_WORLD and the second time, PETSC_COMM_SELF. <div>(I am not even 100% sure if that could cause any troubles with the hdf5 file?)</div><div>
<br></div><div>Mohamad</div><div><br><br><div class="gmail_quote">On Fri, Jan 20, 2012 at 1:27 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com">knepley@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 class="im">On Fri, Jan 20, 2012 at 3:22 PM, Mohamad M. Nasr-Azadani <span dir="ltr"><<a href="mailto:mmnasr@gmail.com" target="_blank">mmnasr@gmail.com</a>></span> wrote:<br></div><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Thanks Matt, </div>So, this cannot be done this way, i.e. generate an hdf5 file at one instance and write a field data, close it then add another field data at later instance to the same file?</blockquote><div><br></div>
</div><div>Can't you just open up the file and write something with a different name?</div><div><br></div><div> Matt</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><div class="gmail_quote">
On Fri, Jan 20, 2012 at 1:19 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@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>On Fri, Jan 20, 2012 at 3:15 PM, Mohamad M. Nasr-Azadani <span dir="ltr"><<a href="mailto:mmnasr@gmail.com" target="_blank">mmnasr@gmail.com</a>></span> wrote:<br></div><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi guys, <div><br></div><div>Does <span style="font-family:monospace;white-space:pre-wrap"><font size="4"><b>PetscViewerHDF5Open()</b></font></span>work with <b>FILE_MODE_APPEND</b>? </div>
<div></div></blockquote><div><br></div></div><div>No, but HDF5 does not work like that.</div><div><br></div><div> Matt</div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>This is the error I get when I first open the file, write some data to it using VecView(), close it and then again reopen (with append mode) it to add data to the end of it. </div><div><br></div><div><div>[0]PETSC ERROR: Operation done in wrong order!</div>
<div>[0]PETSC ERROR: Must call PetscViewerFileSetMode() before PetscViewerFileSetName()!</div></div><div><br></div><div>Thanks, </div><span><font color="#888888"><div>Mohamad</div><div><br></div>
</font></span></blockquote></div></div><span><font color="#888888"><br><br clear="all"><span><font color="#888888"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</font></span></font></span></blockquote></div><br></div></div>
</blockquote></div></div><div class="HOEnZb"><div class="h5"><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</div></div></blockquote></div><br></div>