-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 PCL_WARNINGS_ARE_ERRORS
CMake option and enable it in Ubuntu 16.04 CI job
#3478
Conversation
-DPCL_ONLY_CORE_POINT_TYPES=ON \ | ||
-DPCL_WARNINGS_ARE_ERROS=ON \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ERRORS instead of ERROS. The error is only here, which means the flag was not activated for this build.
Oh wait, I think we have a problem here. The job failed two times with the same unit test and it does not look like a random failure. I assume this is because I changed the compiler flags. |
I'm not really sure what to do in this scenario. I think we'll both agree that changing optimization and warning flags should not produce changes in the outcome of runtime logic (which doesn't run in parallel). But I definitely don't want that unit test rendering CI "useless". Revert the last commit? The question is also whether you can replicate the failure in your environment. |
Let's start with this. Though even if I can, not sure how to fix. Just change the number? |
My only idea would be to follow the execution path and try to identify when did both cases diverge and started to produce different results. In C++ this is an extremely time consuming task. At this moment I prioritize more CI than the GASD feature (11 citations 3 years after publication), so I'm open to just switch numbers. |
The gasd test is failing in my environment prior to your commits. |
I think I nailed down the problem. The following lines have a numerical issue: pcl/features/include/pcl/features/impl/gasd.hpp Lines 287 to 299 in f36a0d8
With a very unlucky case we get to the following instance:
The target bin is a tiny negative number instead of zero. Later on, it is rounded and ends up in the bin I think the fix is to change how |
That's a crazy find @taketwo ... So the fix could be:
|
Took me quite a few iterations of Could you explain in more detail why your fix is preferable to float integral;
const float dist_hist_val = std::modf(d / shape_grid_step, &integral); |
This avoids numerical issues described in PointCloudLibrary#3478 (comment)
This avoids numerical issues described in PointCloudLibrary#3478 (comment)
Just that modf does a lot of housekeeping and if you know the domain of the variables, a subtraction with long int cast is faster than modf. The checks can't be optimized by compiler because it doesn't know the data domain (in most cases). Analogous to how |
Thanks for the explanation. I kept Offtopic: sometimes I wonder, Kunal, where did you get all this knowledge 🕵️♂️ |
High Performance Computing with Real Time constraints requires every shortcut to reduce compute power, increase IPC. It's a weird combination |
PCL_WARNINGS_ARE_ERRORS
CMake option and enable it in Ubuntu 16.04 CI job
This enables
-Wall
flag in Ubuntu 16.04 job, which is currently warning-free. The other pipelines still produce warnings; ticket #3379 will continue to track the progress towards having-Wall
in all jobs.