Skip to content

Commit

Permalink
[LDistance] Fix OpenMP segfault on Windows
Browse files Browse the repository at this point in the history
Weird interaction between the LDistanceMatrix parallel loop (with the
dynamic scheduling) and the LDistance reduction loop that should be
sequential (threadNumber_ == 1).
  • Loading branch information
Pierre Guillou committed Oct 5, 2022
1 parent f26d022 commit ac9f668
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/base/lDistanceMatrix/LDistanceMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ int ttk::LDistanceMatrix::execute(std::vector<std::vector<double>> &output,

// compute matrix upper triangle
#ifdef TTK_ENABLE_OPENMP
#pragma omp parallel for num_threads(this->threadNumber_) schedule(dynamic) \
firstprivate(worker)
#pragma omp parallel for num_threads(this->threadNumber_) firstprivate(worker)
#endif // TTK_ENABLE_OPENMP
for(size_t i = 0; i < nInputs; ++i) {
for(size_t j = i + 1; j < nInputs; ++j) {
Expand Down

0 comments on commit ac9f668

Please sign in to comment.