clang-omp / clang

clang with OpenMP 3.1 and some elements of OpenMP 4.0 support
clang-omp.github.com
Other
91 stars 15 forks source link

segfault on hello.c example #77

Closed 3gx closed 9 years ago

3gx commented 9 years ago

Used instructions from clang-omp page, via

$ brew  install clang-omp
...
$ cat > 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());
}
^C
$ clang-omp -fopenmp hello.c -o hello
$ ./hello
Segmentation fault: 11

System: OSX 10.10.4.

Any idea what might be going on?

3gx commented 9 years ago

Never mind, I was setting LD_LIBRARY_PATH, which must be DYLD_LIBRARY_PATH on OSX.