Advertisement
Guest User

Untitled

a guest
May 31st, 2016
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. $ cat t28.cu
  2. #include <thrust/device_vector.h>
  3. int main(){
  4. thrust::device_vector<int> x;
  5. x.resize(10);
  6. }
  7. $ #CMake commands:
  8. $ /usr/local/cuda/bin/nvcc t28.cu -dc -o t28.cu.o -ccbin /usr/bin/cc -m64 -Xcompiler ,\"-g\" -std=c++11 -arch=compute_52 -DNVCC -I/usr/local/cuda/include -I/usr/local/cuda/include
  9. $ /usr/local/cuda/bin/nvcc -m64 -ccbin "/usr/bin/cc" -dlink t28.cu.o -o t28_link.o
  10. nvlink warning : SM Arch ('sm_20') not found in 't28.cu.o'
  11. $ /usr/bin/c++ t28.cu.o t28_link.o -o t28 -rdynamic /usr/local/cuda/lib64/libcudart.so -Wl,-rpath,/usr/local/cuda/lib64
  12. $ ./t28
  13. terminate called after throwing an instance of 'thrust::system::detail::bad_alloc'
  14. what(): std::bad_alloc: unknown error
  15. Aborted (core dumped)
  16. $ #correct compilation commands:
  17. $ /usr/local/cuda/bin/nvcc t28.cu -dc -o t28.cu.o -ccbin /usr/bin/cc -m64 -Xcompiler ,\"-g\" -std=c++11 -arch=compute_52 -DNVCC -I/usr/local/cuda/include -I/usr/local/cuda/include
  18. $ /usr/local/cuda/bin/nvcc -arch=compute_52 -m64 -ccbin "/usr/bin/cc" -dlink t28.cu.o -o t28_link.o
  19. $ nvcc -arch=compute_52 t28.cu.o t28_link.o -o t28
  20. $ ./t28
  21. $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement