Last modified: 30 October 2009
Tool Name: h5diff    
Syntax:
h5diff [OPTIONS] file1 file2 [object1 [object2 ] ]

ph5diff [OPTIONS] file1 file2 [object1 [object2 ] ]

Purpose:
Compare two HDF5 files and report the differences.

Description:
h5diff and ph5diff are command line tools that compare two HDF5 files, file1 and file2, and report the differences between them. h5diff is for serial use while ph5diff is for use in parallel environments.

Optionally, h5diff and ph5diff will compare two objects within these files. If only one object, object1, is specified, h5diff will compare object1 in file1 with object1 in file2. If two objects, object1 and object2, are specified, h5diff will compare object1 in file1 with object2 in file2.

object1 and object2 can be groups, datasets, named datatypes, or links and must be expressed as absolute paths from the respective file’s root group.

h5diff and ph5diff have the following output modes:

Normal mode Prints the number of differences found and where they occurred.
Report mode (-r) Prints the above plus the differences.
Verbose mode (-v)     Prints all of the above plus a list of objects and warnings.
Quiet mode (-q) Prints no output.
(h5diff always returns an exit code of 1 when differences are found.)

h5diff and NaNs:
h5diff detects when a value in a dataset is a NaN (a "not a number" value), but does not differentiate among various types of NaNs. Thus, when one NaN is compared with another NaN, h5diff treats them as equal; when a NaN is compared with a valid number, h5diff treats them as not equal.

Note that NaN detection is computationally expensive and slows h5diff performance dramatically. If you do not have NaNs in your files, or do not care about NaNs, use the -N option below to turn off NaN detection. Similarly, if h5diff -N produces unexpected differences, running h5diff without -N should reveal whether any of the differences are associated with NaN values.

Difference between h5diff and ph5diff:
With the following exception, h5diff and ph5diff behave identically. With ph5diff, the comparison of objects is shared across multiple processors, with the comparison of each pair of objects assigned to a single processor. I.e., the comparison of a single object, even a very large dataset, in each file is not shared.

Options and Parameters:

Exit Status:
0 No differences were found.
1 Some differences were found.
>1     An error occurred.

Examples:
The following h5diff call compares the object /a/b in file1 with the object /a/c in file2:
    h5diff file1 file2 /a/b /a/c

This h5diff call compares the object /a/b in file1 with the same object in file2:
    h5diff file1 file2 /a/b

And this h5diff call compares all objects in both files:
    h5diff file1 file2

History:
Release     Change
1.6.0 h5diff introduced in this release.
1.8.0 ph5diff introduced in this release.
h5diff command line syntax changed in this release.
1.8.2 and 1.6.8 Return value on failure changed in this release.
1.8.4 and 1.6.10   --use-system-epsilon option added in this release.