OpenMP break error
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 5k
- Forks
- 622
- Avg merge
- 8h 37m
- Merged PRs (30d)
- 5
Description
Describe the bug
When building the repo, cmake gives an error saying there is a break statement used with an OpenMP loop. This seems to be preventing me from compiling the source.
To Reproduce
Steps to reproduce the behavior:
mkdir buildcd build && cmake .. && make
Expected behavior
The code should compile.
Screenshots
/home/eric/Projects/SPTAG/AnnService/inc/Core/KDT/../Common/KDTree.h: In member function ‘void SPTAG::COMMON::KDTree::BuildTrees(const SPTAG::COMMON::Dataset<T>&, int, std::vector<int>*, SPTAG::IAbortOperation*)’:
/home/eric/Projects/SPTAG/AnnService/inc/Core/KDT/../Common/KDTree.h:78:38: error: break statement used with OpenMP for loop
78 | if (abort && abort->ShouldAbort()) break;
| ^~~~~
CMake Error at GPUSPTAGLib_generated_VectorIndex.cpp.o.Release.cmake:283 (message):
Error generating file
/home/eric/Projects/SPTAG/build/GPUSupport/CMakeFiles/GPUSPTAGLib.dir/__/AnnService/src/Core/./GPUSPTAGLib_generated_VectorIndex.cpp.o
make[2]: *** [GPUSupport/CMakeFiles/GPUSPTAGLib.dir/build.make:107: GPUSupport/CMakeFiles/GPUSPTAGLib.dir/__/AnnService/src/Core/GPUSPTAGLib_generated_VectorIndex.cpp.o] Error 1
/home/eric/Projects/SPTAG/AnnService/inc/Core/KDT/../Common/KDTree.h: In member function ‘void SPTAG::COMMON::KDTree::BuildTrees(const SPTAG::COMMON::Dataset<T>&, int, std::vector<int>*, SPTAG::IAbortOperation*)’:
/home/eric/Projects/SPTAG/AnnService/inc/Core/KDT/../Common/KDTree.h:78:38: error: break statement used with OpenMP for loop
78 | if (abort && abort->ShouldAbort()) break;
| ^~~~~
CMake Error at GPUSPTAGLib_generated_KDTIndex.cpp.o.Release.cmake:283 (message):
Error generating file
/home/eric/Projects/SPTAG/build/GPUSupport/CMakeFiles/GPUSPTAGLib.dir/__/AnnService/src/Core/KDT/./GPUSPTAGLib_generated_KDTIndex.cpp.o
make[2]: *** [GPUSupport/CMakeFiles/GPUSPTAGLib.dir/build.make:93: GPUSupport/CMakeFiles/GPUSPTAGLib.dir/__/AnnService/src/Core/KDT/GPUSPTAGLib_generated_KDTIndex.cpp.o] Error 1
make[2]: Target 'GPUSupport/CMakeFiles/GPUSPTAGLib.dir/depend' not remade because of errors.
make[1]: *** [CMakeFiles/Makefile2:481: GPUSupport/CMakeFiles/GPUSPTAGLib.dir/all] Error 2
make[1]: Target 'all' not remade because of errors.
make: *** [Makefile:130: all] Error 2
make: Target 'default_target' not remade because of errors.
Desktop (please complete the following information):
- OS: Ubuntu 20.04.1 LTS
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with mkdir build, cd build && cmake .. && make on Ubuntu 20.04. Inspect AnnService/inc/Core/Common/KDTree.h around line 78 and the related GPUSupport build errors; done means the repository compiles successfully without the OpenMP loop error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100