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

Andrey Bokhanko andreybokhanko at gmail.com
Wed Jul 15 07:46:08 PDT 2015


Rajat,

Glad this helped.

As for mentioning "-fopenmp=libomp", today we got one step closer for
making libomp the default value. So maybe it will go for good soon?

Andrey


On Wed, Jul 15, 2015 at 4:43 PM, Rajat Garg <gargx093 at umn.edu> wrote:
> Hi,
>
> Thanks a lot for mentioning "-fopenmp=libomp". This works perfectly fine.
> Maybe you should should mention this on http://openmp.llvm.org/. I have been
> dealing with this for last two days.
>
>
> Thanks,
> Rajat
>
> On Tue, Jul 14, 2015 at 5:37 PM, Andrey Bokhanko <andreybokhanko at gmail.com>
> wrote:
>>
>> 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
>> >
>
>
>
>
> --
> Rajat



More information about the Openmp-dev mailing list