You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following recent news of Clang is OpenMP 3.1 complete, which is wonderful, I tried to use clang with OpenMP support. Before I can run any more test, it seems that the _OPENMP macro is not properly defined at all.
The following is a minimal example
#ifndef _OPENMP
#error NO OPENMP defined
#endif
int main () {}
And on compile line clang++ -fopenmp -o test test.cpp (or clang)
The following is more details of the build of clang
OS : CentOS 7 (updated daily)
LLVM subprojects in the build tree: LLVM, clang, compiler-rt, polly, clang-extra-tools, libcxx, libcxxabi
-fopenmp=libiomp5
appears to have the same problem. And -fopenmp seems to turn on OpenMP but only it links to libgomp. In either case, the _OPENMP macro is not defined.
A minor issue, I also have Intel Compilers paths/ld_library_path in my environment, and it appears that -fopenmp=libiomp5 cause to executable to find Intel's libiomp5.so, which is in LD_LIBRARY_PATH. Surely I can avoid this issue by using rpath etc. But is the libiomp5.so runtime distribution with Intel compilers also supported? Or only the one compiled in the LLVM tree?
Extended Description
Following recent news of Clang is OpenMP 3.1 complete, which is wonderful, I tried to use clang with OpenMP support. Before I can run any more test, it seems that the _OPENMP macro is not properly defined at all.
The following is a minimal example
#ifndef _OPENMP
#error NO OPENMP defined
#endif
int main () {}
And on compile line clang++ -fopenmp -o test test.cpp (or clang)
The following is more details of the build of clang
OS : CentOS 7 (updated daily)
LLVM subprojects in the build tree: LLVM, clang, compiler-rt, polly, clang-extra-tools, libcxx, libcxxabi
CMake options:
args="$args -DCMAKE_BUILD_TYPE=Release"
args="$args -DCMAKE_INSTALL_PREFIX=/opt/LLVM/$prefix"
args="$args -DBUILD_SHARED_LIBS=ON"
args="$args -DLLVM_ENABLE_BACKTRACES=OFF"
args="$args -DLLVM_ENABLE_CRASH_OVERRIDES=OFF"
args="$args -DLLVM_ENABLE_PEDANTIC=OFF"
args="$args -DLLVM_ENABLE_WARNINGS=OFF"
args="$args -DLLVM_INCLUDE_DOCS=OFF"
args="$args -DLLVM_INCLUDE_EXAMPLES=OFF"
args="$args -DLLVM_INCLUDE_TESTS=OFF"
args="$args -DLLVM_TARGETS_TO_BUILD=host"
The text was updated successfully, but these errors were encountered: