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 (if you're unfamiliar with CUDA, the task of solving this would mean making sure no functions called in an OpenMP region have the device or global attributes). 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.
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 (if you're unfamiliar with CUDA, the task of solving this would mean making sure no functions called in an OpenMP region have the device or global attributes). 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.