Alexander Kurtz
2017-11-26 19:10:01 UTC
Package: clang
Version: 1:3.8-37
Hi!
The gcc package Depends: on gcc-7 -> libgcc-7-dev -> libgomp1, which
means the following works out-of-the-box:
***@shepard:~$ cat test.c
int main(){
#pragma omp parallel for schedule(dynamic,50)
for(int i = 0; i < 10; i++);
}
***@shepard:~$ gcc -fopenmp test.c
***@shepard:~$ ./a.out
***@shepard:~$
In contrast, the clang package does not pull in libomp-dev, which means
the following fails:
***@shepard:~$ cat test.c
int main(){
#pragma omp parallel for schedule(dynamic,50)
for(int i = 0; i < 10; i++);
}
***@shepard:~$ clang -fopenmp test.c
/usr/bin/ld: cannot find -lomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
***@shepard:~$
I think that if the clang binary supports the -fopenmp switch, it is
reasonable to assume that it actually works. Therefore please make the
clang package depend on the libomp-dev package.
Best regards
Alexander Kurtz
Version: 1:3.8-37
Hi!
The gcc package Depends: on gcc-7 -> libgcc-7-dev -> libgomp1, which
means the following works out-of-the-box:
***@shepard:~$ cat test.c
int main(){
#pragma omp parallel for schedule(dynamic,50)
for(int i = 0; i < 10; i++);
}
***@shepard:~$ gcc -fopenmp test.c
***@shepard:~$ ./a.out
***@shepard:~$
In contrast, the clang package does not pull in libomp-dev, which means
the following fails:
***@shepard:~$ cat test.c
int main(){
#pragma omp parallel for schedule(dynamic,50)
for(int i = 0; i < 10; i++);
}
***@shepard:~$ clang -fopenmp test.c
/usr/bin/ld: cannot find -lomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
***@shepard:~$
I think that if the clang binary supports the -fopenmp switch, it is
reasonable to assume that it actually works. Therefore please make the
clang package depend on the libomp-dev package.
Best regards
Alexander Kurtz