[Openmp-dev] clang 6.0.0 and libomptarget

Jost, Gabriele (ARC-TNE)[CSRA, LLC] via Openmp-dev openmp-dev at lists.llvm.org
Tue Oct 17 15:01:32 PDT 2017


Hello,

I have installed 
clang version 6.0.0 (trunk 315725) (llvm/trunk 315713)

on my system. When trying to build a simple example I get the following error:

+ clang -c -Iclang-install/lib/clang/6.0.0/include -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -march=sm_35 -Xopenmp-target --cuda-path=/cuda/8.0/bin example.c
clang-6.0: error: cannot find libdevice for sm_20. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.

I am now looking at some older instruction for clang + openm4 (not 4.5).
There is one step I did not do:

$ cd $HOME/forge/openmp4
$ git clone https://github.com/clang-omp/libomptarget.git
$ cd libomptarget
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/forge/openmp4/llvm/install -DOMPTARGET_NVPTX_SM=30,35 ..
$ make -j12
$ cp -rf lib/libomptarget* $HOME/forge/openmp4/llvm/install/lib/

Is this still necessary for the latest and greatest clang?

(website is https://parallel-computing.pro/index.php/9-cuda/43-openmp-4-0-on-nvidia-cuda-gpus)

Note: If you feel that I am sending too many questions to this forum, please let me know =.

Gabriele 




More information about the Openmp-dev mailing list