Hello, I am trying to compile computecpp samples from guide in codeplay page. I did download and extract ComputeCpp-1.2.0-CentOS-x86_64 version from the official codeplay page
My installation environment:
Centos 7
Cmake 3.10.3
Gcc 7.3.0
OpenCl version 1.2
OpenCL is working great without computecpp
./computecpp_info
ComputeCpp Info (CE 1.2.0)
SYCL 1.2.1 revision 3
Toolchain information:
GLIBC version: 2.17
GLIBCXX: 20150623
This version of libstdc++ is supported.
Device Info:
Discovered 1 devices matching:
platform :
device type :
Device 0:
Device is supported : YES - Tested internally by Codeplay Software Ltd.
Bitcode targets : spir64
CL_DEVICE_NAME : Intel(R) Core™ i7-3770 CPU @ 3.40GHz
CL_DEVICE_VENDOR : Intel(R) Corporation
CL_DRIVER_VERSION : 1.2.0.475
CL_DEVICE_TYPE : CL_DEVICE_TYPE_CPU
If you encounter problems when using any of these OpenCL devices, please consult
this website for known issues:
cmake works well:
cmake …/ -DComputeCpp_DIR=/share/apps/devel/ComputeCpp-CE-1.2.0-CentOS-x86_64 -DOpenCL_INCLUDE_DIR=/share/apps/devel/intel-opencl-SRB5.0/include/CL -DOpenCL_LIBRARY=/share/apps/devel/intel-opencl-SRB5.0/lib/libOpenCL.so
– The C compiler identification is GNU 7.3.0
– The CXX compiler identification is GNU 7.3.0
– Check for working C compiler: /share/apps/compilers/gcc-7.3.0/bin/gcc
– Check for working C compiler: /share/apps/compilers/gcc-7.3.0/bin/gcc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /share/apps/compilers/gcc-7.3.0/bin/g++
– Check for working CXX compiler: /share/apps/compilers/gcc-7.3.0/bin/g++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Looking for CL_VERSION_2_2
– Looking for CL_VERSION_2_2 - not found
– Looking for CL_VERSION_2_1
– Looking for CL_VERSION_2_1 - not found
– Looking for CL_VERSION_2_0
– Looking for CL_VERSION_2_0 - not found
– Looking for CL_VERSION_1_2
– Looking for CL_VERSION_1_2 - not found
– Looking for CL_VERSION_1_1
– Looking for CL_VERSION_1_1 - not found
– Looking for CL_VERSION_1_0
– Looking for CL_VERSION_1_0 - not found
– Found OpenCL: /share/apps/devel/intel-opencl-SRB5.0/lib/libOpenCL.so
– platform - your system can support ComputeCpp
– Found ComputeCpp: /share/apps/devel/ComputeCpp-CE-1.2.0-CentOS-x86_64 (found version “CE 1.2.0”)
– compute++ flags - -O2;-mllvm;-inline-threshold=1000;-intelspirmetadata;-sycl-target;spir64
– Configuring done
– Generating done
– Build files have been written to: /home/edvinas/computecpp-sdk/build
But problem happens when I run make command:
make
Scanning dependencies of target vptr_vptr.cpp_0_ih
[ 1%] Building ComputeCpp integration header file /home/edvinas/computecpp-sdk/build/samples/vptr_vptr.cpp.sycl
remark: [Computecpp:CC0027]: Some memcpy/memset intrinsics added by the llvm optimizer were replaced by serial
functions. This is a workaround for OpenCL drivers that do not support those intrinsics. This may impact
performance, consider using -no-serial-memop. [-Rsycl-serial-memop]
[ 1%] Built target vptr_vptr.cpp_0_ih
Scanning dependencies of target vptr
[ 2%] Building CXX object samples/CMakeFiles/vptr.dir/vptr.cpp.o
In file included from /home/edvinas/computecpp-sdk/samples/vptr.cpp:33:0:
/home/edvinas/computecpp-sdk/include/vptr/virtual_ptr.hpp: In member function ‘cl::sycl::buffer<buffer_data_type, 1> cl::sycl::codeplay::PointerMapper::get_buffer(cl::sycl::codeplay::PointerMapper::virtual_pointer_t)’:
/home/edvinas/computecpp-sdk/include/vptr/virtual_ptr.hpp:238:64: warning: typedef ‘using sycl_buffer_t = class cl::sycl::buffer<buffer_data_type, 1>’ locally defined but not used [-Wunused-local-typedefs]
using sycl_buffer_t = cl::sycl::buffer<buffer_data_type, 1>;
^
[ 3%] Linking CXX executable vptr
CMakeFiles/vptr.dir/vptr.cpp.o: In function cl::sycl::program cl::sycl::program::create_program_for_kernel<init_a>(cl::sycl::context)': vptr.cpp:(.text._ZN2cl4sycl7program25create_program_for_kernelI6init_aEES1_NS0_7contextE[_ZN2cl4sycl7program25create_program_for_kernelI6init_aEES1_NS0_7contextE]+0x2a0): undefined reference to
cl::sycl::program::create_program_for_kernel_impl(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, unsigned char const*, int, char const* const*, std::shared_ptrcl::sycl::detail::context, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)’
CMakeFiles/vptr.dir/vptr.cpp.o: In function cl::sycl::kernel cl::sycl::program::get_kernel<init_a>() const': vptr.cpp:(.text._ZNK2cl4sycl7program10get_kernelI6init_aEENS0_6kernelEv[_ZNK2cl4sycl7program10get_kernelI6init_aEENS0_6kernelEv]+0x59): undefined reference to
cl::sycl::program::get_kernel(std::__cxx11::basic_string<char, std::char_traits, std::allocator >) const’
vptr.cpp:(.text._ZNK2cl4sycl7program10get_kernelI6init_aEENS0_6kernelEv[_ZNK2cl4sycl7program10get_kernelI6init_aEENS0_6kernelEv]+0xae): undefined reference to cl::sycl::program::get_kernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const' CMakeFiles/vptr.dir/vptr.cpp.o: In function
cl::sycl::program cl::sycl::program::create_program_for_kernel<init_b>(cl::sycl::context)‘:
vptr.cpp:(.text._ZN2cl4sycl7program25create_program_for_kernelI6init_bEES1_NS0_7contextE[_ZN2cl4sycl7program25create_program_for_kernelI6init_bEES1_NS0_7contextE]+0x2a0): undefined reference to cl::sycl::program::create_program_for_kernel_impl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned char const*, int, char const* const*, std::shared_ptr<cl::sycl::detail::context>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' CMakeFiles/vptr.dir/vptr.cpp.o: In function
cl::sycl::kernel cl::sycl::program::get_kernel<init_b>() const’:
vptr.cpp:(.text._ZNK2cl4sycl7program10get_kernelI6init_bEENS0_6kernelEv[_ZNK2cl4sycl7program10get_kernelI6init_bEENS0_6kernelEv]+0x59): undefined reference to cl::sycl::program::get_kernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const' vptr.cpp:(.text._ZNK2cl4sycl7program10get_kernelI6init_bEENS0_6kernelEv[_ZNK2cl4sycl7program10get_kernelI6init_bEENS0_6kernelEv]+0xae): undefined reference to
cl::sycl::program::get_kernel(std::__cxx11::basic_string<char, std::char_traits, std::allocator >) const’
CMakeFiles/vptr.dir/vptr.cpp.o: In function cl::sycl::program cl::sycl::program::create_program_for_kernel<matrix_add>(cl::sycl::context)': vptr.cpp:(.text._ZN2cl4sycl7program25create_program_for_kernelI10matrix_addEES1_NS0_7contextE[_ZN2cl4sycl7program25create_program_for_kernelI10matrix_addEES1_NS0_7contextE]+0x2a0): undefined reference to
cl::sycl::program::create_program_for_kernel_impl(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, unsigned char const*, int, char const* const*, std::shared_ptrcl::sycl::detail::context, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)’
CMakeFiles/vptr.dir/vptr.cpp.o: In function cl::sycl::kernel cl::sycl::program::get_kernel<matrix_add>() const': vptr.cpp:(.text._ZNK2cl4sycl7program10get_kernelI10matrix_addEENS0_6kernelEv[_ZNK2cl4sycl7program10get_kernelI10matrix_addEENS0_6kernelEv]+0x59): undefined reference to
cl::sycl::program::get_kernel(std::__cxx11::basic_string<char, std::char_traits, std::allocator >) const’
vptr.cpp:(.text._ZNK2cl4sycl7program10get_kernelI10matrix_addEENS0_6kernelEv[_ZNK2cl4sycl7program10get_kernelI10matrix_addEENS0_6kernelEv]+0xae): undefined reference to `cl::sycl::program::get_kernel(std::__cxx11::basic_string<char, std::char_traits, std::allocator >) const’
collect2: error: ld returned 1 exit status
make[2]: *** [samples/vptr] Error 1
make[1]: *** [samples/CMakeFiles/vptr.dir/all] Error 2
make: *** [all] Error 2
I tried different versions with no luck. Will be happy to get some ideas. Thank you