[Openmp-dev] Problem in setting number of threads while using clang with openmp

Andrey Bokhanko andreybokhanko at gmail.com
Tue Jul 14 14:37:04 PDT 2015


Hi Rajat,

OpenMP 3.1 is fully upstreamed to clang / llvm trunk, so it is better
to use trunk version (unless you have a really good reason to prefer
one hosted on clang-omp.github).

Instructions are posted on llvm blog:
http://blog.llvm.org/2015/05/openmp-support_22.html. The only
difference is that instead of "-fopenmp" you should use
"-fopenmp=libomp" (this is temporary and will be fixed, but here we
are).

As for the segmentation fault you got, please try trunk version of the
compiler and if problem won't go away, provide more details: HW and OS
you use, how exactly you built clang, what's inside try.c, etc.

Yours,
Andrey Bokhanko
=============
Software Engineer
Intel Compiler Team
Intel


On Tue, Jul 14, 2015 at 9:03 PM, Rajat Garg <gargx093 at umn.edu> wrote:
> Hi,
>
> I am using the clang provided by polly(which is version 3.7) in association
> with openmp shared library(http://openmp.llvm.org/).
>
> Ultimately, I have to run clang with polly on multiple threads. So, I tried
> to compile a simple program with #pragma parallel. But I could not create
> more than one thread. This was because libgomp was getting linked instead of
> libomp.
>
> So, as suggested on https://github.com/clang-omp/clang/issues/44, I
> downloaded the clang-omp version and following the directions as in
> https://clang-omp.github.io/.
>
> ../build/bin/clang-3.5 -fopenmp
> -L/home/rajat/lulesh/openmp/runtime/exports/lin_32e/lib/
> -I/home/rajat/lulesh/openmp/runtime/exports/common/include try.c
>
> But, this gives segmentation fault with #pragma omp parallel.
>
> Can you help me out in this.
>
> Thanks,
> Rajat
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev
>



More information about the Openmp-dev mailing list