Skip to content

[Feature Request] h5diff mode for just printing the differences #2204

Closed

Description

@adayton1

Is your feature request related to a problem? Please describe.
The output from h5diff includes groups that have no differences, which makes it hard to actually see where the differences are. The following is a small scale example, but you can imagine if I have dozens more fields and the actual difference is somewhere in the middle or near the end, it's hard to see what actually changed.

dataset: </domain0/Cells/Field1> and </domain0/Cells/Field1>
0 differences found
dataset: </domain0/Cells/Field2> and </domain0/Cells/Field2>
0 differences found
dataset: </domain0/Cells/Field3> and </domain0/Cells/Field3>
0 differences found
dataset: </domain0/Cells/Field4> and </domain0/Cells/Field4>
0 differences found
dataset: </domain0/Cells/Field5> and </domain0/Cells/Field5>
0 differences found
dataset: </domain0/Cells/Field6> and </domain0/Cells/Field6>
0 differences found
dataset: </domain0/Cells/Field7> and </domain0/Cells/Field7>
size:           [64896]           [64896]
position       Field7       Field7  difference
------------------------------------------------------------
[ 0 ]          961.25          919.25          42
1 differences found
dataset: </domain0/Cells/Field8> and </domain0/Cells/Field8>
0 differences found
dataset: </domain0/Cells/Field9> and </domain0/Cells/Field9>
0 differences found
dataset: </domain0/Cells/Field10> and </domain0/Cells/Field10>
0 differences found
dataset: </domain0/Cells/Field11> and </domain0/Cells/Field11>
0 differences found
dataset: </domain0/Cells/Field12> and </domain0/Cells/Field12>
0 differences found

Describe the solution you'd like
Could you add an output mode that only prints the differences?

dataset: </domain0/Cells/Field7> and </domain0/Cells/Field7>
size:           [64896]           [64896]
position       Field7       Field7  difference
------------------------------------------------------------
[ 0 ]          961.25          919.25          42
1 differences found

Describe alternatives you've considered
At the moment, I think the only workaround is to write a wrapper script that filters the output.

Additional context
I'm trying to add h5diff as a step to a testing framework built on top of ATS (which is also developed by LLNL). When there are differences, we want it to be easy for users to see exactly what is different.

Activity

  1. added
    Component - Tools
    on Mar 7, 2023
  2. self-assigned this
    on May 4, 2023
  3. locked and limited conversation to collaborators on Jan 19, 2024
  4. converted this issue into a discussion #3946 on Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Component - Tools

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions