HDF5 V1.10

조회 수: 35 (최근 30일)
Norton Allen
Norton Allen 2018년 3월 17일
답변: Alexander Neumann 2021년 6월 29일
Can Matlab read/write HDF5 v1.10 files? If not, are there plans to add that support? I'm particularly interested in SWMR (Single Write Multiple Read) functionality, but I have not found any mention of that in the Matlab docs.

채택된 답변

Talmo Pereira
Talmo Pereira 2018년 3월 18일
MATLAB as of R2018a cannot read v1.10 HDF5 files and therefore support SWMR. The HDF5 library version used in either R2017b or R2018a:
>> [ver_major,ver_minor,ver_patch] = H5.get_libversion
ver_major =
1
ver_minor =
8
ver_patch =
12
"Word of Caution: Please note that HDF5 files created with SWMR access cannot not be read by the tools based on the HDF5 1.8 libraries due to the file format changes in the HDF5 1.10 version of the library. [...] One can use the h5repack or h5format_convert tools to convert an HDF5 file created by the HDF5 Library version 1.10.0 to be accessible by the HDF5 Library version 1.8. The h5repack tool rewrites the whole file; h5format_convert modifies the file “in place” by rewriting only metadata information according to the 1.8 format while leaving raw data intact."
Here's what happens if you try to query a SWMR-enabled file:
>> h5disp('swmr_test.h5')
Error using h5infoc
The filename specified was either not found on the MATLAB path or it contains unsupported characters.
Error in h5info (line 102)
hinfo = h5infoc(filename,location, useUtf8);
Error in h5disp>display_hdf5 (line 112)
hinfo = h5info(options.Filename,options.Location);
Error in h5disp (line 90)
display_hdf5(options);
Using the commandline tool provided with the official library:
>> !h5ls swmr_test.h5
x Dataset {64, 64, 1, 1000/Inf}
It would be terrific if MathWorks considered reaching feature parity with the HDF5 library or leading wrappers like h5py within at least 1-2 years of breaking changes :)...
  댓글 수: 4
Jasmin Jestel
Jasmin Jestel 2018년 7월 4일
Thank you for your help, it is much appreciated!
Paul Ryan
Paul Ryan 2018년 10월 17일
I still can't get this to work in python. Would you be able to share exactly what you did?

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Alexander Neumann
Alexander Neumann 2021년 6월 29일
MATLAB 2021b (Prerelease)
>> [majnum,minnum,relnum] = H5.get_libversion()
majnum =
1
minnum =
10
relnum =
7
so it has finally been updated

Jarom Nelson
Jarom Nelson 2019년 9월 18일
편집: Jarom Nelson 2019년 9월 18일
h5repack and h5format_convert are available with the HDF5 1.10.x software to update a file to be compatible with HDF5 1.8.x.
One can use the h5repack or h5format_convert tools to convert an HDF5 file created by the HDF5 Library version 1.10.0 to be accessible by the HDF5 Library version 1.8. The h5repack tool rewrites the whole file; h5format_convert modifies the file “in place” by rewriting only metadata information according to the 1.8 format while leaving raw data intact.

카테고리

Help CenterFile Exchange에서 HDF5에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by