[Openmp-dev] openmp runs single threaded

Andrey Bokhanko via Openmp-dev openmp-dev at lists.llvm.org
Fri Jan 29 02:14:52 PST 2016


Hi Renaud,

Try to use -fopenmp=libomp. This is already fixed in trunk, but not in 3.7.

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

On Fri, Jan 29, 2016 at 11:15 AM, Renaud Blanch via Openmp-dev
<openmp-dev at lists.llvm.org> wrote:
> hello,
>
> i am trying to use clang with openmp support on a mac (10.9).
> i have tried compiling from 3.7.1 sources (using instruciton at http://openmp.llvm.org/) and prebuld 3.7.0 binaries for maces/darwin (from http://llvm.org/releases/download.html#3.7.0) with the same result:
> the compiler handles the #pragma omp directive without complaining, the resulting binary is linked against libomp as excepted, but it runs single threaded, no matters the method i try to set num_threads (num_threads directive, OMP_NUM_THREADS env, omp_set_num_threads call, etc.)
> omp_get_num_procs and omp_get_max_threads both return 4 on my machine.
> the code is a basic hello parallel world program …
>
> any hints ?
> more details, and the code are in this stackoverflow question:
> stackoverflow.com/questions/35064093/openmp-runs-single-threaded-on-my-mac
>
> thanks,
>
> renaud
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev


More information about the Openmp-dev mailing list