Anycorn,
HDF5 can handle multiple streams without external synchronization, although recordings will still be serial. You must compile the latest version (1.8.6 as of 4/5/2011) and run ./configure using the --enable-threadsafe and -with-pthreads=/pthreads-include-path/,/pthreads-lib-path/ .
For instance:
./configure --enable-threadsafe -with-pthreads=/usr/include,/usr/lib
Regarding the definition of dataspace for recording, the easiest way is to build a basic rectangular hyperplane using a multidimensional array, rank value and the H5Screate_simple function. Usually the mine performs the same steps:
//NUM = Number of spaces in this dimension //Create a 1 dimensional array hsize_t dsDim[1] = {NUM}; //Create the 1x1xNUM data space (rank param = 1). hid_t dSpace = H5Screate_simple(1, dsDim, NULL); ... Create datasets using the dataspace ... //Release the data space H5Sclose(dSpace);
Hope this helps!
source share