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 [http://llvm.org/img/DragonSmall.png]<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...<http://blog.llvm.org/2015/05/openmp-support_22.html> 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. Regards, Marwa Yusuf Teaching Assistant - Computer Engineering Department Faculty of Engineering - Benha University E-JUST PhD Student Computer Science & Engineering Dept. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151126/4f895f36/attachment.html>
On Thu, Nov 26, 2015 at 10:20:03PM +0000, marwayusuf at feng.bu.edu.eg via llvm-dev wrote:> I'm trying to get openmp to work with llvm, either with static compiler > or with jit, however with no success.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 On 26 November 2015 at 23:42, Joerg Sonnenberger via llvm-dev < llvm-dev at lists.llvm.org> wrote:> On Thu, Nov 26, 2015 at 10:20:03PM +0000, marwayusuf at feng.bu.edu.eg via > llvm-dev wrote: > > I'm trying to get openmp to work with llvm, either with static compiler > > or with jit, however with no success. > > 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 > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Jakub Kuderski -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151129/8a651304/attachment.html>