September 9, 2008SPEEDUP Workshop - HDF5 Tutorial1 Introduction to HDF5 Command-line Tools.

Slides:



Advertisements
Similar presentations
The HDF Group HDF Tools Tutorial September 28-30, 2010HDF and HDF-EOS Workshop XIV1 Peter Cao, The HDF Group Jonathan Kim, The HDF Group.
Advertisements

The HDF Group November 3-5, 2009HDF/HDF-EOS Workshop XIII1 HDF5 Advanced Topics Elena Pourmal The HDF Group The 13 th HDF and HDF-EOS.
ILDG File Format Chip Watson, for Middleware & MetaData Working Groups.
HDF4 and HDF5 Performance Preliminary Results Elena Pourmal IV HDF-EOS Workshop September
The HDF Group Introduction to HDF5 Barbara Jones The HDF Group The 13 th HDF & HDF-EOS Workshop November 3-5, HDF/HDF-EOS Workshop.
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
Status of netCDF-3, netCDF-4, and CF Conventions Russ Rew Community Standards for Unstructured Grids Workshop, Boulder
© 2008The MathWorks, Inc. ® ® The MATLAB Low-Level HDF5 Interface John Evans.
March 9, th International LCI Conference - HDF5 Tutorial1 Tutorial II: HDF5 and NetCDF-4 10 th International LCI Conference Albert Cheng, Neil Fortner.
Support for NPP/NPOESS by The HDF Group Mike Folk, Elena Pourmal, Peter Cao The HDF Group June 30, NPOESS Data Formats Working Group.
1 of 14 Substituting HDF5 tools with Python/H5py scripts Daniel Kahn Science Systems and Applications Inc. HDF HDF-EOS Workshop XIV, 28 Sep
HDF5 Tools Update Peter Cao - The HDF Group November 6, 2007 This report is based upon work supported in part by a Cooperative Agreement.
HDF 1 HDF5 Advanced Topics Object’s Properties Storage Methods and Filters Datatypes HDF and HDF-EOS Workshop VIII October 26, 2004.
The HDF Group April 17-19, 2012HDF/HDF-EOS Workshop XV1 Introduction to HDF5 Barbara Jones The HDF Group The 15 th HDF and HDF-EOS Workshop.
1 High level view of HDF5 Data structures and library HDF Summit Boeing Seattle September 19, 2006.
HDF5 A new file format & software for high performance scientific data management.
DM_PPT_NP_v01 SESIP_0715_AJ HDF Product Designer Aleksandar Jelenak, H. Joe Lee, Ted Habermann Gerd Heber, John Readey, Joel Plutchak The HDF Group HDF.
Sep , 2010HDF/HDF-EOS Workshop XIV1 HDF5 Advanced Topics Neil Fortner The HDF Group The 14 th HDF and HDF-EOS Workshop September 28-30, 2010.
April 6, 2010GMQS Meeting1 Optional Feature Support in HDF5 Tools Albert Cheng The HDF Group.
A Metadata Based Approach For Supporting Subsetting Queries Over Parallel HDF5 Datasets Vignesh Santhanagopalan Graduate Student Department Of CSE.
February 2-3, 2006SRB Workshop, San Diego P eter Cao, NCSA Mike Wan, SDSC Sponsored by NLADR, NFS PACI Project in Support of NCSA-SDSC Collaboration Object-level.
By Noorez Kassam Welcome to JNI. Why use JNI ? 1. You already have significantly large and tricky code written in another language and you would rather.
May 30-31, 2012HDF5 Workshop at PSI1 HDF5 at Glance Quick overview of known topics.
The HDF Group HDF5 Datasets and I/O Dataset storage and its effect on performance May 30-31, 2012HDF5 Workshop at PSI 1.
HDF 1 New Features in HDF Group Revisions HDF and HDF-EOS Workshop IX November 30, 2005.
The netCDF-4 data model and format Russ Rew, UCAR Unidata NetCDF Workshop 25 October 2012.
April 28, 2008LCI Tutorial1 Introduction to HDF5 Tools Tutorial Part II.
The HDF Group HDF5 Tools Updates Peter Cao, The HDF Group September 28-30, 20101HDF and HDF-EOS Workshop XIV.
The HDF Group October 28, 2010NetcDF Workshop1 Introduction to HDF5 Quincey Koziol The HDF Group Unidata netCDF Workshop October 28-29,
October 15, 2008HDF and HDF-EOS Workshop XII1 What will be new in HDF5?
1 N-bit and ScaleOffset filters MuQun Yang National Center for Supercomputing Applications University of Illinois at Urbana-Champaign Urbana, IL
Advanced Utilities Extending ncgen to support the netCDF-4 Data Model Dr. Dennis Heimbigner Unidata netCDF Workshop August 3-4, 2009.
Update on HDF5 1.8 The HDF Group HDF and HDF-EOS Workshop X November 28, 2006HDF.
1 HDF5 Life cycle of data Boeing September 19, 2006.
May 30-31, 2012 HDF5 Workshop at PSI May Shared Object Headers Dana Robinson The HDF Group Efficient Use of HDF5 With High Data Rate X-Ray Detectors.
The HDF Group Support for NPP/NPOESS by The HDF Group Mike Folk, Elena Pourmal, Peter Cao The HDF Group November 5, 2009 November 3-5,
The HDF Group November 3-5, 2009HDF/HDF-EOS Workshop XIII1 HDF5 Advanced Topics Elena Pourmal The HDF Group The 13 th HDF and HDF-EOS.
November 30, 2005HDF & HDF-EOS Workshop IX Peter Cao, NCSA November 30, 2005 HDF5 Tools.
The HDF Group Introduction to netCDF-4 Elena Pourmal The HDF Group 110/17/2015.
The HDF Group HDF5 Chunking and Compression Performance tuning 10/17/15 1 ICALEPCS 2015.
The HDF Group HDF Group Support for NPP/JPSS Mike Folk, Elena Pourmal, Larry Knox, Albert Cheng The HDF Group DEWG Meeting June 19, 2012.
The HDF Group Single Writer/Multiple Reader (SWMR) 110/17/15.
The HDF Group 10/17/151 HDF5 Tools Tutorial ICALEPCS 2015.
March 9, th International LCI Conference - HDF5 Tutorial1 HDF5 Advanced Topics.
Summary of HDF-EOS5 Files, Data Model and File Format Abe Taaheri, Raytheon IIS HDF & HDF-EOS Workshop XI November 2007.
The HDF Group 10/17/15 1 HDF5 vs. Other Binary File Formats Introduction to the HDF5’s most powerful features ICALEPCS 2015.
April 28, 2008LCI Tutorial1 Parallel HDF5 Tutorial Tutorial Part IV.
NTFS Filing System CHAPTER 9. New Technology File System (NTFS) Started with Window NT in 1993, Windows XP, 2000, Server 2003, 2008, and Window 7 also.
The HDF Group January 8, ESIP Winter Meeting Data Container Study: HDF5 in a POSIX File System or HDF5 C 3 : Compression, Chunking,
The HDF Group 10/17/151 Introduction to HDF5 ICALEPCS 2015.
The HDF Group Single Writer/Multiple Reader (SWMR) 110/17/15.
The HDF Group Introduction to HDF5 Session 7 Datatypes 1 Copyright © 2010 The HDF Group. All Rights Reserved.
Utilities for netCDF-4 Dr. Dennis Heimbigner Unidata Advanced netCDF Workshop July 25, 2011.
NetCDF Data Model Details Russ Rew, UCAR Unidata NetCDF 2009 Workshop
Copyright © 2010 The HDF Group. All Rights Reserved1 Data Storage and I/O in HDF5.
The HDF Group Introduction to HDF5 Session Three HDF5 Software Overview 1 Copyright © 2010 The HDF Group. All Rights Reserved.
HDF and HDF-EOS Workshop XII
Elena Pourmal The HDF Group
Moving from HDF4 to HDF5/netCDF-4
Introduction to HDF5 Session Five Reading & Writing Raw Data Values
HDF5 Metadata and Page Buffering
Introduction to HDF5 Tutorial.
What NetCDF users should know about HDF5?
Operation System Program 4
HDF5 Virtual Dataset Elena Pourmal Copyright 2017, The HDF Group.
Peter Cao The HDF Group November 28, 2006
Introduction to HDF5 Mike McGreevy The HDF Group
Moving applications to HDF
Hierarchical Data Format (HDF) Status Update
HDF5 Tools Updates and Discussions
Presentation transcript:

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial1 Introduction to HDF5 Command-line Tools

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial2 HDF5 Command-line Tools Readers h5dump, h5diff, h5ls h5stat, h5check (new in release 1.8) Writers h5import, h5repack, h5repart, h5jam/h5unjam h5copy, h5mkgrp (new in release 1.8) Converters h4toh5, h5toh4, gif2h5, h52gif

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial3 h5dump h5dump: exports (dumps) the contents of an HDF5 file  Multiple output types  ASCII  binary  XML  Complete or selected file content  Object header information (the structure)  Attributes (the metadata)  Datasets (the data)  All dataset values  Subsets of dataset values  Properties (filters, storage layout, fill value)  Specific objects: groups/ datasets/ attributes / named datatypes / soft links  h5dump –help  Lists all option flags

