[Openmp-dev] clang 6.0.0 and libomptarget
Jonas Hahnfeld via Openmp-dev
openmp-dev at lists.llvm.org
Tue Oct 17 16:13:05 PDT 2017
Hi,
as I wrote a few hours ago there are still some bits missing, so don't
expect this to work at the moment.
Some more comments inline, just for future reference...
Am 2017-10-17 18:01, schrieb Jost, Gabriele (ARC-TNE)[CSRA, LLC] via
Openmp-dev:
> 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.
In my last e-mail I wrote '-Xopenmp-target -march=sm_60', the order is
important here.
(Also note that current top of trunk defaults to sm_30 for OpenMP since
this morning.)
--cuda-path doesn't seem right, maybe you meant something like
/usr/local/cuda? This is the default location and will be tried by Clang
automatically.
>
> 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)
This won't work as this version is heavily out-dated and current Clang
calls incompatible runtime functions.
Again, not all pieces are upstreamed yet but mixing very old stuff also
won't work.
Cheers,
Jonas
>
> Note: If you feel that I am sending too many questions to this forum,
> please let me know =.
>
> Gabriele
>
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
More information about the Openmp-dev
mailing list