[petsc-users] hdf5 and FILE_MODE_APPEND

Mohamad M. Nasr-Azadani mmnasr at gmail.com
Fri Jan 20 18:05:00 CST 2012


Thanks to you both Matt and Jed.
Mohamad


On Fri, Jan 20, 2012 at 2:12 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Fri, Jan 20, 2012 at 4:00 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
>> On Fri, Jan 20, 2012 at 15:55, Matthew Knepley <knepley at gmail.com> wrote:
>>
>>> There is no need for append mode. HDF5 does not work that way. Just open
>>> it up and write.
>>
>>
>> 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.
>>
>>   /* Create or open the file collectively */
>>   switch (hdf5->btype) {
>>     case FILE_MODE_READ:
>>       hdf5->file_id = H5Fopen(name, H5F_ACC_RDONLY, plist_id);
>>       break;
>>     case FILE_MODE_WRITE:
>>       hdf5->file_id = H5Fcreate(name, H5F_ACC_TRUNC, H5P_DEFAULT,
>> plist_id);
>>       break;
>>
>
> I thought we have changed this for PyLith, but we did it differently. This
> has been pushed.
>
>    Matt
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120120/7327c7c3/attachment.htm>


More information about the petsc-users mailing list