openmp runs single threaded

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

Hi Renaud,

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

Yours,
Andrey

thanks, that was it!
renaud