Reputation: 1
I installed oneAPI tools and tried to compile the example project, vector-add
make all
dpcpp -O2 -g -std=c++17 -o vector-add-buffers src/vector-add-buffers.cpp
In file included from src/vector-add-buffers.cpp:22:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl.hpp:11:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/accessor.hpp:12:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/atomic.hpp:12:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/access/access.hpp:10:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/detail/common.hpp:116:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/exception.hpp:17:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/stl.hpp:13:
/home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/bit_cast.hpp:33:22: error: no member named 'is_trivially_copyable' in namespace 'std'
static_assert(std::is_trivially_copyable<From>::value,
~~~~~^
/home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/bit_cast.hpp:33:44: error: 'From' does not refer to a value
static_assert(std::is_trivially_copyable<From>::value,
^
I suspect it was caused by the old cmake
, pkg-config
, make
, gcc
and g++
, but I don't have root access to the cluster. I tried to reinstall it with conda
. It was not helping anyway.
Upvotes: 0
Views: 738
Reputation: 1
You can compiler gcc by yourself(it's easy) and use export CXX=/path/gcc-9.2.0/bin/g++
and export CC=/path/gcc-9.2.0/bin/gcc
to set compiler env for cmake.
Upvotes: 0
Reputation: 11
In order to compile the vector-add sample code with dpcpp compiler, your gcc version should be atleast 7.3.0 or above.
For more information, please refer to the link below.
Upvotes: 1