openmp ith llvm

Dear all,

I’m trying to get openmp to work with llvm, either with static compiler or with jit, however with no success.

I’ve followed this:

http://blog.llvm.org/2015/05/openmp-support_22.html



|
LLVM Project Blog: OpenMP Support
OpenMP support in Clang compiler is completed! Every pragma and clause from 3.1 version of the standard is supported in full, including combined directives (like ‘# …
Read more…
|

  • | - |

In case of static compilation, I always get 1 thread.

In case of jit, I get this error:

LLVM ERROR: Program used external function ‘omp_set_num_threads’ which could not be resolved!

However, my code works just fine with g++.

Any help is appreciated.

I think the default is still the old gomp mode, so you have to
explicitly ask at configure time (i.e. --with-clang-default-openmp-runtime=libomp)
or with -fopenmp=libomp.

Joerg

Hi Marwa,

I had similar problems. Take a look at this SO thread: http://stackoverflow.com/questions/33357029/using-openmp-with-clang

Best regards,
Jakub