Distill summary from h5diff -r output?

Hi all,

Has anyone created an awk/perl/python/whatever script to produce a
one-line-ish summary from 'h5diff -r''s output? Something like
'maximum difference = someNumber at /some/data/location' ? If so,
would you be willing to pass it along? I'd like such a tool for some
pointwise convergence studies where 'h5diff -r' almost does what I
need.

I don't believe h5diff will do this directly (or at least I've not yet
located the option).

Thanks in advance,
Rhys

I too would like a max function built in to h5diff.

I have a Perl script that prints the top 5 diffs. I'll send it to you.
Dave

···

On Jun 17, 2011, at 10:33 AM, Rhys Ulerich wrote:

Hi all,

Has anyone created an awk/perl/python/whatever script to produce a
one-line-ish summary from 'h5diff -r''s output? Something like
'maximum difference = someNumber at /some/data/location' ? If so,
would you be willing to pass it along? I'd like such a tool for some
pointwise convergence studies where 'h5diff -r' almost does what I
need.

I don't believe h5diff will do this directly (or at least I've not yet
located the option).

Thanks in advance,
Rhys

Hi Rhys and Dave,

I am not clear what you mean by 'maximum difference'.

I can guess two things;
  1. You want to see simple output for total difference either in object or file
  or
  2. You want to see which object contain the biggest different number in two files

If none of these are what you meant, could you explain the purpose for it?
Also some example would be nice.

Thanks,

Jonathan

···

On 6/17/2011 11:38 AM, Dave Wade-Stein wrote:

I too would like a max function built in to h5diff.

I have a Perl script that prints the top 5 diffs. I'll send it to you.
Dave

On Jun 17, 2011, at 10:33 AM, Rhys Ulerich wrote:

Hi all,

Has anyone created an awk/perl/python/whatever script to produce a
one-line-ish summary from 'h5diff -r''s output? Something like
'maximum difference = someNumber at /some/data/location' ? If so,
would you be willing to pass it along? I'd like such a tool for some
pointwise convergence studies where 'h5diff -r' almost does what I
need.

I don't believe h5diff will do this directly (or at least I've not yet
located the option).

Thanks in advance,
Rhys

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Hi Jonathan,

I am not clear what you mean by 'maximum difference'.

I can guess two things;
1. You want to see simple output for total difference either in object or file
or
2. You want to see which object contain the biggest different number in two files.

The second idea is what I intended. Given two comparable objects,
compute the maximum pointwise difference between their contents. For
example, if the objects are vectors, this would be the maximum norm of
their difference. Given two files, return the maximum difference
found between any two comparable objects having the same name. I'd
like to know both the magnitude and the object's name.

If none of these are what you meant, could you explain the purpose for it?

Sure. Using such a utility, one could quickly look at the single
biggest error between two different data files. This lets one easy
check convergence rates (given an "exact" files and a series of
increasingly accurate approximations), easily perform unit tests where
a computed output file is compared against a known good solution, and
easily see the impact of compiling codes with different optimization
options.

Also some example would be nice.

Say I've got one file containing
    x = [ 1, 2, 3 ];
    y = [ 4, 5, 6];
and another containing
    x = [ 1, 2.1, 3];
    y = [ 4, 5.05, 6];
then I'd expect such a utility to report that the maximum difference
between the two files is 0.1 with bonus points for telling me the
biggest difference occurred at x[1].

Hope that helps,
Rhys

Hi Rhys,

Thanks for your answer!
Tool team will keep the idea in our improvement list.
No guarantee when it will become a real feature because there are several conditions need to be met for it (funded or fund available, general enough for all or paying customer, internal discussions, priority and so on), but thanks for sharing your idea!

Thank you!

Jonathan

···

On 6/20/2011 9:47 PM, Rhys Ulerich wrote:

Hi Jonathan,

I am not clear what you mean by 'maximum difference'.

I can guess two things;
  1. You want to see simple output for total difference either in object or file
  or
  2. You want to see which object contain the biggest different number in two files.

The second idea is what I intended. Given two comparable objects,
compute the maximum pointwise difference between their contents. For
example, if the objects are vectors, this would be the maximum norm of
their difference. Given two files, return the maximum difference
found between any two comparable objects having the same name. I'd
like to know both the magnitude and the object's name.

If none of these are what you meant, could you explain the purpose for it?

Sure. Using such a utility, one could quickly look at the single
biggest error between two different data files. This lets one easy
check convergence rates (given an "exact" files and a series of
increasingly accurate approximations), easily perform unit tests where
a computed output file is compared against a known good solution, and
easily see the impact of compiling codes with different optimization
options.

Also some example would be nice.

Say I've got one file containing
     x = [ 1, 2, 3 ];
     y = [ 4, 5, 6];
and another containing
     x = [ 1, 2.1, 3];
     y = [ 4, 5.05, 6];
then I'd expect such a utility to report that the maximum difference
between the two files is 0.1 with bonus points for telling me the
biggest difference occurred at x[1].

Hope that helps,
Rhys

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org