Example: h5dump HDF5 "Sample.h5" { GROUP "/" { GROUP "Floats" { DATASET "FloatArray" { DATATYPE H5T_IEEE_F32LE DATASPACE SIMPLE { ( 4, 3 ) / ( 4, 3 ) } DATA { (0,0): 0.01, 0.02, 0.03, (1,0): 0.1, 0.2, 0.3, (2,0): 1, 2, 3, (3,0): 10, 20, 30 } DATASET "IntArray" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 5, 6 ) / ( 5, 6 ) } DATA { (0,0): 0, 1, 2, 3, 4, 5, (1,0): 10, 11, 12, 13, 14, 15, (2,0): 20, 21, 22, 23, 24, 25, (3,0): 30, 31, 32, 33, 34, 35, (4,0): 40, 41, 42, 43, 44, 45 } No options: “All” contents to standard out September 9, 2008SPEEDUP Workshop - HDF5 Tutorial4 % h5dump Sample.h5

h5dump - object header information HDF5 "Sample.h5" { GROUP "/" { GROUP "Floats" { DATASET "FloatArray" { DATATYPE H5T_IEEE_F32LE DATASPACE SIMPLE { ( 4, 3 ) / ( 4, 3 ) } } DATASET "IntArray" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 5, 6 ) / ( 5, 6 ) } } -H option: Object header information September 9, 2008SPEEDUP Workshop - HDF5 Tutorial5 % h5dump –H Sample.h5

h5dump – specific dataset HDF5 "Sample.h5" { DATASET "/Floats/FloatArray" { DATATYPE H5T_IEEE_F32LE DATASPACE SIMPLE { ( 4, 3 ) / ( 4, 3 ) } DATA { (0,0): 0.01, 0.02, 0.03, (1,0): 0.1, 0.2, 0.3, (2,0): 1, 2, 3, (3,0): 10, 20, 30 } -d dataset option: Specific dataset September 9, 2008SPEEDUP Workshop - HDF5 Tutorial6 % h5dump –d /Floats/FloatArray Sample.h5

h5dump – dataset values to file HDF5 "Sample.h5" { DATASET "/IntArray" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 5, 6 ) / ( 5, 6 ) } DATA { } -o file option: Dataset values output to file September 9, 2008SPEEDUP Workshop - HDF5 Tutorial7 % h5dump –o Ofile –d /IntArray Sample.h5 (0,0): 0, 1, 2, 3, 4, 5, (1,0): 10, 11, 12, 13, 14, 15, (2,0): 20, 21, 22, 23, 24, 25, (3,0): 30, 31, 32, 33, 34, 35, (4,0): 40, 41, 42, 43, 44, 45 % cat Ofile -y option: Do not output array indices with data values

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial8 h5dump – binary output -b FORMAT option: Binary output, FORMAT can be: MEMORY  Data exported with datatypes matching memory on system where h5dump is run. FILE  Data exported with datatypes matching those in HDF5 file being dumped. LE  Data exported with pre-defined little endian datatype. BE  Data exported with pre-defined big endian datatype. Typically used with –d dataset -o outputFile options  Allows data values to be exported for use with other applications.  When –b and –d used together, array indices are not output.

h5dump – binary output September 9, 2008SPEEDUP Workshop - HDF5 Tutorial9 % h5dump –b BE –d /IntArray -o OBE Sample.h5 % od –b OBE | head -2 % h5dump –b LE –d /IntArray -o OLE Sample.h5 % od –b OLE | head % h5dump –b MEMORY –d /IntArray -o OME Sample.h5 % od –b OME | head

h5dump – properties information HDF5 "Sample.h5" { GROUP "/" { GROUP "Floats" { DATASET "FloatArray" { DATATYPE H5T_IEEE_F32LE DATASPACE SIMPLE { ( 4, 3 ) / ( 4, 3 ) } STORAGE_LAYOUT { CONTIGUOUS SIZE 48 OFFSET 3696 } FILTERS { NONE } FILLVALUE { FILL_TIME H5D_FILL_TIME_IFSET VALUE 0 } ALLOCATION_TIME { H5D_ALLOC_TIME_LATE } … -p option: Print dataset filters, storage layout, fill value September 9, 2008SPEEDUP Workshop - HDF5 Tutorial10 % h5dump –p –H Sample.h5

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial11 h5import h5import: loads data into an existing or new HDF5 file Data loaded from ASCII or binary files Each file corresponds to data values for one dataset Integer (signed or unsigned) and float data can be loaded Per-dataset settable properties include: datatype (int or float; size; architecture; byte order) storage (compression, chunking, external file, maximum dimensions) Properties set via command line % h5import in in_opts [in2 in2_opts] –o out configuration file % h5import in –c conf1 [in2 –c conf2] –o out

Example: h5import PATH /Floats/FloatArray INPUT-CLASS TEXTFP RANK 2 DIMENSION-SIZES 4 3 Create Sample2.h5 based on Sample.h5 September 9, 2008SPEEDUP Workshop - HDF5 Tutorial12 % cat config.FloatArray % cat in.FloatArray HDF5 "Sample.h5" { DATASET “/Float/FloatArray" { DATATYPE H5T_IEEE_F32LE DATASPACE SIMPLE { ( 4, 3 ) / ( 4, 3 ) } DATA { 0.01, 0.02, 0.03, 0.1, 0.2, 0.3, 1, 2, 3, 10, 20, 30 } % h5dump –d Floats/FloatArray –y Sample.h5

Example: h5import PATH /IntArray INPUT-CLASS TEXTIN RANK 2 DIMENSION-SIZES 5 6 September 9, 2008SPEEDUP Workshop - HDF5 Tutorial13 % cat config.IntArray % cat in.IntArray  Input and configuration files ready; issue command % h5import in.FloatArray -c config.FloatArray \ in.IntArray -c config.IntArray -o Sample2.h5

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial14 h5mkgrp h5mkgrp: makes groups in an HDF5 file. Usage: h5mkgrp [OPTIONS] FILE GROUP... OPTIONS -h, --help Print a usage message and exit -l, --latest Use latest version of file format to create groups -p, --parents No error if existing, make parent groups as needed -v, --verbose Print information about OBJECTS and OPTIONS -V, --version Print version number and exit Example: % h5mkgrp Sample2.h5 /EmptyGroup Introduced in HDF5 release

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial15 h5diff h5diff: compares HDF5 files and reports differences compare two HDF5 files % h5diff file1 file2 compare same object in two files % h5diff file1 file2 object compare different objects in two files % h5diff file1 file2 object1 object2 Option flags: none: report number of differences found in objects and where they occurred -r: in addition, report the differences -v: in addition, print list of object(s) and warnings; typically used when comparing two files without specifying object(s)

Example: h5diff file1 file x x / x /EmptyGroup x x /Floats x x /Floats/FloatArray x x /IntArray group : and 0 differences found group : and 0 differences found dataset: and 0 differences found dataset: and size: [5x6] [5x6] position IntArray IntArray difference [ 3 3 ] September 9, 2008SPEEDUP Workshop - HDF5 Tutorial16 % h5diff –v Sample.h5 Sample2.h5

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial17 h5repack h5repack: copies an HDF5 file to a new file with specified filter and storage layout Removes unused space introduced when…  Objects were deleted  Compressed datasets were updated and no longer fit in original space  Full space allocated for variable-length data not used Optionally applies filter to datasets  gzip, szip, shuffle, checksum Optionally applies storage layout to datasets  Continuous, chunking, compact

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial18 h5repack: filters Compression will not be performed if data is smaller than 1K unless –m flag is used. -f FILTER option: Apply filter, FILTER can be: GZIP to apply GZIP compression SZIPto apply SZIP compression SHUFto apply the HDF5 shuffle filter FLET to apply the HDF5 checksum filter NBITto apply NBIT compression SOFF to apply the HDF5 Scale/Offset filter NONE to remove all filters

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial19 h5repack: storage layout -f LAYOUT option: Apply layout, LAYOUT can be: CHUNK to apply chunking layout COMPAto apply compact layout CONTIto apply continuous layout

 33% reduction in file size Example: h5repack (filter) TES-Aura.he TES-rp.he5 September 9, 2008SPEEDUP Workshop - HDF5 Tutorial20 % h5repack –f SHUF –f GZIP=1 TES-Aura.he5 \ TES-rp.he5 % ls –sk TES-Aura.he5 TES-rp.he5 Tropspheric Emission Spectrometer on Aura, the third of NASA's Earth Observing System's spacecrafts. Makes global 3-d measurements of ozone and other chemical species involved in its formation and destruction.

Example: h5repack (layout) September 9, 2008SPEEDUP Workshop - HDF5 Tutorial21 % h5repack –m 1 –l Floats/FloatArray:CHUNK=4x1 \ Sample.h5 Sample-rp.h5 HDF5 "Sample-rp.h5" { GROUP "/" { GROUP "Floats" { DATASET "FloatArray" { DATATYPE H5T_IEEE_F32LE DATASPACE SIMPLE { ( 4, 3 ) / ( 4, 3 ) } STORAGE_LAYOUT { CHUNKED ( 4, 1 ) SIZE 48 } FILTERS { NONE } FILLVALUE { FILL_TIME H5D_FILL_TIME_IFSET VALUE 0 } ALLOCATION_TIME { H5D_ALLOC_TIME_INCR } … % h5dump –p –H Sample-rp.h5

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial22 Performance Tuning & Troubleshooting HDF5 tools can assist with performance tuning and troubleshooting  Discover objects and their properties in HDF5 files h5dump -p  Get file size overhead information h5stat  Find locations of objects in a file h5ls  Discover differences h5diff, h5ls  Location of raw data h5ls –var  Does file conform to HDF5 File Format Specification? h5check

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial23 h5stat h5stat: Prints statistics about HDF5 files Reports two types of statistics:  High-level information about objects:  Number of different objects (groups, datasets, datatypes)  Number of unique datatypes  Size of raw data  Information about object’s structural metadata  Size of structural metadata (total/free) Object header, local and global heaps Size of B-trees  Object header fragmentation

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial24 h5stat Helps…  troubleshoot size overhead in HDF5 files  choose appropriate properties and storage strategies Usage: % h5stat –help % h5stat file.h5 Full specification at :  Introduced in HDF5 release

h5check Verifies that a file is encoded according to the HDF5 File Format Specification  Does not use the HDF5 library Used to confirm that the files written by the HDF5 library are compliant with the specification Tool is not part of the HDF5 source code distribution  ftp://ftp.hdfgroup.org/HDF5/special_tools/h5check/ ftp://ftp.hdfgroup.org/HDF5/special_tools/h5check/ September 9, 2008SPEEDUP Workshop - HDF5 Tutorial25

September 9, 2008SPEEDUP Workshop - HDF5 Tutorial26 Questions?