[llvm-dev] llvm-5.0: couldn't build libomptarget

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[llvm-dev] llvm-5.0: couldn't build libomptarget

George Karpenkov via llvm-dev
Hi,

I've built llvm-5.0 with some projects (gcc-5.3.0 necessary for CUDA)
on my "SUSE Linux Enterprise Server 12.2 (x86_64)". Unfortunately,
the project libomptarget wasn't built, while I could build it some
weeks ago in llvm-trunk.


loki fd1026 107 clang -v
clang version 5.0.0 (branches/release_50 310550)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/llvm-5.0/bin
Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda, version 8.0

loki fd1026 108 find /usr/local/llvm-5.0/ -name '*omptarget*'
loki fd1026 109 tar zvft /usr/local/llvm-trunk_working.tar.gz | grep omptarget
-rwxr-xr-x root/root     20176 2017-07-17 17:56
llvm-trunk/lib64/libomptarget.rtl.x86_64.so
-rwxr-xr-x root/root     25840 2017-07-17 17:56
llvm-trunk/lib64/libomptarget.rtl.cuda.so
-rwxr-xr-x root/root     81360 2017-07-17 17:56 llvm-trunk/lib64/libomptarget.so
loki fd1026 110


I've used the following commands to configure and build everything.

svn co http://llvm.org/svn/llvm-project/llvm/branches/release_50 llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/branches/release_50 clang
svn co http://llvm.org/svn/llvm-project/polly/branches/release_50 polly
cd clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_50/ extra
cd ../../../projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/branches/release_50 compiler-rt
svn co http://llvm.org/svn/llvm-project/openmp/branches/release_50 openmp
svn co https://github.com/clang-ykt/openmp libomptarget


mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/${LLVM_VERSION} \
   -GNinja \
   -DLLVM_TARGETS_TO_BUILD:STRING="NVPTX;X86" \
   -DCMAKE_BUILD_TYPE:STRING="Release" \
   -DLLVM_PARALLEL_COMPILE_JOBS:STRING="4" \
   -DLLVM_PARALLEL_LINK_JOBS:STRING="4" \
   -DCMAKE_C_COMPILER:STRING="${DIRPREFIX_PROG}/${GCCDIR}/bin/gcc" \
   -DCMAKE_C_FLAGS:STRING="-m64 -I/usr/local/valgrind/include" \
   -DCMAKE_CXX_COMPILER:STRING="${DIRPREFIX_PROG}/${GCCDIR}/bin/g++" \
   -DCMAKE_CXX_FLAGS:STRING="-m64 -I/usr/local/valgrind/include" \
   -DCMAKE_EXE_LINKER_FLAGS:STRING="-m64" \
   -DLLVM_LIBDIR_SUFFIX:STRING="64" \
   -DLLVM_POLLY_LINK_INTO_TOOLS:BOOL=ON \
 
-DLIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR:STRING="/usr/local/elfutils-0.169/include" \
 
-DLIBOMPTARGET_DEP_LIBELF_LIBRARIES:STRING="/usr/local/elfutils-0.169/lib64/libelf.so"
\
   -DLIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR:STRING="/usr/include" \
   -DLIBOMPTARGET_DEP_LIBFFI_LIBRARIES:STRING="/usr/lib64/libffi.so" \
   -DCUDA_INCLUDE_DIRS:STRING="/usr/local/cuda/include" \
   -DCUDA_LIBRARIES:STRING="/usr/local/cuda/lib64/libcudart.so" \
   -DBUILD_SHARED_LIBS:BOOL=ON \
   ../llvm \
   |& tee log.cmake

ninja |& tee log.ninja-build
ninja check |& tee log.ninja-check
ninja install |& tee log.ninja-install

loki build 217 tail -11 log.cmake
   Manually-specified variables were not used by the project:
     CUDA_INCLUDE_DIRS
     CUDA_LIBRARIES
     LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR
     LIBOMPTARGET_DEP_LIBELF_LIBRARIES
     LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR
     LIBOMPTARGET_DEP_LIBFFI_LIBRARIES
-- Build files have been written to: /export2/src/llvm-5.0/build

loki build 218 grep -i omptarget log.*
log.cmake:    LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR
log.cmake:    LIBOMPTARGET_DEP_LIBELF_LIBRARIES
log.cmake:    LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR
log.cmake:    LIBOMPTARGET_DEP_LIBFFI_LIBRARIES
loki build 219


Isn't libomptarget supported any longer? Do I have to change something in
my checkout or configuration? I would be grateful if somebody can answer
my questions. Please let me know if you need anything else. Thank you very
much for any help in advance.


Kind regards

Siegmar
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [llvm-dev] llvm-5.0: couldn't build libomptarget

George Karpenkov via llvm-dev
Hi,

+openmp-dev for discussion about runtime libraries.

libomptarget has been disabled until the tests pass and that change has
been merged for 5.0.
If you really want it to build specify -DOPENMP_ENABLE_LIBOMPTARGET=On.
As a side node: Currently, the committed code only allows offloading to
the host, not yet to NVIDIA GPUs.

Cheers,
Jonas

Am 2017-08-10 11:52, schrieb Siegmar Gross via llvm-dev:

