flann-lib / flann

Fast Library for Approximate Nearest Neighbors
http://people.cs.ubc.ca/~mariusm/flann
Other
2.21k stars 646 forks source link

OpenMP multi-threading strange behavior #484

Closed Enigmatisms closed 2 years ago

Enigmatisms commented 2 years ago

Problem

SUMMARY: ThreadSanitizer: data race /usr/include/c++/7/bits/basic_string.h:172 in std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_length(unsigned long)


### Question
- Why would these strange behaviors occur? Is `lib-flann` or `OpenMP` to be blamed?
Enigmatisms commented 2 years ago

P.S. There is actually solution is actually false. This doesn't solve my problem, knnSearch will still generate false result.

Enigmatisms commented 2 years ago

Never mind, OpenMP is to blame.