use clang++ to build lulesh 2.0 failed

Hello,

I’m trying to use clang++ instead of nvcc to build lulesh 2.0 cuda version. And it fails in the compilation with errors like the one below:

opt/common/cuda/cuda-7.5.18/include/thrust/iterator/iterator_adaptor.h:187:5: error: expected member name or ‘;’ after declaration specifiers
thrust_exec_check_disable

​It looks like clang++ is complaining about the thrust library comes with cuda, while nvcc works fine for this case. So does it mean clang++ does not support compiling this benchmark (even though it’s cuda 7.5)? Or how should I tackle these errors?

Thanks a lot!​

​It looks like clang++ is complaining about the thrust library comes with cuda,

The Thrust library that comes with CUDA is indeed not compatible with clang. We made a number of changes to Thrust to make it work with clang (it was relying on what we considered to be bugs in nvcc), but they’re only available in the upstream Thrust: https://github.com/thrust/thrust.

No promises that one builds with Clang either, but at least it should.

Thanks, Justin. I’ll give it a try.