> Hi,
>
> I've built llvm-5.0 with some projects (gcc-5.3.0 necessary for CUDA)
> on my "SUSE Linux Enterprise Server 12.2 (x86_64)". Unfortunately,
> the project libomptarget wasn't built, while I could build it some
> weeks ago in llvm-trunk.
>
>
> loki fd1026 107 clang -v
> clang version 5.0.0 (branches/release_50 310550)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /usr/local/llvm-5.0/bin
> Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
> Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
> Candidate multilib: .;@m64
> Candidate multilib: 32;@m32
> Selected multilib: .;@m64
> Found CUDA installation: /usr/local/cuda, version 8.0
>
> loki fd1026 108 find /usr/local/llvm-5.0/ -name '*omptarget*'
> loki fd1026 109 tar zvft /usr/local/llvm-trunk_working.tar.gz | grep
> omptarget
> -rwxr-xr-x root/root     20176 2017-07-17 17:56
> llvm-trunk/lib64/libomptarget.rtl.x86_64.so
> -rwxr-xr-x root/root     25840 2017-07-17 17:56
> llvm-trunk/lib64/libomptarget.rtl.cuda.so
> -rwxr-xr-x root/root     81360 2017-07-17 17:56
> llvm-trunk/lib64/libomptarget.so
> loki fd1026 110
>
>
> I've used the following commands to configure and build everything.
>
> svn co http://llvm.org/svn/llvm-project/llvm/branches/release_50 llvm
> cd llvm/tools
> svn co http://llvm.org/svn/llvm-project/cfe/branches/release_50 clang
> svn co http://llvm.org/svn/llvm-project/polly/branches/release_50 polly
> cd clang/tools
> svn co
> http://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_50/
> extra
> cd ../../../projects
> svn co
> http://llvm.org/svn/llvm-project/compiler-rt/branches/release_50
> compiler-rt
> svn co http://llvm.org/svn/llvm-project/openmp/branches/release_50 
> openmp
> svn co https://github.com/clang-ykt/openmp libomptarget
>
>
> mkdir build
> cd build
> cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/${LLVM_VERSION} \
>   -GNinja \
>   -DLLVM_TARGETS_TO_BUILD:STRING="NVPTX;X86" \
>   -DCMAKE_BUILD_TYPE:STRING="Release" \
>   -DLLVM_PARALLEL_COMPILE_JOBS:STRING="4" \
>   -DLLVM_PARALLEL_LINK_JOBS:STRING="4" \
>   -DCMAKE_C_COMPILER:STRING="${DIRPREFIX_PROG}/${GCCDIR}/bin/gcc" \
>   -DCMAKE_C_FLAGS:STRING="-m64 -I/usr/local/valgrind/include" \
>   -DCMAKE_CXX_COMPILER:STRING="${DIRPREFIX_PROG}/${GCCDIR}/bin/g++" \
>   -DCMAKE_CXX_FLAGS:STRING="-m64 -I/usr/local/valgrind/include" \
>   -DCMAKE_EXE_LINKER_FLAGS:STRING="-m64" \
>   -DLLVM_LIBDIR_SUFFIX:STRING="64" \
>   -DLLVM_POLLY_LINK_INTO_TOOLS:BOOL=ON \
>
> -DLIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR:STRING="/usr/local/elfutils-0.169/include"
> \
>
> -DLIBOMPTARGET_DEP_LIBELF_LIBRARIES:STRING="/usr/local/elfutils-0.169/lib64/libelf.so"
> \
>   -DLIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR:STRING="/usr/include" \
>   -DLIBOMPTARGET_DEP_LIBFFI_LIBRARIES:STRING="/usr/lib64/libffi.so" \
>   -DCUDA_INCLUDE_DIRS:STRING="/usr/local/cuda/include" \
>   -DCUDA_LIBRARIES:STRING="/usr/local/cuda/lib64/libcudart.so" \
>   -DBUILD_SHARED_LIBS:BOOL=ON \
>   ../llvm \
>   |& tee log.cmake
>
> ninja |& tee log.ninja-build
> ninja check |& tee log.ninja-check
> ninja install |& tee log.ninja-install
>
> loki build 217 tail -11 log.cmake
>   Manually-specified variables were not used by the project:
>     CUDA_INCLUDE_DIRS
>     CUDA_LIBRARIES
>     LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR
>     LIBOMPTARGET_DEP_LIBELF_LIBRARIES
>     LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR
>     LIBOMPTARGET_DEP_LIBFFI_LIBRARIES
> -- Build files have been written to: /export2/src/llvm-5.0/build
>
> loki build 218 grep -i omptarget log.*
> log.cmake:    LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR
> log.cmake:    LIBOMPTARGET_DEP_LIBELF_LIBRARIES
> log.cmake:    LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR
> log.cmake:    LIBOMPTARGET_DEP_LIBFFI_LIBRARIES
> loki build 219
>
>
> Isn't libomptarget supported any longer? Do I have to change something
> in
> my checkout or configuration? I would be grateful if somebody can
> answer
> my questions. Please let me know if you need anything else. Thank you
> very
> much for any help in advance.
>
>
> Kind regards
>
> Siegmar
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Loading...