[Bug 227438] -fopenmp=libgomp doesn't work
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Apr 11 05:29:00 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227438
Bug ID: 227438
Summary: -fopenmp=libgomp doesn't work
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: toolchain at FreeBSD.org
Reporter: jbeich at FreeBSD.org
libomp has limited platform availability (currently, only i386 and amd64), so
ports/ may prefer to use another library to avoid ugly conditionals. Using GCC
isn't always an option due to conflicts in libgcc_s, libstdc++, broken ASAN and
hard to use with LLD.
Steps to reproduce:
$ pkg install ca_root_nss gcc7
$ fetch https://computing.llnl.gov/tutorials/openMP/samples/C/omp_hello.c
$ cc -fopenmp=libgomp -isystem$(find /usr/local/lib/gcc7 -name omp.h | xargs
dirname) -L/usr/local/lib/gcc7 omp_hello.c
Actual result
$ ./a.out
Hello World from thread = 0
Number of threads = 1
Expected result:
$ ./a.out
Hello World from thread = 4
Hello World from thread = 0
Number of threads = 8
Hello World from thread = 2
Hello World from thread = 1
Hello World from thread = 6
Hello World from thread = 5
Hello World from thread = 7
Hello World from thread = 3
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-toolchain
mailing list