diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-11-04 18:37:08 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-11-04 18:37:08 (GMT) |
commit | 2cd2c8b3a4c3683aa84e31fa7dd1674827f6eb41 (patch) | |
tree | 3854b9486fe0c5a45d7c78596c9367173304d016 /tools | |
parent | a71ea2826da27ed84023d8feddd27156c2e346e5 (diff) | |
download | hdf5-2cd2c8b3a4c3683aa84e31fa7dd1674827f6eb41.zip hdf5-2cd2c8b3a4c3683aa84e31fa7dd1674827f6eb41.tar.gz hdf5-2cd2c8b3a4c3683aa84e31fa7dd1674827f6eb41.tar.bz2 |
[svn-r16028] reverse to 16026, before code freeze
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5diff/testfiles/h5diff_70.txt | 378 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_80.txt | 252 | ||||
-rw-r--r-- | tools/lib/h5diff_array.c | 384 | ||||
-rw-r--r-- | tools/lib/h5diff_util.c | 22 |
4 files changed, 468 insertions, 568 deletions
diff --git a/tools/h5diff/testfiles/h5diff_70.txt b/tools/h5diff/testfiles/h5diff_70.txt index a89cfdc..e3242ba 100644 --- a/tools/h5diff/testfiles/h5diff_70.txt +++ b/tools/h5diff/testfiles/h5diff_70.txt @@ -10,10 +10,10 @@ attribute: <string of </dset>> and <string of </dset>> size: [2] [2] position string of </dset> string of </dset> difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] a z +[ 0 ] b z +[ 1 ] d z +[ 1 ] e z 4 differences found attribute: <bitfield of </dset>> and <bitfield of </dset>> size: [2] [2] @@ -84,18 +84,18 @@ attribute: <string2D of </dset>> and <string2D of </dset>> size: [3x2] [3x2] position string2D of </dset> string2D of </dset> difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] a z +[ 0 0 ] b z +[ 0 1 ] c z +[ 0 1 ] d z +[ 1 0 ] e z +[ 1 0 ] f z +[ 1 1 ] g z +[ 1 1 ] h z +[ 2 0 ] i z +[ 2 0 ] j z +[ 2 1 ] k z +[ 2 1 ] l z 12 differences found attribute: <bitfield2D of </dset>> and <bitfield2D of </dset>> size: [3x2] [3x2] @@ -214,53 +214,53 @@ attribute: <string3D of </dset>> and <string3D of </dset>> size: [4x3x2] [4x3x2] position string3D of </dset> string3D of </dset> difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] a z +[ 0 0 0 ] b z +[ 0 0 1 ] c z +[ 0 0 1 ] d z +[ 0 1 0 ] e z +[ 0 1 0 ] f z +[ 0 1 1 ] g z +[ 0 1 1 ] h z +[ 0 2 0 ] i z +[ 0 2 0 ] j z +[ 0 2 1 ] k z +[ 0 2 1 ] l z +[ 1 0 0 ] m z +[ 1 0 0 ] n z +[ 1 0 1 ] p z +[ 1 0 1 ] q z +[ 1 1 0 ] r z +[ 1 1 0 ] s z +[ 1 1 1 ] t z +[ 1 1 1 ] u z +[ 1 2 0 ] v z +[ 1 2 0 ] w z +[ 1 2 1 ] x z +[ 2 0 0 ] A z +[ 2 0 0 ] B z +[ 2 0 1 ] C z +[ 2 0 1 ] D z +[ 2 1 0 ] E z +[ 2 1 0 ] F z +[ 2 1 1 ] G z +[ 2 1 1 ] H z +[ 2 2 0 ] I z +[ 2 2 0 ] J z +[ 2 2 1 ] K z +[ 2 2 1 ] L z +[ 3 0 0 ] M z +[ 3 0 0 ] N z +[ 3 0 1 ] P z +[ 3 0 1 ] Q z +[ 3 1 0 ] R z +[ 3 1 0 ] S z +[ 3 1 1 ] T z +[ 3 1 1 ] U z +[ 3 2 0 ] V z +[ 3 2 0 ] W z +[ 3 2 1 ] X z +[ 3 2 1 ] Z z 47 differences found attribute: <bitfield3D of </dset>> and <bitfield3D of </dset>> size: [4x3x2] [4x3x2] @@ -610,10 +610,10 @@ attribute: <string of </g1>> and <string of </g1>> size: [2] [2] position string of </g1> string of </g1> difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] a z +[ 0 ] b z +[ 1 ] d z +[ 1 ] e z 4 differences found attribute: <bitfield of </g1>> and <bitfield of </g1>> size: [2] [2] @@ -682,18 +682,18 @@ attribute: <string2D of </g1>> and <string2D of </g1>> size: [3x2] [3x2] position string2D of </g1> string2D of </g1> difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] a z +[ 0 0 ] b z +[ 0 1 ] c z +[ 0 1 ] d z +[ 1 0 ] e z +[ 1 0 ] f z +[ 1 1 ] g z +[ 1 1 ] h z +[ 2 0 ] i z +[ 2 0 ] j z +[ 2 1 ] k z +[ 2 1 ] l z 12 differences found attribute: <bitfield2D of </g1>> and <bitfield2D of </g1>> size: [3x2] [3x2] @@ -810,53 +810,53 @@ attribute: <string3D of </g1>> and <string3D of </g1>> size: [4x3x2] [4x3x2] position string3D of </g1> string3D of </g1> difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] a z +[ 0 0 0 ] b z +[ 0 0 1 ] c z +[ 0 0 1 ] d z +[ 0 1 0 ] e z +[ 0 1 0 ] f z +[ 0 1 1 ] g z +[ 0 1 1 ] h z +[ 0 2 0 ] i z +[ 0 2 0 ] j z +[ 0 2 1 ] k z +[ 0 2 1 ] l z +[ 1 0 0 ] m z +[ 1 0 0 ] n z +[ 1 0 1 ] p z +[ 1 0 1 ] q z +[ 1 1 0 ] r z +[ 1 1 0 ] s z +[ 1 1 1 ] t z +[ 1 1 1 ] u z +[ 1 2 0 ] v z +[ 1 2 0 ] w z +[ 1 2 1 ] x z +[ 2 0 0 ] A z +[ 2 0 0 ] B z +[ 2 0 1 ] C z +[ 2 0 1 ] D z +[ 2 1 0 ] E z +[ 2 1 0 ] F z +[ 2 1 1 ] G z +[ 2 1 1 ] H z +[ 2 2 0 ] I z +[ 2 2 0 ] J z +[ 2 2 1 ] K z +[ 2 2 1 ] L z +[ 3 0 0 ] M z +[ 3 0 0 ] N z +[ 3 0 1 ] P z +[ 3 0 1 ] Q z +[ 3 1 0 ] R z +[ 3 1 0 ] S z +[ 3 1 1 ] T z +[ 3 1 1 ] U z +[ 3 2 0 ] V z +[ 3 2 0 ] W z +[ 3 2 1 ] X z +[ 3 2 1 ] Z z 47 differences found attribute: <bitfield3D of </g1>> and <bitfield3D of </g1>> size: [4x3x2] [4x3x2] @@ -1203,10 +1203,10 @@ attribute: <string of </>> and <string of </>> size: [2] [2] position string of </> string of </> difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] a z +[ 0 ] b z +[ 1 ] d z +[ 1 ] e z 4 differences found attribute: <bitfield of </>> and <bitfield of </>> size: [2] [2] @@ -1275,18 +1275,18 @@ attribute: <string2D of </>> and <string2D of </>> size: [3x2] [3x2] position string2D of </> string2D of </> difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] a z +[ 0 0 ] b z +[ 0 1 ] c z +[ 0 1 ] d z +[ 1 0 ] e z +[ 1 0 ] f z +[ 1 1 ] g z +[ 1 1 ] h z +[ 2 0 ] i z +[ 2 0 ] j z +[ 2 1 ] k z +[ 2 1 ] l z 12 differences found attribute: <bitfield2D of </>> and <bitfield2D of </>> size: [3x2] [3x2] @@ -1403,53 +1403,53 @@ attribute: <string3D of </>> and <string3D of </>> size: [4x3x2] [4x3x2] position string3D of </> string3D of </> difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] a z +[ 0 0 0 ] b z +[ 0 0 1 ] c z +[ 0 0 1 ] d z +[ 0 1 0 ] e z +[ 0 1 0 ] f z +[ 0 1 1 ] g z +[ 0 1 1 ] h z +[ 0 2 0 ] i z +[ 0 2 0 ] j z +[ 0 2 1 ] k z +[ 0 2 1 ] l z +[ 1 0 0 ] m z +[ 1 0 0 ] n z +[ 1 0 1 ] p z +[ 1 0 1 ] q z +[ 1 1 0 ] r z +[ 1 1 0 ] s z +[ 1 1 1 ] t z +[ 1 1 1 ] u z +[ 1 2 0 ] v z +[ 1 2 0 ] w z +[ 1 2 1 ] x z +[ 2 0 0 ] A z +[ 2 0 0 ] B z +[ 2 0 1 ] C z +[ 2 0 1 ] D z +[ 2 1 0 ] E z +[ 2 1 0 ] F z +[ 2 1 1 ] G z +[ 2 1 1 ] H z +[ 2 2 0 ] I z +[ 2 2 0 ] J z +[ 2 2 1 ] K z +[ 2 2 1 ] L z +[ 3 0 0 ] M z +[ 3 0 0 ] N z +[ 3 0 1 ] P z +[ 3 0 1 ] Q z +[ 3 1 0 ] R z +[ 3 1 0 ] S z +[ 3 1 1 ] T z +[ 3 1 1 ] U z +[ 3 2 0 ] V z +[ 3 2 0 ] W z +[ 3 2 1 ] X z +[ 3 2 1 ] Z z 47 differences found attribute: <bitfield3D of </>> and <bitfield3D of </>> size: [4x3x2] [4x3x2] diff --git a/tools/h5diff/testfiles/h5diff_80.txt b/tools/h5diff/testfiles/h5diff_80.txt index ead2d5e..17f1bbd 100644 --- a/tools/h5diff/testfiles/h5diff_80.txt +++ b/tools/h5diff/testfiles/h5diff_80.txt @@ -54,79 +54,79 @@ dataset: </g1/VLstring> and </g1/VLstring> size: [2] [2] position VLstring VLstring difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] a z +[ 0 ] b z +[ 1 ] d z +[ 1 ] e z 4 differences found dataset: </g1/VLstring2D> and </g1/VLstring2D> size: [3x2] [3x2] position VLstring2D VLstring2D difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] a z +[ 0 0 ] b z +[ 0 1 ] c z +[ 0 1 ] d z +[ 1 0 ] e z +[ 1 0 ] f z +[ 1 1 ] g z +[ 1 1 ] h z +[ 2 0 ] i z +[ 2 0 ] j z +[ 2 1 ] k z +[ 2 1 ] l z 12 differences found dataset: </g1/VLstring3D> and </g1/VLstring3D> size: [4x3x2] [4x3x2] position VLstring3D VLstring3D difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] a z +[ 0 0 0 ] b z +[ 0 0 1 ] c z +[ 0 0 1 ] d z +[ 0 1 0 ] e z +[ 0 1 0 ] f z +[ 0 1 1 ] g z +[ 0 1 1 ] h z +[ 0 2 0 ] i z +[ 0 2 0 ] j z +[ 0 2 1 ] k z +[ 0 2 1 ] l z +[ 1 0 0 ] m z +[ 1 0 0 ] n z +[ 1 0 1 ] p z +[ 1 0 1 ] q z +[ 1 1 0 ] r z +[ 1 1 0 ] s z +[ 1 1 1 ] t z +[ 1 1 1 ] u z +[ 1 2 0 ] v z +[ 1 2 0 ] w z +[ 1 2 1 ] x z +[ 2 0 0 ] A z +[ 2 0 0 ] B z +[ 2 0 1 ] C z +[ 2 0 1 ] D z +[ 2 1 0 ] E z +[ 2 1 0 ] F z +[ 2 1 1 ] G z +[ 2 1 1 ] H z +[ 2 2 0 ] I z +[ 2 2 0 ] J z +[ 2 2 1 ] K z +[ 2 2 1 ] L z +[ 3 0 0 ] M z +[ 3 0 0 ] N z +[ 3 0 1 ] P z +[ 3 0 1 ] Q z +[ 3 1 0 ] R z +[ 3 1 0 ] S z +[ 3 1 1 ] T z +[ 3 1 1 ] U z +[ 3 2 0 ] V z +[ 3 2 0 ] W z +[ 3 2 1 ] X z +[ 3 2 1 ] Z z 47 differences found dataset: </g1/array> and </g1/array> size: [2] [2] @@ -688,79 +688,79 @@ dataset: </g1/string> and </g1/string> size: [2] [2] position string string difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] a z +[ 0 ] b z +[ 1 ] d z +[ 1 ] e z 4 differences found dataset: </g1/string2D> and </g1/string2D> size: [3x2] [3x2] position string2D string2D difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] a z +[ 0 0 ] b z +[ 0 1 ] c z +[ 0 1 ] d z +[ 1 0 ] e z +[ 1 0 ] f z +[ 1 1 ] g z +[ 1 1 ] h z +[ 2 0 ] i z +[ 2 0 ] j z +[ 2 1 ] k z +[ 2 1 ] l z 12 differences found dataset: </g1/string3D> and </g1/string3D> size: [4x3x2] [4x3x2] position string3D string3D difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] a z +[ 0 0 0 ] b z +[ 0 0 1 ] c z +[ 0 0 1 ] d z +[ 0 1 0 ] e z +[ 0 1 0 ] f z +[ 0 1 1 ] g z +[ 0 1 1 ] h z +[ 0 2 0 ] i z +[ 0 2 0 ] j z +[ 0 2 1 ] k z +[ 0 2 1 ] l z +[ 1 0 0 ] m z +[ 1 0 0 ] n z +[ 1 0 1 ] p z +[ 1 0 1 ] q z +[ 1 1 0 ] r z +[ 1 1 0 ] s z +[ 1 1 1 ] t z +[ 1 1 1 ] u z +[ 1 2 0 ] v z +[ 1 2 0 ] w z +[ 1 2 1 ] x z +[ 2 0 0 ] A z +[ 2 0 0 ] B z +[ 2 0 1 ] C z +[ 2 0 1 ] D z +[ 2 1 0 ] E z +[ 2 1 0 ] F z +[ 2 1 1 ] G z +[ 2 1 1 ] H z +[ 2 2 0 ] I z +[ 2 2 0 ] J z +[ 2 2 1 ] K z +[ 2 2 1 ] L z +[ 3 0 0 ] M z +[ 3 0 0 ] N z +[ 3 0 1 ] P z +[ 3 0 1 ] Q z +[ 3 1 0 ] R z +[ 3 1 0 ] S z +[ 3 1 1 ] T z +[ 3 1 1 ] U z +[ 3 2 0 ] V z +[ 3 2 0 ] W z +[ 3 2 1 ] X z +[ 3 2 1 ] Z z 47 differences found dataset: </g1/vlen> and </g1/vlen> size: [2] [2] diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 4913f6d..02ba751 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -20,6 +20,12 @@ #include <sys/timeb.h> #include <time.h> +#if 0 +#define H5DIFF_DO_TIME +#endif +#if 1 +#define H5DIFF_DO_NAN +#endif /*------------------------------------------------------------------------- * printf formatting @@ -140,17 +146,13 @@ static int not_comparable; static void close_obj(H5G_obj_t1 obj_type, hid_t obj_id); static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id,hid_t region1_id, hid_t region2_id, diff_opt_t *options); static hbool_t all_zero(const void *_mem, size_t size); -static hsize_t character_compare(unsigned char *mem1,unsigned char *mem2,hsize_t i,unsigned u,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph); +static hsize_t character_compare(unsigned char *mem1,unsigned char *mem2,hsize_t i,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph); static hsize_t character_compare_opt(unsigned char *mem1,unsigned char *mem2,hsize_t i,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph); static hbool_t equal_float(float value, float expected); static hbool_t equal_double(double value, double expected); #if H5_SIZEOF_LONG_DOUBLE !=0 static hbool_t equal_ldouble(long double value, long double expected); #endif -static int print_data(diff_opt_t *options); -static void print_pos(int *ph,int pp,hsize_t curr_pos,hsize_t *acc,hsize_t *pos,int rank,hsize_t *dims,const char *obj1,const char *obj2 ); -static void print_char_pos(int *ph,int pp,hsize_t curr_pos,unsigned u,hsize_t *acc,hsize_t *pos,int rank,hsize_t *dims,const char *obj1,const char *obj2 ); -static void h5diff_print_char(char ch); /*------------------------------------------------------------------------- @@ -167,6 +169,92 @@ typedef enum dtype_t static int my_isnan(dtype_t type, void *val); +/*------------------------------------------------------------------------- + * + * Local functions + * + *------------------------------------------------------------------------- + */ + +/*------------------------------------------------------------------------- + * Function: print_data + * + * Purpose: print data only in report or verbose modes, and do not print in quiet mode + *------------------------------------------------------------------------- + */ +static +int print_data(diff_opt_t *options) +{ + return ( (options->m_report || options->m_verbose) && !options->m_quiet)?1:0; +} + + +/*------------------------------------------------------------------------- + * Function: print_pos + * + * Purpose: print in matrix notation, converting from an array index position + * + *------------------------------------------------------------------------- + */ +static +void print_pos( int *ph, /* print header */ + int pp, /* print percentage */ + hsize_t curr_pos, + hsize_t *acc, + hsize_t *pos, + int rank, + hsize_t *dims, + const char *obj1, + const char *obj2 ) +{ + int i; + + /* print header */ + if ( *ph==1 ) + { + *ph=0; + + printf("%-16s","size:"); + print_dimensions (rank,dims); + printf("%-11s",""); + print_dimensions (rank,dims); + printf("\n"); + + if (pp) + { + printf("%-15s %-15s %-15s %-15s %-15s\n", + "position", + (obj1!=NULL) ? obj1 : " ", + (obj2!=NULL) ? obj2 : " ", + "difference", + "relative"); + printf("------------------------------------------------------------------------\n"); + } + else + { + printf("%-15s %-15s %-15s %-20s\n", + "position", + (obj1!=NULL) ? obj1 : " ", + (obj2!=NULL) ? obj2 : " ", + "difference"); + printf("------------------------------------------------------------\n"); + } + } /* end print header */ + + for ( i = 0; i < rank; i++) + { + pos[i] = curr_pos/acc[i]; + curr_pos -= acc[i]*pos[i]; + } + assert( curr_pos == 0 ); + + printf("[ " ); + for ( i = 0; i < rank; i++) + { + printf("%"H5_PRINTF_LL_WIDTH"u ", (unsigned long_long)pos[i]); + } + printf("]" ); +} /*------------------------------------------------------------------------- @@ -472,7 +560,6 @@ hsize_t diff_datum(void *_mem1, mem1 + u, mem2 + u, /* offset */ i, /* index position */ - u, /* string character position */ rank, dims, acc, @@ -2601,7 +2688,6 @@ static hsize_t character_compare(unsigned char *mem1, unsigned char *mem2, hsize_t i, - unsigned u, int rank, hsize_t *dims, hsize_t *acc, @@ -2611,28 +2697,25 @@ hsize_t character_compare(unsigned char *mem1, const char *obj2, int *ph) { - hsize_t nfound=0; /* differences found */ - unsigned char temp1_uchar; - unsigned char temp2_uchar; - - memcpy(&temp1_uchar, mem1, sizeof(unsigned char)); - memcpy(&temp2_uchar, mem2, sizeof(unsigned char)); - - if (temp1_uchar != temp2_uchar) - { - if ( print_data(options) ) - { - print_char_pos(ph,0,i,u,acc,pos,rank,dims,obj1,obj2); - printf(" "); - h5diff_print_char(temp1_uchar); - printf(" "); - h5diff_print_char(temp2_uchar); - printf("\n"); - } - nfound++; - } - - return nfound; + hsize_t nfound=0; /* differences found */ + unsigned char temp1_uchar; + unsigned char temp2_uchar; + + memcpy(&temp1_uchar, mem1, sizeof(unsigned char)); + memcpy(&temp2_uchar, mem2, sizeof(unsigned char)); + + if (temp1_uchar != temp2_uchar) + { + if ( print_data(options) ) + { + print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + printf(SPACES); + printf(C_FORMAT,temp1_uchar,temp2_uchar); + } + nfound++; + } + + return nfound; } @@ -2924,6 +3007,21 @@ hsize_t diff_float(unsigned char *mem1, */ else { + +#if defined (H5DIFF_DO_TIME) + int time; + + #if defined (WIN32) + struct _timeb *tbstart = malloc(sizeof(struct _timeb)); + struct _timeb *tbstop = malloc(sizeof(struct _timeb)); + _ftime( tbstart); + #else + struct timeb *tbstart = malloc(sizeof(struct timeb)); + struct timeb *tbstop = malloc(sizeof(struct timeb)); + ftime( tbstart); + #endif + +#endif for ( i = 0; i < nelmts; i++) { @@ -2951,6 +3049,19 @@ hsize_t diff_float(unsigned char *mem1, +#if defined (H5DIFF_DO_TIME) + + #if defined (WIN32) + _ftime( tbstop ); + #else + ftime( tbstop ); + #endif + + time = tbstop->time - tbstart->time; + printf(" TIME = %d sec\n", time ); + +#endif + } @@ -5167,6 +5278,7 @@ hbool_t equal_double(double value, double expected) int both_zero; int is_zero; +#if defined (H5DIFF_DO_NAN) /*------------------------------------------------------------------------- * detect NaNs @@ -5198,6 +5310,7 @@ hbool_t equal_double(double value, double expected) *------------------------------------------------------------------------- */ +#endif BOTH_ZERO(value,expected) if (both_zero) @@ -5231,6 +5344,7 @@ hbool_t equal_ldouble(long double value, long double expected) int both_zero; int is_zero; +#if defined (H5DIFF_DO_NAN) /*------------------------------------------------------------------------- * detect NaNs @@ -5262,6 +5376,7 @@ hbool_t equal_ldouble(long double value, long double expected) *------------------------------------------------------------------------- */ +#endif BOTH_ZERO(value,expected) if (both_zero) @@ -5303,6 +5418,7 @@ hbool_t equal_float(float value, float expected) int both_zero; int is_zero; +#if defined (H5DIFF_DO_NAN) /*------------------------------------------------------------------------- * detect NaNs @@ -5334,6 +5450,7 @@ hbool_t equal_float(float value, float expected) *------------------------------------------------------------------------- */ +#endif BOTH_ZERO(value,expected) if (both_zero) @@ -5479,212 +5596,3 @@ my_isnan(dtype_t type, void *val) -/*------------------------------------------------------------------------- - * - * Local functions - * - *------------------------------------------------------------------------- - */ - -/*------------------------------------------------------------------------- - * Function: print_data - * - * Purpose: print data only in report or verbose modes, and do not print in quiet mode - *------------------------------------------------------------------------- - */ -static -int print_data(diff_opt_t *options) -{ - return ( (options->m_report || options->m_verbose) && !options->m_quiet)?1:0; -} - - -/*------------------------------------------------------------------------- - * Function: print_pos - * - * Purpose: print in matrix notation, converting from an array index position - * - *------------------------------------------------------------------------- - */ -static -void print_pos( int *ph, /* print header */ - int pp, /* print percentage */ - hsize_t curr_pos, - hsize_t *acc, - hsize_t *pos, - int rank, - hsize_t *dims, - const char *obj1, - const char *obj2 ) -{ - int i; - - /* print header */ - if ( *ph==1 ) - { - *ph=0; - - printf("%-16s","size:"); - print_dimensions (rank,dims); - printf("%-11s",""); - print_dimensions (rank,dims); - printf("\n"); - - if (pp) - { - printf("%-15s %-15s %-15s %-15s %-15s\n", - "position", - (obj1!=NULL) ? obj1 : " ", - (obj2!=NULL) ? obj2 : " ", - "difference", - "relative"); - printf("------------------------------------------------------------------------\n"); - } - else - { - printf("%-15s %-15s %-15s %-20s\n", - "position", - (obj1!=NULL) ? obj1 : " ", - (obj2!=NULL) ? obj2 : " ", - "difference"); - printf("------------------------------------------------------------\n"); - } - } /* end print header */ - - for ( i = 0; i < rank; i++) - { - pos[i] = curr_pos/acc[i]; - curr_pos -= acc[i]*pos[i]; - } - assert( curr_pos == 0 ); - - printf("[ " ); - for ( i = 0; i < rank; i++) - { - printf("%"H5_PRINTF_LL_WIDTH"u ", (unsigned long_long)pos[i]); - } - printf("]" ); -} - - -/*------------------------------------------------------------------------- - * Function: print_char_pos - * - * Purpose: print character position in string - * - *------------------------------------------------------------------------- - */ - -static -void print_char_pos( int *ph, /* print header */ - int pp, /* print percentage */ - hsize_t curr_pos, - unsigned u, - hsize_t *acc, - hsize_t *pos, - int rank, - hsize_t *dims, - const char *obj1, - const char *obj2 ) -{ - int i; - - /* print header */ - if ( *ph==1 ) - { - *ph=0; - - printf("%-16s","size:"); - print_dimensions (rank,dims); - printf("%-11s",""); - print_dimensions (rank,dims); - printf("\n"); - - if (pp) - { - printf("%-15s %-15s %-15s %-15s %-15s\n", - "position", - (obj1!=NULL) ? obj1 : " ", - (obj2!=NULL) ? obj2 : " ", - "difference", - "relative"); - printf("------------------------------------------------------------------------\n"); - } - else - { - printf("%-15s %-15s %-15s %-20s\n", - "position", - (obj1!=NULL) ? obj1 : " ", - (obj2!=NULL) ? obj2 : " ", - "difference"); - printf("------------------------------------------------------------\n"); - } - } /* end print header */ - - for ( i = 0; i < rank; i++) - { - pos[i] = curr_pos/acc[i]; - curr_pos -= acc[i]*pos[i]; - } - assert( curr_pos == 0 ); - - printf("[ " ); - if ( rank > 0 ) - { - - for ( i = 0; i < rank; i++) - { - printf("%"H5_PRINTF_LL_WIDTH"u ", (unsigned long_long)pos[i]); - printf(" "); - } - - } - else - { - printf("%u", (unsigned)u); - } - printf("]" ); -} - -/*------------------------------------------------------------------------- - * Function: h5diff_print_char. Adapted from h5tools_print_char - * - * Purpose: Print a char - * - *------------------------------------------------------------------------- - */ -static void h5diff_print_char(char ch) -{ - - switch (ch) - { - case '"': - printf("\\\""); - break; - case '\\': - printf( "\\\\"); - break; - case '\b': - printf("\\b"); - break; - case '\f': - printf("\\f"); - break; - case '\n': - printf("\\n"); - break; - case '\r': - printf("\\r"); - break; - case '\t': - printf("\\t"); - break; - default: - if (isprint(ch)) - printf( "%c", ch); - else - printf( "\\%03o", ch); - - break; - } -}
\ No newline at end of file diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index b1190d9..3ae58c3 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -27,23 +27,15 @@ void print_dimensions (int rank, hsize_t *dims) { int i; - - if ( rank > 0 ) - { - - printf("[" ); - for ( i = 0; i < rank-1; i++) - { - printf("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[i]); - printf("x"); - } - printf("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[rank-1]); - printf("]" ); - } - else + + printf("[" ); + for ( i = 0; i < rank-1; i++) { - printf("H5S_SCALAR" ); + printf("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[i]); + printf("x"); } + printf("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[rank-1]); + printf("]" ); } |