I have a program where I want to use the VDS features of HDF5-1.10.
The problem I want to solve is:My program run a simulation evolving in time, and store some sample values from the simulation to a HDF5 file. I can save the state of the simulation and re-start my program at any time. When I restart my simulation, the sampling is continued in a new group in the HDF5 file. In the end I end up with many groups containing the sampled values in successive order. I want to create a VDS to glue these parts together to form a continuous time series of sampled data. The VDS is stored in a separate file.
In my program I create three arrays, two with time and one with the actual values. I want to create a mapping for each of the three arrays. i.e. three VDS datasets.
When I create the VDS file, everything looks good, no errors. When I dump the VDS file with 'h5dump -p', the data appears to be good, however, the mapping looks strange, see the attached file 'vdsdump.txt' under dataset 'time' for instance. It should only contain two mappings, the ones pointing to 'run-1/time' and 'run-2/time', not the 'values'-array. The same is true for the 'itstep'-array.
I attach a small sample data file and program to demonstrate the problem. The program is a made for this demonstration purpose only, in reality this is within a larger program. So if anything seems a bit ad-hock, I agree.
Is this a bug in the HDF5 library or is it a problem with my understanding of the VDS features? I have tried to check that I close all handles properly, and have not found any such instances.
Thanks in advance. Best regards, Håkon Strandenes
vdsbug.tar.gz
Description: GNU Zip compressed data
HDF5 "solint.h5" {
GROUP "/" {
EXTERNAL_LINK "coordinates" {
TARGETFILE "solintData.h5"
TARGETPATH "/run-1/coordinates"
DATASET "/run-1/coordinates" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SIMPLE { ( 1, 3 ) / ( 1, 3 ) }
STORAGE_LAYOUT {
CONTIGUOUS
SIZE 12
OFFSET 2208
}
FILTERS {
NONE
}
FILLVALUE {
FILL_TIME H5D_FILL_TIME_IFSET
VALUE H5D_FILL_VALUE_DEFAULT
}
ALLOCATION_TIME {
H5D_ALLOC_TIME_EARLY
}
DATA {
(0,0): 1, 0, 0
}
}
}
DATASET "itstep" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 40 ) / ( 40 ) }
STORAGE_LAYOUT {
MAPPING 0 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (0)
STRIDE (1)
COUNT (1)
BLOCK (20)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-1/values"
SELECTION ALL
}
}
MAPPING 1 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (20)
STRIDE (1)
COUNT (1)
BLOCK (20)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-2/values"
SELECTION ALL
}
}
MAPPING 2 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (0)
STRIDE (1)
COUNT (1)
BLOCK (20)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-1/time"
SELECTION ALL
}
}
MAPPING 3 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (20)
STRIDE (1)
COUNT (1)
BLOCK (20)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-2/time"
SELECTION ALL
}
}
MAPPING 4 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (0)
STRIDE (1)
COUNT (1)
BLOCK (20)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-1/itstep"
SELECTION ALL
}
}
MAPPING 5 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (20)
STRIDE (1)
COUNT (1)
BLOCK (20)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-2/itstep"
SELECTION ALL
}
}
}
FILLVALUE {
FILL_TIME H5D_FILL_TIME_IFSET
VALUE -1
}
DATA {
(0): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
(19): 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
(37): 18, 19, 20
}
}
DATASET "time" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SIMPLE { ( 40 ) / ( 40 ) }
STORAGE_LAYOUT {
MAPPING 0 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (0)
STRIDE (1)
COUNT (1)
BLOCK (20)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-1/values"
SELECTION ALL
}
}
MAPPING 1 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (20)
STRIDE (1)
COUNT (1)
BLOCK (20)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-2/values"
SELECTION ALL
}
}
MAPPING 2 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (0)
STRIDE (1)
COUNT (1)
BLOCK (20)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-1/time"
SELECTION ALL
}
}
MAPPING 3 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (20)
STRIDE (1)
COUNT (1)
BLOCK (20)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-2/time"
SELECTION ALL
}
}
}
FILLVALUE {
FILL_TIME H5D_FILL_TIME_IFSET
VALUE -1
}
DATA {
(0): 3.62, 3.64, 3.66, 3.68, 3.7, 3.72, 3.74, 3.76, 3.78, 3.8, 3.82,
(11): 3.84, 3.86, 3.88, 3.9, 3.92, 3.94, 3.96, 3.98, 4, 4.02, 4.04,
(22): 4.06, 4.08, 4.1, 4.12, 4.14, 4.16, 4.18, 4.2, 4.22, 4.24, 4.26,
(33): 4.28, 4.3, 4.32, 4.34, 4.36, 4.38, 4.4
}
}
DATASET "values" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SIMPLE { ( 40, 1, 4 ) / ( 40, 1, 4 ) }
STORAGE_LAYOUT {
MAPPING 0 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (0,0,0)
STRIDE (1,1,1)
COUNT (1,1,1)
BLOCK (20,1,4)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-1/values"
SELECTION ALL
}
}
MAPPING 1 {
VIRTUAL {
SELECTION REGULAR_HYPERSLAB {
START (20,0,0)
STRIDE (1,1,1)
COUNT (1,1,1)
BLOCK (20,1,4)
}
}
SOURCE {
FILE "solintData.h5"
DATASET "/run-2/values"
SELECTION ALL
}
}
}
FILLVALUE {
FILL_TIME H5D_FILL_TIME_IFSET
VALUE 6.72623e-44
}
DATA {
(0,0,0): -0.458632, 0.000107216, 0.000304285, -0.389932,
(1,0,0): -0.458497, 0.000103657, 0.000292498, -0.389266,
(2,0,0): -0.458356, 9.99277e-05, 0.000281116, -0.389144,
(3,0,0): -0.458206, 9.60298e-05, 0.000269345, -0.388931,
(4,0,0): -0.45805, 9.19393e-05, 0.000257421, -0.388818,
(5,0,0): -0.457886, 8.78294e-05, 0.000245341, -0.388158,
(6,0,0): -0.457714, 8.35988e-05, 0.00023355, -0.388007,
(7,0,0): -0.457536, 7.92422e-05, 0.000221349, -0.387767,
(8,0,0): -0.457352, 7.47425e-05, 0.000208951, -0.387604,
(9,0,0): -0.457159, 7.02754e-05, 0.000196399, -0.386919,
(10,0,0): -0.45696, 6.57287e-05, 0.000184067, -0.38672,
(11,0,0): -0.456756, 6.11047e-05, 0.000171311, -0.386427,
(12,0,0): -0.456545, 5.6384e-05, 0.000158383, -0.386222,
(13,0,0): -0.456327, 5.17261e-05, 0.000145197, -0.385506,
(14,0,0): -0.456104, 4.70343e-05, 0.000132233, -0.385266,
(15,0,0): -0.455876, 4.23064e-05, 0.000118865, -0.384958,
(16,0,0): -0.455642, 3.75313e-05, 0.000105389, -0.384727,
(17,0,0): -0.455401, 3.28399e-05, 9.14743e-05, -0.384003,
(18,0,0): -0.455156, 2.8163e-05, 7.78753e-05, -0.383767,
(19,0,0): -0.454906, 2.34884e-05, 6.38656e-05, -0.383458,
(20,0,0): -0.454651, 1.88027e-05, 4.98368e-05, -0.383254,
(21,0,0): -0.454391, 1.42361e-05, 3.52244e-05, -0.382537,
(22,0,0): -0.454126, 9.7012e-06, 2.09937e-05, -0.382315,
(23,0,0): -0.453857, 5.19925e-06, 6.3906e-06, -0.38203,
(24,0,0): -0.453584, 6.98514e-07, -8.21252e-06, -0.381862,
(25,0,0): -0.453306, -3.67274e-06, -2.30245e-05, -0.381237,
(26,0,0): -0.453024, -7.94918e-06, -3.83093e-05, -0.380764,
(27,0,0): -0.452738, -1.21586e-05, -5.32687e-05, -0.380583,
(28,0,0): -0.452449, -1.63557e-05, -6.83202e-05, -0.380448,
(29,0,0): -0.452154, -2.03918e-05, -8.40236e-05, -0.379714,
(30,0,0): -0.451857, -2.43435e-05, -9.92042e-05, -0.379488,
(31,0,0): -0.451556, -2.82304e-05, -0.000114692, -0.379188,
(32,0,0): -0.451252, -3.20665e-05, -0.000130099, -0.378971,
(33,0,0): -0.450943, -3.57783e-05, -0.000146182, -0.378183,
(34,0,0): -0.450632, -3.93452e-05, -0.000161409, -0.378106,
(35,0,0): -0.450317, -4.28594e-05, -0.000177522, -0.377424,
(36,0,0): -0.449999, -4.62308e-05, -0.000192897, -0.37736,
(37,0,0): -0.449677, -4.9511e-05, -0.000208634, -0.376804,
(38,0,0): -0.449352, -5.27159e-05, -0.00022439, -0.376356,
(39,0,0): -0.449023, -5.5786e-05, -0.000240405, -0.375873
}
}
}
}
_______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
