[mlpack-git] [mlpack/mlpack] Possible OpenMP parallelization issues in LSHSearch implementation (#801)

Ivan Georgiev notifications at github.com
Wed Oct 12 06:29:26 EDT 2016


I've accidentally stumbled on this. In the `lsh_search_impl.hpp` file, method 

```
void LSHSearch<SortPolicy>::Search()
```

there is this OpenMP statement:

```
  #pragma omp parallel for \
      shared(resultingNeighbors, distances) \
      schedule(dynamic)\
      reduction(+:avgIndicesReturned)
```

which is all fine, except that shared variables are not explicitly protected against racing conditions, namely the `BaseCase` method which actually modifies them, lacks any `#pragma atomic` or `#pragma critical` directives (both implementation of this method in the same file).



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/801
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20161012/f0221732/attachment.html>


More information about the mlpack-git mailing list