<div class="gmail_quote">On Fri, Jan 20, 2012 at 15:55, 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">
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>
<div><br></div>