RAJA icon indicating copy to clipboard operation
RAJA copied to clipboard

SYCL Link/Build Issues

Open rchen20 opened this issue 4 years ago • 0 comments

The SYCL PR https://github.com/LLNL/RAJA/pull/1081 was tried on RZHASGPU (Intel CPU + Nvidia GPU) and has some linking/compilation problems:

  • Dpcpp build error using the dpcpp.cuda.sh script. The clang compiler installed needs to be compiled with the SYCL_BUILD_PI_CUDA=ON Cmake option in order for the faulty flag to work.

[ 0%] Building CXX object CMakeFiles/RAJA.dir/src/AlignedRangeIndexSetBuilders.cpp.o clang++: error: SYCL target is invalid: 'nvptx64-nvidia-cuda-sycldevice'

How to reproduce (using branch bugfix/chen59/sycllinking for convenience):

  1. ssh rzhasgpu
  2. git clone --recursive --branch bugfix/chen59/sycllinking [email protected]:LLNL/RAJA.git
  3. cd RAJA
  4. module load intel/oneapi.2021.2
  5. salloc
  6. ./scripts/alcf-builds/dpcpp.cuda.sh
  • Clang link error using the sycl.sh script. The linker searches for c++11 symbols regardless of the -std flag or which CXX_STANDARD is set. In the past, people had added the -D_GLIBCXX_USE_CXX11_ABI=0 compilation flag to avoid c++11 symbols, but this no longer appears to work. NOTE: Need to load the intel/oneapi.2021.2 module when building with this script.

How to reproduce (using branch bugfix/chen59/sycllinking for convenience):

  1. ssh rzhasgpu
  2. git clone --recursive --branch bugfix/chen59/sycllinking [email protected]:LLNL/RAJA.git
  3. cd RAJA
  4. module load intel/oneapi.2021.2
  5. salloc
  6. ./scripts/alcf-builds/sycl.sh

/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /usr/tce/packages/oneapi/oneapi-2021.2/compiler/2021.2.0/linux/bin/../lib/libsycl.so: undefined reference to 'VTT for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21' /opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /usr/tce/packages/oneapi/oneapi-2021.2/compiler/2021.2.0/linux/bin/../lib/libsycl.so: undefined reference to 'std::thread::_State::~_State()@GLIBCXX_3.4.22'

rchen20 avatar Jun 14 '21 22:06 rchen20