project-asgard / asgard

MIT License
27 stars 20 forks source link

fix the test for identity #681

Closed mkstoyanov closed 3 months ago

mkstoyanov commented 3 months ago

Fix bug in the way we check if a matrix is identity when using non-Cartesian coordinates.

quantumsteve commented 3 months ago

I changed ctest to ctest --output-on-failure in the AWS buildscript for asgard-unit-io. @mkstoyanov Would you push an empty commit?

quantumsteve commented 3 months ago
io-tests is a Catch2 v3.1.0 host application.
Run with -? for options

-------------------------------------------------------------------------------
highfive interface to HDF5 - double
  check it writes the correct file
-------------------------------------------------------------------------------
/codebuild/output/src1627854762/src/github.com/project-asgard/asgard/src/io_tests.cpp:10
...............................................................................

/codebuild/output/src1627854762/src/github.com/project-asgard/asgard/src/io_tests.cpp:10: FAILED:
due to unexpected exception with message:
  Impossible to write buffer with dimensions n = 1into dataset with dimensions
  [ 1, 5].

-------------------------------------------------------------------------------
highfive interface to HDF5 - float
  check it writes the correct file
-------------------------------------------------------------------------------
/codebuild/output/src1627854762/src/github.com/project-asgard/asgard/src/io_tests.cpp:10
...............................................................................

/codebuild/output/src1627854762/src/github.com/project-asgard/asgard/src/io_tests.cpp:10: FAILED:
due to unexpected exception with message:
  Impossible to write buffer with dimensions n = 1into dataset with dimensions
  [ 1, 5].

-------------------------------------------------------------------------------
highfive interface to HDF5 - int
  check it writes the correct file
-------------------------------------------------------------------------------
/codebuild/output/src1627854762/src/github.com/project-asgard/asgard/src/io_tests.cpp:10
...............................................................................

/codebuild/output/src1627854762/src/github.com/project-asgard/asgard/src/io_tests.cpp:10: FAILED:
due to unexpected exception with message:
  Impossible to write buffer with dimensions n = 1into dataset with dimensions
  [ 1, 5].

===============================================================================
test cases: 3 | 3 failed
assertions: 3 | 3 failed

97% tests passed, 1 tests failed out of 29

Total Test time (real) =  84.11 sec
mkstoyanov commented 3 months ago

@quantumsteve Is this due to an update in HDF5 standard? I can't reproduce locally and I don't understand the error message. The code appends a vector to the existing dataset but I'm not familiar with the syntax.

https://github.com/project-asgard/asgard/blob/8c74b7b37c343fbb26b6abd9ef8ba8ea95913268/src/io.hpp#L84

Also, this code is completely independent from the other changes.

quantumsteve commented 3 months ago

I also can't reproduce on my machine. I'm currently building develop on AWS CodeBuild to see verify the same issue is present there.

quantumsteve commented 3 months ago

asgard-unit-io has the same failure on develop. Will address in another PR.