[Openmp-dev] issue with opennp and clang

Sunita Chandrasekaran sunita at cs.uh.edu
Fri Nov 7 12:14:06 PST 2014


Also make your envt. variables point to the <path to newly build libiomp5
lib dir>
-Sunita

On Fri, Nov 7, 2014 at 2:02 PM, Amir H. Ashouri <
amirhossein.ashouri at gmail.com> wrote:

> Greetings,
>
> so I tried to use opennp with one of the latest version of clang, clang
> version 3.4.2 (tags/RELEASE_34/dot2-final). Followed the procedure to
> compilre and export the library PATHs, Compiling my hello.c using :
>
> clang -fopenmp hello.c
>
> and then running it, still it can't use more than 1 thread:
>
> Bash-4.1$ ./a.out Hello from thread 0, nthreads 1
>
> I tried to manually export export OMP_NUM_THREADS=8 but that didn't solve
> anything as well, As a workaround I define  #pragma omp parallel
> num_threads(#noofthreads) inside the source code but still the issue is
> there.
>
> Any suggestions would be appreciated.
>
>
> -Amir
>
>
> p.sl: This is the hello.c:
>
> #include <omp.h>#include <stdio.h>int main() {#pragma omp parallel
> printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads
>
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20141107/7b9f0304/attachment.html>


More information about the Openmp-dev mailing list