[Openmp-dev] Building Clang+OpenMP on Power9

Jacob Lambert via Openmp-dev openmp-dev at lists.llvm.org
Tue Oct 15 10:06:07 PDT 2019


I'm having trouble building clang+OpenMP on a Power9 system with support of
offloading to an attached Nvidia GPU (V100). Is this kind of build
currently supported? I was able to successfully build clang, which I'm now
attempting to use as the C/C++ compiler for a clang+openMP build.

 Here are my Cmake/make commands:
----------------------------------------
/home/username/misc/bin/cmake -G "Unix Makefiles" ../llvm \
  -DLLVM_ENABLE_PROJECTS="clang;openmp" \
  -DCMAKE_BUILD_TYPE=Release \

-DCMAKE_INSTALL_PREFIX=/home/username/compilers/clang-build-RELEASE_900-rc6_pwr9
\
  -DCMAKE_C_COMPILER=/home/username/git/llvm-project/install_pwr9/bin/clang
\
  -DCMAKE_C_FLAGS="--gcc-toolchain=/auto/software/gcc/ppc64le/gcc-8.3.0" \

-DCMAKE_CXX_COMPILER=/home/username/git/llvm-project/install_pwr9/bin/clang++
\
  -DCMAKE_CXX_FLAGS="--gcc-toolchain=/auto/software/gcc/ppc64le/gcc-8.3.0" \
  -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_70 \
  -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=70

make VERBOSE=1 -j8
----------------------------------------

Here's the error I'm getting:
----------------------------------------
/usr/local/cuda-10.1/bin/nvcc
/home/username/git/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/
omp_data.cu -dc -o
/home/username/git/llvm-project/build_pwr9/projects/openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_omp_data.cu.o
-ccbin /auto/software/gcc/ppc64le/gcc-8.3.0/bin/gcc -m64 -D_GNU_SOURCE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-gencode arch=compute_35,code=sm_35 -DNVCC -I/usr/local/cuda-10.1/include
-I/usr/include/libxml2 -I/home/username/git/llvm-project/build_pwr9/include
-I/home/username/git/llvm-project/llvm/include
-I/home/username/git/llvm-project/openmp/libomptarget/include
/auto/software/gcc/ppc64le/gcc-8.3.0/include/c++/8.3.0/type_traits(335):
error: identifier "__ieee128" is undefined
/auto/software/gcc/ppc64le/gcc-8.3.0/include/c++/8.3.0/bits/std_abs.h(101):
error: identifier "__ieee128" is undefined
/auto/software/gcc/ppc64le/gcc-8.3.0/include/c++/8.3.0/bits/std_abs.h(102):
error: identifier "__ieee128" is undefined
3 errors detected in the compilation of
"/tmp/tmpxft_0000bd6b_00000000-6_omp_data.cpp1.ii".
----------------------------------------

Finally, here are the offending lines from std_abs.h:
----------------------------------------
 99 #if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
100   inline _GLIBCXX_CONSTEXPR
101   __float128
102   abs(__float128 __x)
103   { return __x < 0 ? -__x : __x; }
104 #endif

I haven't been able to find any reference of a variable substitution/macro
between __float128 and __ieee128, I'm not sure where/when this takes place.
----------------------------------------

Any ideas? I'm not sure if the errors stem from my clang build process, my
gcc installation, my cuda/nvcc installlation, Unix Makefiles vs Ninja, etc.

Jacob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20191015/bca92dcb/attachment-0001.html>


More information about the Openmp-dev mailing list