HDF5 Tools Update Peter Cao - The HDF Group xcao@hdfgroup .org November 6, 2007 This report is based upon work supported in part by a Cooperative Agreement with NASA under NASA NNX06AC83A. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Aeronautics and Space Administration.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
This report is based upon work supported in part by a Cooperative Agreement with NASA under NASA NNX06AC83A. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Aeronautics and Space Administration.
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 2
Outline
Overview of current tools
New tools in HDF5
HDF-Java 2.4 release
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 3
Readers • h5dump, h5diff, h5ls• new tools: h5check, h5stat
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 10
h5diff
BetweenShow Differences
two objects or two files
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 11
h5diff SDS.h5 SDS2.h5
Dataset: </IntArray> and </IntArray>5 differences found
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 12
Report differences
Dataset: </IntArray> and </IntArray>position IntArray IntArray difference ------------------------------------------------------
[ 0 0 ] 0 10 10
[ 1 0 ] 10 100 90
[ 2 0 ] 20 200 180
[ 3 0 ] 30 300 270
[ 4 0 ] 40 400 360
5 differences found
h5diff SDS.h5 SDS2.h5 -r /IntArray
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 13
h5repack
Copies a file to a new file with • Compression filter• Data layout• Other user options
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 14
h5repack: new filters
-f {GZIP|SZIP|SHUF|FLET|NBIT|SOFF|NONE}
For exampleh5repack -i SDS.h5 -o out.h5 -f GZIP=6
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 15
h5repack: data layout
-l {CHUNK| COMPA| CONTI}
For example
h5repack -i SDS.h5 -o out.h5 -l CHUNK=2x3
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 16
h5repack: latest version of file format
h5repack options File size in bytes
Original file 3,167,264
--latest 2,267,346
--latest –compact=9 2,162,254
--latest –compact=9 –ssize=50:dtype 299,882
The testing file was created with HDF5 1.6.5. The root group of the file contains 100 groups. Each group at the root contains 9 sub groups. Each sub group contains one compound dataset. The compound dataset has 40 members of 32 bit integer
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 17
h5repart
Repartitions a file into a family of files
For example
h5repart -m 200m int16kx16k.h5 part200m%d.h5
977 MB
200 MB part200m0.h5
200 MB part200m1.h5
200 MB part200m2.h5
200 MB part200m3.h5
177 MB part200m4.h5
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 18
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 29
h5stat
Prints statistics about HDF5 file• Header size• Raw data size• Attributes, datatypes, and etc.
Helps • To troubleshoot overhead in HDF5 files
• To choose specific object’s properties and storage strategies
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 30
h5check
A validation tool that verifies if an HDF5 file is encoded according to the HDF5 File Format Specification
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 31
Why h5check?
• Verify if the file is compliant with the File Format
• As a verification tool required by the application of HDF5 File Format to be an ANSI standard
• Serves as a watch dog that the HDF5 library implementation is compliant with the File Format
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 32
Example: a compliant file
• % h5check example1.h5• VALIDATING example1.h5• FOUND super block signature• VALIDATING the super block at 0...• VALIDATING the object header at 928...• VALIDATING the btree at 384...• FOUND btree signature.• VALIDATING the local heap at 96...• FOUND local heap signature.• …• Result: File is in compliance.
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 33
Example: a non-compliant file
h5check invalid2.h5
• FOUND super block signature• VALIDATING the super block at 0...• VALIDATING the object header at 928...• VALIDATING the btree at 384...• FOUND btree signature.• VALIDATING the SNOD at 1248...• FOUND SNOD signature.• VALIDATING the object header at 976...• check_sym(at 1248): Errors from check_obj_header()• decode_validate_messages(): Failure in type->decode().• H5O_sdspace_decode(): Bad version number in simple dataspace
message.• VALIDATING the local heap at 96...• FOUND local heap signature.• Main(): Errors from check_obj_header().• decode_validate_messages(): Failure in type->decode().• H5O_attr_decode(): Can't decode attribute dataspace.• H5O_sdspace_decode(): Bad version number in simple dataspace
message.• …• Result: File is not in compliance.
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 34
Implementation Status
Basic file format components
1.6 - DONE1.8 - IN PROGRESS
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 35
HDF-Java 2.4
http://www.hdfgroup.org/hdf-java-html
ftp://ftp.hdfgroup.org/HDF5/hdf-java
HDF-Java 2.4 Released !!
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 36
HDF-Java 2.4 Release
• Build with HDF4 2r2 and HDF5 1.6.6• New platforms
Mac intelLinux 64-bit AMD Solaris 64-bit
• 36 new enhancements and 44 bugs fixed• Fixed memory leak• Test suite• Enhanced documentation
11/6/07 HDF and HDF-EOS Workshop XI, Landover, MD 37