Dear h5 experts
I am writting a matlab code(very simliar to c++) to save large number of
images onto a h5 dataset but a odd error('could not open file') persistantly
pops out while a loop is being executed. It was totally fine for the first
35000 executions and out of sudden the h5 file can not be opened.
Initially I thought it was a memory shortage problem, then i re-organized my
function structure to optmise memory usage, the error still appears. Did
anyone experienced similar problem? I would be very grateful if you could
shed some light on this.
My code structure is very simple:
>>>>>>create dataspace, datatype, h5 file and a dataset
>>>>>>create timer object to save images very 10 seconds
>>>>>>write image data onto the dataset.
--------------------------------------------------------------------------------------
* for n = 1:i_num_t
d1_start = fliplr([0 (i_num1+n-1)*i_info.i_size(2)]);
d1_data = imread([i_info.i_folder i_name{n}]);
sd1_file_id = H5D.get_space(h5_id.d1);
H5S.select_hyperslab(sd1_file_id, 'H5S_SELECT_SET',...
d1_start, d_hyper.stride,d_hyper.d_count,
d_hyper.block)
H5D.write(h5_id.d1, 'H5ML_DEFAULT', d_space.d1_m,
sd1_file_id,...
'H5P_DEFAULT', d1_data)
H5D.set_extent(h5_id.d1, fliplr([i_info.i_size(1)
(i_num1+n+1)*i_info.i_size(2)]));
end *
--------------------------------------------------------------------------------------
One question in my mind is that whether i need to close h5 dataset within my
for loop and re-open it in every iteration. Someone is saying that windows
ran out of file handle, but if that is the case, different error message
will come out i suppose.
Many thanks in advance!
Jun
--
View this message in context:
http://hdf-forum.184993.n3.nabble.com/A-Very-odd-error-When-saving-large-number-of-images-in-h5-using-Matlab-tp3695005p3695005.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