18.04.2014 18:19, Daniel Kahn пишет:
Hello Andrey,
This sounds like a good idea. Something like this already exists, see
http://www.hdfgroup.org/HDF5/doc1.6/UG/08_TheFile.html and look for "8.8
Buffered temporary files in memory -- CORE driver"
It looked like a good idea at the first glance, but the CORE driver
requires data to fill into memory, which is not the case for my
applications, unfortunately.
The old technique for doing this under unix-like systems was to *open*
or *fopen* a file and then *unlink* the file. The open file handle could
still be used and when the program exited for what ever reason the disk
space was reclaimed. This would be slightly less robust then the
*tmpfile(3)* you reference, but probably good enough for HDF5-type
applications.
Yes, it would be the way-to-go, but my code must run on Windows :-(
Unfortunately the HDF5 documentation is ambiguous about whether or not
the underlying Unix file handle associated with a HDF5 open file object
is always maintained by the library or if it ever gets closed and then
reopened by the library during the course of normal processing.
Hmm, I didn't think about it (I assumed H5Fopen does create low-level
FILE handle immediately). But isn't it driver-specific then?
I believe the easiest way to implement the desired feature would be to
introduce new flag e.g. H5_ACC_TEMP to be passed to H5Fcreate. It would
require very little changes to HDF5 code. Another way I see is to create
special TEMPFILE driver. What do you think?
Best wishes,
Andrey Paramonov
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org