Problem with file loading in for loop

Asked by TUSHAR ANDRIYAS on 6 Jul 2012
Latest activity Commented on by TUSHAR ANDRIYAS on 6 Jul 2012

Hi there,

I am trying to analyze a bunch of mat files by loading them in a for loop. I am also saving the output in a structure. The code runs smoothly for a while but after some iterations exits with the following error:

HDF5-DIAG: Error detected in HDF5 (1.8.6) thread 0:
  #000: H5Dio.c line 174 in H5Dread(): can't read data
    major: Dataset
    minor: Read failed
  #001: H5Dio.c line 448 in H5D_read(): can't read data
    major: Dataset
    minor: Read failed
  #002: H5Dchunk.c line 1720 in H5D_chunk_read(): unable to read raw data chunk
    major: Low-level I/O
    minor: Read failed
  #003: H5Dchunk.c line 2748 in H5D_chunk_lock(): data pipeline read failed
    major: Data filters
    minor: Filter operation failed
  #004: H5Z.c line 1115 in H5Z_pipeline(): filter returned failure during read
    major: Data filters
    minor: Read failed
  #005: H5Zdeflate.c line 125 in H5Z_filter_deflate(): inflate() failed
    major: Data filters
    minor: Unable to initialize object
Error using load
Can't read file
/home/tushar/tushar/OXYGEN/part62_oxy_240.mat.
Error in PART_STATS(line 17)
    Data = load(files(ii).name); %......Data will store the latest file name
    variable (AS a struct)

When I ran the code on some other files, it ran without a problem. Could someone help me with this error.

Thanks,

Tushar

3 Comments

Walter Roberson on 6 Jul 2012

Could you try loading that file by itself and see if it works that way? We need to isolate whether the problem is the file, or is in the fact that a bunch of files were read in series.

per isakson on 6 Jul 2012

The mat-file, which causes this error, is most likely corrupt. Have you tried

>> load part62_oxy_240.mat

in the command window?

TUSHAR ANDRIYAS on 6 Jul 2012

Thanks guys,

It is that file that is the issue. It was corrupt. Hopefully I do not get such scary messages again. Thanks again for your time and help.

TUSHAR ANDRIYAS

Products

No products are associated with this question.

0 Answers

Contact us