[llvm-bugs] [Bug 28723] New: Can't have OpenMP enabled while compiling CUDA (even without any OpenMP constructs)

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 26 13:13:10 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28723

            Bug ID: 28723
           Summary: Can't have OpenMP enabled while compiling CUDA (even
                    without any OpenMP constructs)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: CUDA
          Assignee: unassignedclangbugs at nondot.org
          Reporter: poliakoff1 at llnl.gov
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Please excuse if this is in the wrong tracker, it might need to be in the CUDA
or OpenMP section (in fact, I'll file an issue there as well)

I have a file without any OpenMP in it, and if I try

clang++ [cuda args] -x cuda -std=c++11 --cuda-gpu-arch=sm_30 -stdlib=libc++
b.cpp

it is successful. If on the other hand I try

clang++ [cuda args] -x cuda -std=c++11 --cuda-gpu-arch=sm_30 -stdlib=libc++
-fopenmp b.cpp

I get

error: The target 'nvptx64-nvidia-cuda' is not a supported OpenMP host target.

It appears that Clang only sees that I am using a CUDA backend and am using the
OpenMP flag, not checking whether any OpenMP code actually needs to go to the
PTX backend. Much like the Sandia folks, we're writing portable parallel
programming models and would really love to put Clang through its paces, but if
we can't write code where CUDA sections follow OpenMP ones, we won't be able
to.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160726/0a7549d2/attachment.html>


More information about the llvm-bugs mailing list