h5diff
[OPTIONS]
file1 file2
[object1 [object2 ] ]
ph5diff
[OPTIONS]
file1 file2
[object1 [object2 ] ]
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.
H5Tequal
.
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.
-h
or
--help |
Print help message. |
-V
or
--version |
Print version number and exit. |
-r
or
--report |
Report mode — Print the differences. |
-v
or
--verbose |
Verbose mode — Print the differences, a list of objects, and warnings. |
-q
or
--quiet |
Quiet mode — Do not print output. |
-N
or
--nan |
Disables NaN detection;
see “h5diff and NaNs” above.
|
-n count
or
--count= count |
Print difference up to count differences, then stop. count must be a positive integer. |
-d delta
or
--delta= delta |
Print only differences that are greater than the
limit delta. delta must be a positive number.
The comparison criterion is whether the absolute value of the
difference of two corresponding values is greater than
delta
(e.g., |a–b| > delta ,
where a is a value in file1 and
b is a value in file2). |
-p relative
or
--relative= relative |
Print only differences that are greater than a
relative error. relative must be a positive number.
The comparison criterion is whether the absolute value of the
difference 1 and the ratio of two corresponding
values is greater than relative
(e.g., |1–(b/a)| > relative
where a is a value in file1 and
b is a value in file2). |
--use-system-epsilon
|
Return a difference if and only if the difference
between two data values exceeds the system value for epsilon.
That is, if a is a data value in one dataset,
b is the corresponding data value in the
dataset with which the first dataset is being compared, and
epsilon is the system epsilon,
return a difference if and only if
|a-b| > epsilon .
Default: Without this option, h5diff checks for strict equality.
This option has no single-letter short form. |
file1 file2 | The HDF5 files to be compared. |
object1 object2 | Specific object(s) within the files to be compared. |
0 | No differences were found. |
1 | Some differences were found. |
>1 | An error occurred. |
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
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. |