Hello,

I'm learning HDF API and I try to use the H5Sselect_elements function in
order to write ramdom 4D point data.
My dataset is 100x100x25x1024 (the last dimension is extendible to
H5S_UNLIMITED) with a chunk size of 25.

------------------------------------------------------------------
// Selected point data space
hsize_t memArrayDim = DS3D_WRITE_BUFFER_SIZE;
hid_t memArray_s_id = H5Screate_simple( 1, &memArrayDim, NULL );
hid_t ds3d_select_s_id = H5Screate_simple( ds3dDSRank, ds3dDims, NULL );
H5Sselect_elements( ds3d_select_s_id, H5S_SELECT_SET,
DS3D_WRITE_BUFFER_SIZE, ( hsize_t* )coords );

// Write the new index into the right position
H5Dwrite( ds3d_current_d_id, H5T_NATIVE_INT, memArray_s_id,
ds3d_select_s_id, H5P_DEFAULT, tubeIndexValues );
------------------------------------------------------------------

I tried here to commit "DS3D_WRITE_BUFFER_SIZE" values at a time.
"coords" contains an array of 4D point coordinates,
"tubeIndexValues" contains the actual values

The main constraint is that I can't store the whole dataset in RAM to make a
single write call and I have to write data ramdomly (no other way I'm
affraid), point by point.

The H5Dwrite function works fine, but it takes about 22 seconds to store 2
data  (DS3D_WRITE_BUFFER_SIZE = 2). The time consumption seems to be linear
with DS3D_WRITE_BUFFER_SIZE...

Is that normal ? Is there a mean to write my random data quickly ?

Thanks,

Yves


--
View this message in context: 
http://hdf-forum.184993.n3.nabble.com/H5Sselect-elements-works-very-slowly-tp3375637p3375637.html
Sent from the hdf-forum mailing list archive at Nabble.com.

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to