08-14-2006 07:05 AM
08-14-2006 07:59 AM
08-14-2006 08:40 AM
08-14-2006 09:11 AM
1) I'm using the 64 bit UNIX time for saving the timestamp, and the fractional seconds are lost. For my own purposes, I'm usually just recording "when did I do this experiment" so fractional seconds are not necessary. However, I'm not particularly pleased with the solution. The original thinking was that this would enable other programs (i.e. HDFView) to automatically display the times. However, none of the HDF viewers that I have encountered actually interpret either the 64 or the 32 bit UNIX time, so it doesn't much matter. Future versions will probably switch over to a similar 128 bit datatype, or perhaps a cluster.
2) I handle thread-safety in only the most minimal way, (just like the HDF5 library!). Namely, my library's internals won't be screwed up by multiple threads. However, I make no effort to protect the user from from HDF5's lack of thread-safety, except that the VIs themselves are not reentrant, and so a certain level of protection is inherent so long as calls are not coming from multiple diagrams in different execution systems simultaneously.
However, I don't know the full extent of HDF5's lack of thread safety. With my library, I suppose that it would be possible to delete a dataset while reading it in two different loops on the same block diagram, since this would involve calls made to different library VIs. I can see this might be a problem which I had not previously considered.
So far I have not encountered any problems, but I tend to perform all of my file access from one loop (either the main program loop, or a dedicated I/O loop), which would tend to avoid any thread-safety problems that may exist.
I will look into the issue further for future releases.
08-14-2006 09:28 AM
08-14-2006 09:30 AM
A brief update on the thread safety issue. It is possible to build a thread-safe version of the HDF5 library on Windows as well as Linux:
http://hdf.ncsa.uiuc.edu/windows/faq.html#General_Q6
This page seems to refer mostly to the upcoming version 1.8.0, so it's not clear to me whether this will work for 1.6.5. However, 1.8.0 will be fully backwards compatible with 1.6.5.
I think handling the issue at the library is the best course of action, if it is available.
08-14-2006 09:32 AM
08-14-2006 09:50 AM
12-09-2007 04:40 PM
I am trying to read an HDF5 3D dataset consisting of 60 frames of 2048X2048 U16 data. The problem is I cannot figure out how to only read in one frame at a time, and when I read all the frames I get an out of memory error. Any help would be appreciated.
Gary
12-10-2007 09:15 AM