On Fri, Jan 20, 2012 at 4:00 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote">On Fri, Jan 20, 2012 at 15:55, 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">
There is no need for append mode. HDF5 does not work that way. Just open it up and write.</blockquote></div><div><br></div><div>As written, that would truncate the old file. Making this work might be as simple as adding a case for FILE_MODE_APPEND that opened the file H5F_ACC_RDWR.</div>
<br><div><div><font face="'courier new', monospace"> /* Create or open the file collectively */</font></div><div><font face="'courier new', monospace"> switch (hdf5->btype) {</font></div><div><font face="'courier new', monospace"> case FILE_MODE_READ:</font></div>
<div><font face="'courier new', monospace"> hdf5->file_id = H5Fopen(name, H5F_ACC_RDONLY, plist_id);</font></div><div><font face="'courier new', monospace"> break;</font></div><div><font face="'courier new', monospace"> case FILE_MODE_WRITE:</font></div>
<div><font face="'courier new', monospace"> hdf5->file_id = H5Fcreate(name, H5F_ACC_TRUNC, H5P_DEFAULT, plist_id);</font></div><div><font face="'courier new', monospace"> break;</font></div></div>
</blockquote></div><br>I thought we have changed this for PyLith, but we did it differently. This has been pushed.<div><br></div><div> Matt<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>