VDS: H5Pset_virtual error for unlimited dimension


#1

Hi folks,
I am trying to understand VDS to implement for my application. I was able to implement a test program using fixed size sources and fixed size VDS. However, I am having some trouble when using unlimited dimensions similar to the Excalibur Use case in the VDS RFC.

I am attempting to create a VDS using four datasets present in the one file. The source datasets are as below:

GROUP "/" {
   DATASET "mydset_1" {
      DATATYPE  H5T_IEEE_F64LE
      DATASPACE  SIMPLE { ( 10, 7, 4 ) / ( H5S_UNLIMITED, 7, 4 ) }
   }
   DATASET "mydset_2" {
      DATATYPE  H5T_IEEE_F64LE
      DATASPACE  SIMPLE { ( 7, 5, 3 ) / ( H5S_UNLIMITED, 5, 3 ) }
   }
   DATASET "mydset_3" {
      DATATYPE  H5T_IEEE_F64LE
      DATASPACE  SIMPLE { ( 3, 7, 6 ) / ( H5S_UNLIMITED, 7, 6 ) }
   }
   DATASET "mydset_4" {
      DATATYPE  H5T_IEEE_F64LE
      DATASPACE  SIMPLE { ( 12, 5, 7 ) / ( H5S_UNLIMITED, 5, 7 ) }
   }
}

When I attempt to map /mydset_1 using the code below, I get the error:

    H5D_virtual_check_mapping_post    unlimited virtual selection, limited
    source selection, and no printf specifiers in source names
    H5Pset_virtual                    invalid mapping entry

The code is below:

hid_t dcplID = H5Pcreate(H5P_DATASET_CREATE);
if( dcplID < 0 ) {
	fprintf("Coult not create DCPL\n");
	return -1;
}

// Create the dataspace for a variable-size VDS
hsize_t vdsH5Dims[] = {1, 12, 10};
hsize_t vdsH5MaxDims[] = {H5S_UNLIMITED, 12, 10}; 
hid_t vdsSpaceID = H5Screate_simple(3, vdsH5Dims, vdsH5MaxDims);
if( vdsSpaceID < 0 ) {
	fprintf("Could not create Dataspace ID for Virtual Dataset\n");
	return -1;
}

// Setup the mappings for /mydset_1
hsize_t srcH5Dims[] = {1, 7, 4};
hsize_t srcH5MaxDims[] = {H5S_UNLIMITED, 7, 4};
hid_t src1SpaceID = H5Screate_simple(3, srcH5Dims, srcH5MaxDims);
if( src1SpaceID < 0 ) {
	fprintf("Could not create Dataspace ID for Source Dataset\n");
	return -1;
}

hsize_t vdsH5Start[] = {0, 0, 0};
hsize_t vdsH5Stride[] = {1, 1, 1};
hsize_t vdsH5Block[] = {1, 7, 4};
hsize_t vdsH5Count[] = {H5S_UNLIMITED, 1, 1};
herr_t status = H5Sselect_hyperslab(vdsSpaceID, H5S_SELECT_SET, vdsH5Start, vdsH5Stride, vdsH5Count, vdsH5Block);
if( status < 0 ) {
	fprintf("Could not select VDS hyperslab\n");
	return -1;
}

// Specify the mapping
status = H5Pset_virtual(dcplID, vdsSpaceID, "mysourcefile.h5", "/mydset_1", src1SpaceID); // This line of code fails
if( status < 0 ) {
	fprintf("Could not set the virtual mapping\n");
	return -1;
}

Would appreciate any help.

Thanks,
Dinesh


#2

I figured this one out. The issue was that I was not specifying the mapping for the source dataset. I am ALL set!

Dinesh