Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Mar 2019 21:01:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 236581] -fopenmp underlinking
Message-ID:  <bug-236581-29464@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236581

            Bug ID: 236581
           Summary: -fopenmp underlinking
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: toolchain@FreeBSD.org
          Reporter: jbeich@FreeBSD.org

$ fetch https://computing.llnl.gov/tutorials/openMP/samples/C/omp_hello.c
$ cc -fopenmp omp_hello.c
$ ldd a.out
a.out:
        libomp.so => /usr/lib/libomp.so (0x80024b000)
        libc.so.7 => /lib/libc.so.7 (0x8002fd000)
$ ./a.out
OMP: Error #178: Function pthread_key_create failed:
OMP: System error #78: Function not implemented

vs.

$ pkg install llvm80
$ clang80 -fopenmp omp_hello.c
$ ldd ./a.out
./a.out:
        libomp.so => /usr/local/llvm80/lib/libomp.so (0x800249000)
        libc.so.7 => /lib/libc.so.7 (0x8002f2000)
        libthr.so.3 => /lib/libthr.so.3 (0x800706000)
        libm.so.5 => /lib/libm.so.5 (0x800732000)
$ ./a.out
Hello World from thread = 0
Number of threads = 8
Hello World from thread = 5
Hello World from thread = 6
Hello World from thread = 3
Hello World from thread = 2
Hello World from thread = 1
Hello World from thread = 7
Hello World from thread = 4

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236581-29464>