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

Fix 32-bit unit test failures #310

Merged
merged 3 commits into from
May 15, 2020
Merged

Fix 32-bit unit test failures #310

merged 3 commits into from
May 15, 2020

Conversation

jlblancoc
Copy link
Member

@jlblancoc jlblancoc commented May 13, 2020

Closes #308
Closes #306

Don't merge until these PPA builds end, to confirm that the test errors have been fixed.

Update: It can be merged now, PPA builds pass!


This change is Reviewable

@dellaert
Copy link
Member

Seems to say

buildsPackage build summary
A total of 92 builds have been created for this PPA.

Completed builds
23 successful
69 failed

@jlblancoc
Copy link
Member Author

Yes... it still fails, but now because of #306, will try to fix it too in this pr.

@jlblancoc
Copy link
Member Author

PS: you have to click on a package version on the bottom, the click on one of the platform that fails, then buildlog to see all the details.

Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!

@dellaert dellaert merged commit a76c0a2 into develop May 15, 2020
@dellaert
Copy link
Member

@jlblancoc please delete the branch when you’re done with it. I just realized maybe you were using it to push more changes.

SymmetricBlockMatrkx is pretty core: wondering what other bugs were caused by this. Although, now that I think more about it, I’m wondering whether I pushed merge too fast: is the semantics of the constructor to deliver a zero matrix, or just an allocated one? Perhaps the bug was caused by code that incorrectly assumed it would get zeros...

@jlblancoc jlblancoc deleted the fix/x32-unit-tests branch May 15, 2020 14:31
@jlblancoc
Copy link
Member Author

Branch deleted, no problem.

I guess the "problem" here is that SymmetricBlockMatrix expects to get all its entries correctly initialized by its caller, and this QP code was NOT filling in some of the entries... (it was filled to zeros, apparently only by accidents that depends on the architecture and Eigen implementation).
Now, what to do at the API level:

  • If you prefer to DETECT non-filled entries, maybe the hessian could be initialized to quietNAN instead of zeros?
  • Or, to keep it as is, with zeros to be "benevolent" with "user" errors, or even document that behavior so zeroes in information matrices don't need to be filled it and save some time.

Not sure what's better.

@dellaert
Copy link
Member

I think we actually have a flag that enables the Nan behavior. I think perhaps in debug the flag should be on by default, and we fill everything with Nan, while in Release we just allocated. Comments?

@jlblancoc
Copy link
Member Author

I'll think about this. There may be another way to fix the bug that doesn't mask possible future bugs due to uninitialized values...

@jlblancoc
Copy link
Member Author

Definitively, I think you are right, Frank: it might be better NOT to initialize to zeros, since it has a cost (vs. leave uninitialized) that may be relevant when building very large graphs. And all just to "fix" apparently buggy code... Will come back with another PR.

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.

Failed tests in 32bit builds (i386 on PPA build farm) Failed test on 32bit architectures
3 participants