Friday, 9 August 2013

Thrust Error: libc++abi.dylib: terminate called throwing an exception. Abort trap: 6

Thrust Error: libc++abi.dylib: terminate called throwing an exception.
Abort trap: 6

Trying to do a simple copy data from Host to Device using thrust. It's
outputting:
libc++abi.dylib: terminate called throwing an exception
Abort trap: 6
Code:
#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
void test()
{
thrust::host_vector<int> H(4);
H[0] = 14;
H[1] = 20;
H[2] = 38;
H[3] = 46;
thrust::device_vector<int> D = H; // causing error
}
int main()
{
test();
return 0;
}
Here's how I compiled and ran it in OS X:
$ nvcc test.cu -o test
$ ./test
I have CUDA 5.5 installed which I believe installed Thrust 1.6.0
automatically.

No comments:

Post a Comment