Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stdout debugging for normalization #107

Merged
merged 1 commit into from
Mar 23, 2017
Merged

Conversation

gadomski
Copy link
Owner

@alexsmartens can you pull down this branch, test (either with env CTEST_OUTPUT_ON_FAILURE=1 make test or test/normalization), and put the output in this pull request's discussion? Thanks.

@alexsmartens
Copy link

There is the issue that I have:

$ CTEST_OUTPUT_ON_FAILURE=1 make test
Running tests...
Test project /home/alex/Downloads/cpd/build
Start 1: affine
1/9 Test #1: affine ........................... Passed 2.35 sec
Start 2: gauss_transform
2/9 Test #2: gauss_transform .................. Passed 0.37 sec
Start 3: nonrigid
3/9 Test #3: nonrigid ......................... Passed 33.65 sec
Start 4: normalization
4/9 Test #4: normalization ....................***Exception: Other 0.09 sec
Running main() from gtest_main.cc
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from FishTest
[ RUN ] FishTest.CanBeRetrieved
fixed mean: -1.0044e-06
1.76923e-07
fixed dimensions: 91 by 2
moving mean: -1.0044e-06
1.76923e-07
moving dimensions: 91 by 2
scale: 1
normalization: /usr/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:110: Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::CwiseBinaryOp(const Lhs&, const Rhs&, const BinaryOp&) [with BinaryOp = Eigen::internal::scalar_sum_op; LhsType = const Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op, const Eigen::Matrix<double, -1, -1> >; RhsType = const Eigen::Matrix<double, -1, 1>; Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::Lhs = Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op, const Eigen::Matrix<double, -1, -1> >; Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::Rhs = Eigen::Matrix<double, -1, 1>]: Assertion `aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols()' failed.

Start 5: rigid

5/9 Test #5: rigid ............................ Passed 0.26 sec
Start 6: utils
6/9 Test #6: utils ............................ Passed 0.04 sec
Start 7: version
7/9 Test #7: version .......................... Passed 0.00 sec
Start 8: gauss_transform_fgt
8/9 Test #8: gauss_transform_fgt .............. Passed 0.23 sec
Start 9: jsoncpp
9/9 Test #9: jsoncpp .......................... Passed 0.00 sec

89% tests passed, 1 tests failed out of 9

Total Test time (real) = 37.00 sec

The following tests FAILED:
4 - normalization (OTHER_FAULT)
Errors while running CTest
Makefile:105: recipe for target 'test' failed
make: *** [test] Error 8

Man, these are pernicious in Eigen. Thanks to @alexsmartens for doggedly
debugging this one.
@gadomski
Copy link
Owner Author

gadomski commented Mar 23, 2017

I think I might have found the bug. It was a combination of two things I often screw up when working with Eigen (forgetting to replicate out vectors, and the fact that isApprox passes ok even if the matrix dimensions don't agree), and I'm glad your version of Eigen caught it.

If you can pull down this latest version of the branch and test, I would appreciate it.

Edit: To be clear, this bug is only in the test suite, not in the code itself, so this won't fix/change any of your original issues.

@alexsmartens
Copy link

Thank you Pete!

$ make test
Running tests...
Test project /home/alex/Downloads/cpd/build
Start 1: affine
1/9 Test #1: affine ........................... Passed 2.25 sec
Start 2: gauss_transform
2/9 Test #2: gauss_transform .................. Passed 0.36 sec
Start 3: nonrigid
3/9 Test #3: nonrigid ......................... Passed 31.93 sec
Start 4: normalization
4/9 Test #4: normalization .................... Passed 0.00 sec
Start 5: rigid
5/9 Test #5: rigid ............................ Passed 0.25 sec
Start 6: utils
6/9 Test #6: utils ............................ Passed 0.04 sec
Start 7: version
7/9 Test #7: version .......................... Passed 0.00 sec
Start 8: gauss_transform_fgt
8/9 Test #8: gauss_transform_fgt .............. Passed 0.23 sec
Start 9: jsoncpp
9/9 Test #9: jsoncpp .......................... Passed 0.00 sec

100% tests passed, 0 tests failed out of 9

Total Test time (real) = 35.06 sec

@gadomski gadomski merged commit 410124f into master Mar 23, 2017
@gadomski gadomski deleted the failing-normalization-test branch March 23, 2017 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants