Hi,
I get an error when I copy a thrust::device_vector to a thrust::device_vector.
std::vector to thrust::device_vector works fine.
I have the feeling, It’s something with CUDA 10. I just made the jump from 7.5 to 10…
with thrust::device_vector val;
Matrix::Matrix(Matrix* M){
thrust::copy(M->val.begin(),M->val.end(),val.begin());
}
I get in the link stage:
Building target: eqstatic
Invoking: NVCC Linker
/usr/local/cuda-10.0/bin/nvcc --cudart static -L/usr/local/cuda-10.0/lib64 --relocatable-device-code=false -gencode arch=compute_30,code=compute_30 -gencode arch=compute_30,code=sm_30 -m64 -link -o “eqstatic” ./src/tools/Log.o ./src/linsolver/CsrMatrix.o ./src/linsolver/Cusparse.o ./src/eqstatic.o ./src/data/DataHandler.o ./src/data/Materials.o ./src/data/Matrices.o ./src/data/Matrix.o ./src/data/Mesh.o ./src/data/ProblemFiles.o ./src/data/readMeshAbaqus.o ./src/assembler/Assembler.o -lcusparse -lcudart -lcudadevrt -lcuda
./src/data/Matrix.o: In function thrust::detail::normal_iterator<thrust::device_ptr<int> > thrust::copy<thrust::cuda_cub::tag, thrust::detail::normal_iterator<thrust::device_ptr<int> >, thrust::detail::normal_iterator<thrust::device_ptr<int> > >(thrust::detail::execution_policy_base<thrust::cuda_cub::tag> const&, thrust::detail::normal_iterator<thrust::device_ptr<int> >, thrust::detail::normal_iterator<thrust::device_ptr<int> >, thrust::detail::normal_iterator<thrust::device_ptr<int> >)': /usr/local/cuda-10.0/bin/../targets/x86_64-linux/include/thrust/detail/copy.inl:37: undefined reference to
thrust::detail::normal_iterator<thrust::device_ptr > thrust::cuda_cub::copy<thrust::cuda_cub::tag, thrust::detail::normal_iterator<thrust::device_ptr >, thrust::detail::normal_iterator<thrust::device_ptr > >(thrust::cuda_cub::execution_policythrust::cuda_cub::tag&, thrust::detail::normal_iterator<thrust::device_ptr >, thrust::detail::normal_iterator<thrust::device_ptr >, thrust::detail::normal_iterator<thrust::device_ptr >)’
makefile:63: recipe for target ‘eqstatic’ failed
I would really appreciate some help…